From 3b2e49f7b7a637e16f32c710b28f4d5ead50c23d Mon Sep 17 00:00:00 2001 From: chrin Date: Tue, 19 Sep 2017 08:27:10 +0200 Subject: [PATCH] Initial commit --- .gitignore | 19 + AUTHORS | 1 + COPYING | 340 + ChangeLog | 1 + Doxyfile.cfg | 1519 + INSTALL | 365 + MakefileWin/Makefile | 40 + MakefileWin/Makefile_Py3Cafe | 40 + MakefileWin/Makefile_noqt | 39 + NEWS | 1 + README | 25 + autogen.sh | 1 + autogen_cafe3z_release.sh | 49 + autogen_cafepy3.sh | 44 + autogen_cafepy3_release.sh | 46 + autogen_cafepy3_release_noqt.sh | 45 + autogen_cafepy3z_release.sh | 53 + autogen_rel.sh | 48 + autogen_rel_noqt.sh | 45 + configure.ac | 1 + configure6064d.ac | 671 + configure6064z.ac | 1036 + .../cafeTest/bpmDisplaySFEnergyBunch1.xml | 48 + examples/cafeTest/cNodes.xml | 1 + examples/cafeTest/cSF_Aramis_bunch1.xml | 380 + examples/cafeTest/cafeTest | Bin 0 -> 467193 bytes examples/cafeTest/cafeTest.cc | 1699 + examples/cafeTest/callbacks.h | 186 + examples/cafeTest/gDBPM.xml | 39 + examples/cafeTest/input.json | 241 + examples/cafeTest/makePush | 6 + examples/cafeTest/makefile | 42 + examples/cafeTest/makefile_local_2 | 52 + examples/cafeTest/makefile_local_win | 23 + examples/cafeTest/makefile_noqt | 51 + examples/cafeTest/makefile_py | 54 + examples/cafeTest/makefile_py_latest | 54 + examples/cafeTest/makefile_py_latest1 | 55 + examples/cafeTest/makefile_py_latest2 | 55 + examples/cafeTest/makefile_py_latest2z | 69 + examples/cafeTest/makefile_py_static2 | 75 + examples/cafeTest/makefile_rel | 22 + examples/cafeTest/makefilez | 48 + examples/cafeTest/outAramis.xml | 2793 + examples/cafeTest/request.json | 26 + examples/cafeTest/sf_ar_cNodes.xml | 2804 + examples/cafeTest/test.xml | 8061 + examples/cafeTest/testVSUP.xml | 1557 + examples/cafeTest/zhelpers.h | 174 + include/PVCtrlHolder.h | 299 + include/PVDataHolder.h | 236 + include/PVGroup.h | 196 + include/PVHolder.h | 889 + include/PyCafe.h | 32 + include/PyCafe3_api.h | 115 + include/PyCafe_api.h | 1 + include/cafe.h | 1033 + include/cafeCache.h | 615 + include/cafeCache_backup.h | 591 + include/cafeConvert.h | 396 + include/cafeDataType.h | 118 + include/cafeDataTypeHelper.h | 65 + include/cafeEnum.h | 152 + include/cafeEnumStrings.h | 44 + include/cafeRoast.h | 505 + include/cafeService.h | 640 + include/cafeVectors.h | 298 + include/cafeXML.h | 24 + include/caopCodes.h | 67 + include/channelRegalia.h | 316 + include/conduit.h | 361 + include/conduitConnectionHandlerArgs.h | 488 + include/conduitEventHandlerArgs.h | 1190 + include/conduitFriends.h | 794 + include/conduitGroup.h | 171 + include/connect.h | 594 + include/defines.h | 80 + include/deviceCollection.h | 115 + include/enumStrings.h | 98 + include/exceptions.h | 106 + include/exceptionsHelper.h | 38 + include/global.h | 36 + include/granules.h | 98 + include/handleHelper.h | 276 + include/hashConduit.h | 53 + include/hashConduitGroup.h | 45 + include/helper.h | 37 + include/instant.cpp | 2145 + include/instant.h | 272 + include/loadCollectionXMLParser.h | 62 + include/loadGroupXMLParser.h | 67 + include/makefile | 483 + include/makefile.am | 27 + include/methodCallbacks.h | 25 + include/policies.h | 536 + include/policyHelper.h | 144 + include/restorePVGroupXMLParser.h | 74 + include/stamp-h1 | 1 + include/statusCodes.h | 974 + include/transpose.h | 2159 + include/zhelpers.h | 830 + libtool | 9056 ++ makeManual.make | 30 + makeManualWin.make | 35 + makefile | 773 + makefile.am | 15 + src/PyCafe.cpp | 1 + src/PyCafe3.cpp | 119252 +++++++++++++++ src/cafe.cpp | 3919 + src/cafeCache.cpp | 1873 + src/cafeEnumStrings.cpp | 38 + src/cafeGroup.cpp | 1528 + src/cafeService.cpp | 383 + src/cafeVectors.cpp | 3066 + src/cafeXML.cpp | 536 + src/callbackHandlerCreate.cpp | 259 + src/callbackHandlerMonitor.cpp | 179 + src/conduit.cpp | 918 + src/conduitGroup.cpp | 204 + src/connect.cpp | 2470 + src/connectCallbacks.cpp | 98 + src/connectGroup.cpp | 1830 + src/enumStrings.cpp | 92 + src/exceptionsHelper.cpp | 125 + src/granules.cpp | 2359 + src/handleHelper.cpp | 3372 + src/helper.cpp | 272 + src/loadCollectionXMLParser.cpp | 98 + src/loadGroupXMLParser.cpp | 135 + src/makeManualWin.make | 27 + src/makefile | 568 + src/makefile.am | 24 + src/methodCallbacks.cpp | 570 + src/policyHelper.cpp | 1640 + src/restorePVGroupXMLParser.cpp | 185 + src/transpose.cpp | 1305 + stamp-h1 | 1 + usePy3 | 8 + 138 files changed, 199299 insertions(+) create mode 100644 .gitignore create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 Doxyfile.cfg create mode 100644 INSTALL create mode 100644 MakefileWin/Makefile create mode 100644 MakefileWin/Makefile_Py3Cafe create mode 100644 MakefileWin/Makefile_noqt create mode 100644 NEWS create mode 100644 README create mode 120000 autogen.sh create mode 100644 autogen_cafe3z_release.sh create mode 100644 autogen_cafepy3.sh create mode 100644 autogen_cafepy3_release.sh create mode 100644 autogen_cafepy3_release_noqt.sh create mode 100644 autogen_cafepy3z_release.sh create mode 100644 autogen_rel.sh create mode 100644 autogen_rel_noqt.sh create mode 120000 configure.ac create mode 100644 configure6064d.ac create mode 100644 configure6064z.ac create mode 100644 examples/cafeTest/bpmDisplaySFEnergyBunch1.xml create mode 120000 examples/cafeTest/cNodes.xml create mode 100644 examples/cafeTest/cSF_Aramis_bunch1.xml create mode 100755 examples/cafeTest/cafeTest create mode 100644 examples/cafeTest/cafeTest.cc create mode 100644 examples/cafeTest/callbacks.h create mode 100644 examples/cafeTest/gDBPM.xml create mode 100644 examples/cafeTest/input.json create mode 100644 examples/cafeTest/makePush create mode 100644 examples/cafeTest/makefile create mode 100644 examples/cafeTest/makefile_local_2 create mode 100644 examples/cafeTest/makefile_local_win create mode 100644 examples/cafeTest/makefile_noqt create mode 100644 examples/cafeTest/makefile_py create mode 100644 examples/cafeTest/makefile_py_latest create mode 100644 examples/cafeTest/makefile_py_latest1 create mode 100644 examples/cafeTest/makefile_py_latest2 create mode 100644 examples/cafeTest/makefile_py_latest2z create mode 100644 examples/cafeTest/makefile_py_static2 create mode 100644 examples/cafeTest/makefile_rel create mode 100644 examples/cafeTest/makefilez create mode 100644 examples/cafeTest/outAramis.xml create mode 100644 examples/cafeTest/request.json create mode 100644 examples/cafeTest/sf_ar_cNodes.xml create mode 100644 examples/cafeTest/test.xml create mode 100644 examples/cafeTest/testVSUP.xml create mode 100644 examples/cafeTest/zhelpers.h create mode 100644 include/PVCtrlHolder.h create mode 100644 include/PVDataHolder.h create mode 100644 include/PVGroup.h create mode 100644 include/PVHolder.h create mode 100644 include/PyCafe.h create mode 100644 include/PyCafe3_api.h create mode 120000 include/PyCafe_api.h create mode 100644 include/cafe.h create mode 100644 include/cafeCache.h create mode 100644 include/cafeCache_backup.h create mode 100644 include/cafeConvert.h create mode 100644 include/cafeDataType.h create mode 100644 include/cafeDataTypeHelper.h create mode 100644 include/cafeEnum.h create mode 100644 include/cafeEnumStrings.h create mode 100644 include/cafeRoast.h create mode 100644 include/cafeService.h create mode 100644 include/cafeVectors.h create mode 100644 include/cafeXML.h create mode 100644 include/caopCodes.h create mode 100644 include/channelRegalia.h create mode 100644 include/conduit.h create mode 100644 include/conduitConnectionHandlerArgs.h create mode 100644 include/conduitEventHandlerArgs.h create mode 100644 include/conduitFriends.h create mode 100644 include/conduitGroup.h create mode 100644 include/connect.h create mode 100644 include/defines.h create mode 100644 include/deviceCollection.h create mode 100644 include/enumStrings.h create mode 100644 include/exceptions.h create mode 100644 include/exceptionsHelper.h create mode 100644 include/global.h create mode 100644 include/granules.h create mode 100644 include/handleHelper.h create mode 100644 include/hashConduit.h create mode 100644 include/hashConduitGroup.h create mode 100644 include/helper.h create mode 100644 include/instant.cpp create mode 100644 include/instant.h create mode 100644 include/loadCollectionXMLParser.h create mode 100644 include/loadGroupXMLParser.h create mode 100644 include/makefile create mode 100644 include/makefile.am create mode 100644 include/methodCallbacks.h create mode 100644 include/policies.h create mode 100644 include/policyHelper.h create mode 100644 include/restorePVGroupXMLParser.h create mode 100644 include/stamp-h1 create mode 100644 include/statusCodes.h create mode 100644 include/transpose.h create mode 100644 include/zhelpers.h create mode 100755 libtool create mode 100644 makeManual.make create mode 100644 makeManualWin.make create mode 100644 makefile create mode 100644 makefile.am create mode 120000 src/PyCafe.cpp create mode 100644 src/PyCafe3.cpp create mode 100644 src/cafe.cpp create mode 100644 src/cafeCache.cpp create mode 100644 src/cafeEnumStrings.cpp create mode 100644 src/cafeGroup.cpp create mode 100644 src/cafeService.cpp create mode 100644 src/cafeVectors.cpp create mode 100644 src/cafeXML.cpp create mode 100644 src/callbackHandlerCreate.cpp create mode 100644 src/callbackHandlerMonitor.cpp create mode 100644 src/conduit.cpp create mode 100644 src/conduitGroup.cpp create mode 100644 src/connect.cpp create mode 100644 src/connectCallbacks.cpp create mode 100644 src/connectGroup.cpp create mode 100644 src/enumStrings.cpp create mode 100644 src/exceptionsHelper.cpp create mode 100644 src/granules.cpp create mode 100644 src/handleHelper.cpp create mode 100644 src/helper.cpp create mode 100644 src/loadCollectionXMLParser.cpp create mode 100644 src/loadGroupXMLParser.cpp create mode 100644 src/makeManualWin.make create mode 100644 src/makefile create mode 100644 src/makefile.am create mode 100644 src/methodCallbacks.cpp create mode 100644 src/policyHelper.cpp create mode 100644 src/restorePVGroupXMLParser.cpp create mode 100644 src/transpose.cpp create mode 100644 stamp-h1 create mode 100644 usePy3 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e5604b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +*~ +*.bak +aclocal.m4 +autom4te.cache +config.* +configure +depcomp +install-sh +ltmain.sh +m4 +makefile.in +missing +src/*.o +src/*.lo +src/*.la +src/.deps/* +src/.libs/* +doc + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ + diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..623b625 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ChangeLog @@ -0,0 +1 @@ + diff --git a/Doxyfile.cfg b/Doxyfile.cfg new file mode 100644 index 0000000..97a25ba --- /dev/null +++ b/Doxyfile.cfg @@ -0,0 +1,1519 @@ +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "CAFE" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 1.0.0 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = YES + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = YES + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = . + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# If the HTML_TIMESTAMP tag is set to YES then the generated HTML +# documentation will contain the timesstamp. + +HTML_TIMESTAMP = NO + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..7d1c323 --- /dev/null +++ b/INSTALL @@ -0,0 +1,365 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008, 2009 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/MakefileWin/Makefile b/MakefileWin/Makefile new file mode 100644 index 0000000..17d11ba --- /dev/null +++ b/MakefileWin/Makefile @@ -0,0 +1,40 @@ +INCLUDES = -IC:\CAFE\cafe-1.0.0-beta-3\cpp\include -IC:\local\boost_1_63_0\boost \ +-IC:\local\boost_1_63_0 -IC:\EPICS\base-3.14.12.5\include -IC:\EPICS\base-3.14.12.5\include\os\WIN32 \ +-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \ +-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml +#-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include + +LIB_DEST=lib\cafe + +CXX=cl +CXXFLAGS = /W4 /EHsc /c /MT /DHAVE_LIBQTXML +OUTPUT_OPTION = /o "$@" +LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \ +C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \ +C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_63.lib \ +C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_63.lib +#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib \ + + +OBJS= cafeCache.obj cafeGroup.obj cafe.obj cafeVectors.obj \ + callbackHandlerCreate.obj callbackHandlerMonitor.obj conduitGroup.obj conduit.obj \ + connectCallbacks.obj connectGroup.obj \ + connect.obj exceptionsHelper.obj granules.obj handleHelper.obj helper.obj \ + methodCallbacks.obj policyHelper.obj transpose.obj \ + cafeXML.obj loadCollectionXMLParser.obj loadGroupXMLParser.obj \ + restorePVGroupXMLParser.obj $(LIB_LOCAL) + + + +$(LIB_DEST)\cafe.lib: $(OBJS) + LIB $(OBJS) /out:$(LIB_DEST)\cafe.lib + + +%.obj: src\%.cpp + $(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $< + + +clean: + del *.obj + + diff --git a/MakefileWin/Makefile_Py3Cafe b/MakefileWin/Makefile_Py3Cafe new file mode 100644 index 0000000..cf93b6a --- /dev/null +++ b/MakefileWin/Makefile_Py3Cafe @@ -0,0 +1,40 @@ +INCLUDES = -IC:\CAFE\cafe-1.0.0-beta-3\cpp\include -IC:\local\boost_1_63_0\boost \ +-IC:\local\boost_1_63_0 -IC:\EPICS\base-3.14.12.5\include -IC:\EPICS\base-3.14.12.5\include\os\WIN32 \ +-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \ +-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml \ +-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include + +LIB_DEST=lib\py3cafe + +CXX=cl +CXXFLAGS = /W4 /EHsc /c /MT /DHAVE_LIBQTXML /DHAVE_PYTHON_H +OUTPUT_OPTION = /o "$@" +LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \ +C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \ +C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib \ +C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_63.lib \ +C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_63.lib + + +OBJS= cafeCache.obj cafeGroup.obj cafe.obj cafeVectors.obj \ + callbackHandlerCreate.obj callbackHandlerMonitor.obj conduitGroup.obj conduit.obj \ + connectCallbacks.obj connectGroup.obj \ + connect.obj exceptionsHelper.obj granules.obj handleHelper.obj helper.obj \ + methodCallbacks.obj policyHelper.obj transpose.obj \ + cafeXML.obj loadCollectionXMLParser.obj loadGroupXMLParser.obj \ + restorePVGroupXMLParser.obj $(LIB_LOCAL) + + + +$(LIB_DEST)\cafe.lib: $(OBJS) + LIB $(OBJS) /out:$(LIB_DEST)\cafe.lib + + +%.obj: src\%.cpp + $(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $< + + +clean: + del *.obj + + diff --git a/MakefileWin/Makefile_noqt b/MakefileWin/Makefile_noqt new file mode 100644 index 0000000..d88c196 --- /dev/null +++ b/MakefileWin/Makefile_noqt @@ -0,0 +1,39 @@ +INCLUDES = -IC:\CAFE\cafe-1.0.0-beta-3\cpp\include -IC:\local\boost_1_63_0\boost \ +-IC:\local\boost_1_63_0 -IC:\EPICS\base-3.14.12.5\include -IC:\EPICS\base-3.14.12.5\include\os\WIN32 +#-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \ +#-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml +#-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include + +LIB_DEST=lib\cafe-noqt + +CXX=cl +CXXFLAGS = /W4 /EHsc /c /MT +OUTPUT_OPTION = /o "$@" +LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \ +C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_63.lib \ +C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_63.lib +#C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \ +#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib + + +OBJS= cafeCache.obj cafeGroup.obj cafe.obj cafeVectors.obj \ + callbackHandlerCreate.obj callbackHandlerMonitor.obj conduitGroup.obj conduit.obj \ + connectCallbacks.obj connectGroup.obj \ + connect.obj exceptionsHelper.obj granules.obj handleHelper.obj helper.obj \ + methodCallbacks.obj policyHelper.obj transpose.obj \ + cafeXML.obj loadCollectionXMLParser.obj loadGroupXMLParser.obj \ + restorePVGroupXMLParser.obj $(LIB_LOCAL) + + + +$(LIB_DEST)\cafe.lib: $(OBJS) + LIB $(OBJS) /out:$(LIB_DEST)\cafe.lib + + +%.obj: src\%.cpp + $(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $< + +clean: + del *.obj + + diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ + diff --git a/README b/README new file mode 100644 index 0000000..251d4ba --- /dev/null +++ b/README @@ -0,0 +1,25 @@ +## -------------------------------------------------------------------------- +## autogen.sh +## +## --prefix: This is the prefix to the include sub-directory to which the +## cafe include files are installed +## +## --libdir: This is the directory to which the cafe shared objects are +## installed + +## --with-boost: base directory for the boost header files +## --with-epics: epics top level directory +## Note that configure.ac assume that the architecture is +## base/lib/${EPICS_HOST_ARCH} +## --with-qt-inc Qt include directory (optional) +## --with-qt-lib Qt lib directory (optional) +## --with-python-inc Python include directory, if building PyCafe +## --with-python-lib Python lib directory, if bulding PyCafe +## -------------------------------------------------------------------------- + +1) Modify autogen.sh according to above +2) 'source autogen.sh' +3) 'make install' This installs cafe headers/libraries to the directories + specified by --prefix/--libdir in the above + + diff --git a/autogen.sh b/autogen.sh new file mode 120000 index 0000000..c4ab6a7 --- /dev/null +++ b/autogen.sh @@ -0,0 +1 @@ +autogen_cafepy3_release.sh \ No newline at end of file diff --git a/autogen_cafe3z_release.sh b/autogen_cafe3z_release.sh new file mode 100644 index 0000000..8bff51f --- /dev/null +++ b/autogen_cafe3z_release.sh @@ -0,0 +1,49 @@ +#source usePy3 +aclocal --force -I m4 +libtoolize --force --copy +autoconf --force +autoheader --force +automake --force --add-missing --copy +autoreconf + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 + + +EB=$(readlink ${EPICS}/base) +echo 'EPICS BASE IS=' $EB +EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + +#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \ +CYCAFE_VERSION=cafez-1.3.0-alpha-1 + +./configure \ + --prefix=/opt/gfa/cafe/cpp/${CYCAFE_VERSION}/ \ + --libdir=/opt/gfa/cafe/cpp/${CYCAFE_VERSION}/lib \ + --enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \ + --enable-epics --with-epics=${EPICS}/base \ + --enable-qt4-lib --with-qt4-lib=/usr/lib64 \ + --enable-qt4-inc --with-qt4-inc=/usr/include \ + --enable-zeromq-inc --with-zeromq-inc=/opt/gfa/zmq/zeromq-4.1.5/include \ + --enable-zeromq-lib --with-zeromq-lib=/opt/gfa/zmq/zeromq-4.1.5/lib \ + --enable-json-inc --with-json-inc=/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include \ + --enable-json-lib --with-json-lib=/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 + +unset CAFE_EPICS_V_MAJOR +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_PATCH + +cp include/config.h include/os/Linux/cafe/config.h + diff --git a/autogen_cafepy3.sh b/autogen_cafepy3.sh new file mode 100644 index 0000000..5ccf23a --- /dev/null +++ b/autogen_cafepy3.sh @@ -0,0 +1,44 @@ +aclocal --force -I m4 +libtoolize --force --copy +autoconf --force +autoheader --force +automake --force --add-missing --copy +autoreconf + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 + + +EB=$(readlink ${EPICS}/base) +echo 'EPICS BASE IS=' $EB +EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + +#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \ +CAFE_VERSION=cafepy3-1.7.0-alpha +#CAFE_VERSION=cafe-1.1.0 + +./configure \ + --prefix=/afs/psi.ch/intranet/Controls/cafe/CAFE/cafe/${CAFE_VERSION} \ + --libdir=/afs/psi.ch/intranet/Controls/cafe/CAFE/cafe/${CAFE_VERSION}/lib/${EPICS_HOST_ARCH} \ + --enable-boost --with-boost=/afs/psi.ch/intranet/Controls/cafe/CAFE/boost/boost_1_57_0 \ + --enable-epics --with-epics=${EPICS} \ + --enable-qt4-lib --with-qt4-lib=/usr/lib64 \ + --enable-qt4-inc --with-qt4-inc=/usr/include \ + --enable-python-inc --with-python-inc=/opt/gfa/python-3.5/latest/include/python3.5m \ + --enable-python-lib --with-python-lib=/opt/gfa/python-3.5/latest/lib +unset CAFE_EPICS_V_MAJOR +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_PATCH + diff --git a/autogen_cafepy3_release.sh b/autogen_cafepy3_release.sh new file mode 100644 index 0000000..ffd10d4 --- /dev/null +++ b/autogen_cafepy3_release.sh @@ -0,0 +1,46 @@ +source usePy3 +aclocal --force -I m4 +libtoolize --force --copy +autoconf --force +autoheader --force +automake --force --add-missing --copy +autoreconf + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 + + +EB=$(readlink ${EPICS}/base) +echo 'EPICS BASE IS=' $EB +EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + +#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \ +CYCAFE_VERSION=pycafe-1.3.0-final-1 + +./configure \ + --prefix=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/ \ + --libdir=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/lib \ + --enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \ + --enable-epics --with-epics=${EPICS}/base \ + --enable-qt4-lib --with-qt4-lib=/usr/lib64 \ + --enable-qt4-inc --with-qt4-inc=/usr/include \ + --enable-python-inc --with-python-inc=/opt/gfa/python-3.5/latest/include/python3.5m \ + --enable-python-lib --with-python-lib=/opt/gfa/python-3.5/latest/lib +unset CAFE_EPICS_V_MAJOR +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_PATCH + +cp include/config.h include/os/Linux/pycafe35/config.h + diff --git a/autogen_cafepy3_release_noqt.sh b/autogen_cafepy3_release_noqt.sh new file mode 100644 index 0000000..eaf8d90 --- /dev/null +++ b/autogen_cafepy3_release_noqt.sh @@ -0,0 +1,45 @@ +source usePy3 +aclocal --force -I m4 +libtoolize --force --copy +autoconf --force +autoheader --force +automake --force --add-missing --copy +autoreconf + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 + + +EB=$(readlink ${EPICS}/base) +echo 'EPICS BASE IS=' $EB +EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + +#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \ +CAFE_VERSION=cafe-1.0.0-beta-1 +CYCAFE_VERSION=pycafe-noqt-1.0.0-beta-1 + +./configure \ + --prefix=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/ \ + --libdir=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/lib \ + --enable-boost --with-boost=/opt/gfa/cafe/boost/boost_1_57_0 \ + --enable-epics --with-epics=${EPICS} \ + --enable-python-inc --with-python-inc=/opt/gfa/python-3.5/latest/include/python3.5m \ + --enable-python-lib --with-python-lib=/opt/gfa/python-3.5/latest/lib +unset CAFE_EPICS_V_MAJOR +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_PATCH + +#--enable-qt4-lib --with-qt4-lib=/usr/lib64 \ +#--enable-qt4-inc --with-qt4-inc=/usr/include \ diff --git a/autogen_cafepy3z_release.sh b/autogen_cafepy3z_release.sh new file mode 100644 index 0000000..2711dfa --- /dev/null +++ b/autogen_cafepy3z_release.sh @@ -0,0 +1,53 @@ +source usePy3 +aclocal --force -I m4 +libtoolize --force --copy +autoconf --force +autoheader --force +automake --force --add-missing --copy +autoreconf + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 + + +EB=$(readlink ${EPICS}/base) +echo 'EPICS BASE IS=' $EB +EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + +#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \ +CYCAFE_VERSION=pyzcafe-1.3.0-alpha-1 + +./configure \ + --prefix=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/ \ + --libdir=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/lib \ + --enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \ + --enable-epics --with-epics=${EPICS}/base \ + --enable-qt4-lib --with-qt4-lib=/usr/lib64 \ + --enable-qt4-inc --with-qt4-inc=/usr/include \ + --enable-python-inc --with-python-inc=/opt/gfa/python-3.5/latest/include/python3.5m \ + --enable-python-lib --with-python-lib=/opt/gfa/python-3.5/latest/lib \ + --enable-zeromq-inc --with-zeromq-inc=/opt/gfa/zmq/zeromq-4.1.5/include \ + --enable-zeromq-lib --with-zeromq-lib=/opt/gfa/zmq/zeromq-4.1.5/lib \ + --enable-json-inc --with-json-inc=/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include \ + --enable-json-lib --with-json-lib=/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 \ + --enable-curl-inc --with-curl-inc=/opt/gfa/python-3.5/2.4.1/include \ + --enable-curl-lib --with-curl-lib=/opt/gfa/python-3.5/2.4.1/lib + +unset CAFE_EPICS_V_MAJOR +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_PATCH + +cp include/config.h include/os/Linux/pycafe35/config.h + diff --git a/autogen_rel.sh b/autogen_rel.sh new file mode 100644 index 0000000..6375383 --- /dev/null +++ b/autogen_rel.sh @@ -0,0 +1,48 @@ +aclocal --force -I m4 +libtoolize --force --copy +autoconf --force +autoheader --force +automake --force --add-missing --copy +autoreconf + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 + + +EB=$(readlink ${EPICS}/base) +echo 'EPICS BASE IS=' $EB +EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + + +CAFE_VERSION=cafe-1.3.0-final-1 + + +./configure \ + --prefix=/opt/gfa/cafe/cpp/${CAFE_VERSION} \ + --libdir=/opt/gfa/cafe/cpp/${CAFE_VERSION}/lib \ + --enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \ + --enable-epics --with-epics=${EPICS}/base \ + --enable-qt4-lib --with-qt4-lib=/usr/lib64 \ + --enable-qt4-inc --with-qt4-inc=/usr/include +# --enable-boost-lib --with-boost-lib=/opt/gfa/cafe/boost/boost_1_61_0/lib + +unset CAFE_EPICS_V_MAJOR +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_PATCH + +cp include/config.h include/os/Linux/cafe/config.h + + + diff --git a/autogen_rel_noqt.sh b/autogen_rel_noqt.sh new file mode 100644 index 0000000..ebfde6c --- /dev/null +++ b/autogen_rel_noqt.sh @@ -0,0 +1,45 @@ +aclocal --force -I m4 +libtoolize --force --copy +autoconf --force +autoheader --force +automake --force --add-missing --copy +autoreconf + +#Check what the EPICS RELEASE IS from ${EPICS}/base +#Used by ./configure +#Assumes format ${EPICS}/base-3.14.12 + + +EB=$(readlink ${EPICS}/base) +echo 'EPICS BASE IS=' $EB +EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g") +EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g") +EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g") +EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g") +EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g") +echo EPICS_MAJOR=$EBMAJ +echo EPICS_MINOR=$EBMIN +echo EPICS_PATCH=$EBPAT + +export CAFE_EPICS_V_MAJOR=$EBMAJ +export CAFE_EPICS_V_MINOR=$EBMIN +export CAFE_EPICS_V_PATCH=$EBPAT + +#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \ + +CAFE_VERSION=cafe-noqt-1.1.0-final-1 + + +./configure \ + --prefix=/opt/gfa/cafe/cpp/${CAFE_VERSION} \ + --libdir=/opt/gfa/cafe/cpp/${CAFE_VERSION}/lib \ + --enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \ + --enable-epics --with-epics=${EPICS}/base + + + +unset CAFE_EPICS_V_MAJOR +unset CAFE_EPICS_V_MINOR +unset CAFE_EPICS_V_PATCH + +cp include/config.h include/os/Linux/cafe-noqt/config.h diff --git a/configure.ac b/configure.ac new file mode 120000 index 0000000..5f1c6d4 --- /dev/null +++ b/configure.ac @@ -0,0 +1 @@ +configure6064d.ac \ No newline at end of file diff --git a/configure6064d.ac b/configure6064d.ac new file mode 100644 index 0000000..cd4c04d --- /dev/null +++ b/configure6064d.ac @@ -0,0 +1,671 @@ +## CAFE (Channel Access interFacE) +## Author: Jan Chrin, GFA, PSI +## +## configure.ac is processed by autoconf +## +## output: configure.in file for building the cafe library +## + +# Standard macros +AC_PREREQ(2.63) +AC_COPYRIGHT([CAFE,Jan Chrin, 2013]) +AC_INIT([CAFE], [1.0.0], [Bug reports to: jan.chrin@psi.ch]) + +AC_CONFIG_AUX_DIR(./) + +AC_CONFIG_MACRO_DIR([m4]) +m4_pattern_allow([AC_CONFIG_MACRO]) + + +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([./include/cafe.h]) + +AC_LANG_CPLUSPLUS + +AC_CONFIG_HEADER([./include/config.h:./include/config.in]) +AC_PROG_CXX + +# library creation +AC_PROG_LIBTOOL +LT_INIT + + +AC_DEFINE_UNQUOTED(HAVE_LINUX, 1, [linux dependency (sleep)]) + +CPPFLAGS=" -fexceptions -fPIC" +#CPPFLAGS=" -pg" +# provide include directories +AC_SUBST([CAFE_CPPFLAGS], '-I$(top_srcdir)/include ') + +##--------------------------------------------------------------------------- +##-- EPICS -- path and options +## + EPICS_PREFIX="" + EPICS_INCL_PATH="" + EPICS_LIB_PATH="" +## Add epics release + + EPICS_MAJOR_DEFAULT="3" + EPICS_MINOR_DEFAULT="14" + EPICS_PATCH_DEFAULT="12" + + EPICS_MAJOR_REL=${EPICS_MAJOR_DEFAULT} + EPICS_MINOR_REL=${EPICS_MINOR_DEFAULT} + EPICS_PATCH_REL=${EPICS_PATCH_DEFAULT} + + #overwrite default with actual if determined + if test "${CAFE_EPICS_V_MAJOR}" != ""; then + EPICS_MAJOR_REL=${CAFE_EPICS_V_MAJOR} + fi + if test "${CAFE_EPICS_V_MINOR}" != ""; then + EPICS_MINOR_REL=${CAFE_EPICS_V_MINOR} + fi + if test "${CAFE_EPICS_V_PATCH}" != ""; then + EPICS_PATCH_REL=${CAFE_EPICS_V_PATCH} + fi + + AC_ARG_ENABLE( + [epics], + AC_HELP_STRING([--enable-epics], + [enable epics use [default=no]]), + [HAVE_EPICS=true], + [HAVE_EPICS=false]) + + AC_ARG_WITH( + epics, + AC_HELP_STRING( + [--with-epics location of EPICS], + [prefix where the epics libraries and include files are to be found]), + [HAVE_EPICS=true + EPICS_PREFIX=$withval + EPICS_INCL_PATH="-I"${EPICS_PREFIX}"/include/ -I"${EPICS_PREFIX}"/include/os/Linux" + EPICS_LIB_PATH=${EPICS_PREFIX}"/lib/"${EPICS_HOST_ARCH}]) + + #echo "TEST ", $EPICS_LIB_PATH +## +##-- end EPICS -- path and options +##--------------------------------------------------------------------------- + + + +##=========================================================================== +##== Check for header files and libraries. +##=========================================================================== + + +##--------------------------------------------------------------------------- +##-- EPICS -- check header files and libs +## + AC_LANG_PUSH([C++]) + + if test $HAVE_EPICS == true; then + + # Change flags: if all tests are successfull, accept this changes; if + # the tests are not successfull, use the old flags. + if test "${EPICS_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${EPICS_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${EPICS_LIB_PATH}" -Wl,-rpath,"${EPICS_LIB_PATH} + fi + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_HEADERS( + [cadef.h], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(cadef.h not found!)], + []) + fi + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_HEADERS( + [epicsTypes.h], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(epicsTypes.h not found!)], + []) + fi + + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_LIB(ca,[main], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(libca either not found or not operational!)]) + fi + + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_LIB(Com,[main], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(libCom either not found or not operational!)]) + fi + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_LIB(dl,[main], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(libdl either not found or not operational!)]) + fi + + #echo " HAVE EPICS? " $HAVE_EPICS x$HAVE_EPICS + + # If all checks are OK we add rlog to the CXXFLAGS. + if test x$HAVE_EPICS != xtrue ; then + if test "${EPICS_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + fi + + fi + + echo "LDFLAGS__> $LDFLAGS " + + if test x$HAVE_EPICS == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_EPICS, ${EPICS_MAJOR_REL}.${EPICS_MINOR_REL}.${EPICS_PATCH_REL}, [epics version]) + AC_DEFINE_UNQUOTED(EPICS_MAJOR, ${EPICS_MAJOR_REL}, [epics major release]) + AC_DEFINE_UNQUOTED(EPICS_MINOR, ${EPICS_MINOR_REL}, [epics minor release]) + AC_DEFINE_UNQUOTED(EPICS_PATCH, ${EPICS_PATCH_REL}, [epics patch release]) + fi + fi + + + AC_LANG_POP +## +##-- end EPICS -- check header files and libs +##--------------------------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- BOOST -- path and options - +##-- Boost libraries are mainly header-only, i.e. they consist of header files +##-- containing templates and inline functions, and require no separately-compiled +##-- library binaries or special treatment when linking +## + BOOST_PREFIX="" + BOOST_INCL_PATH="" + BOOST_LIB_PATH="" + BOOST_OPTION="" + + AC_ARG_ENABLE( + [boost-inc], + AC_HELP_STRING([--enable-boost-inc], + [enable boost use [default=no]]), + [HAVE_BOOST_=true], + [HAVE_BOOST_=false]) + + AC_ARG_WITH( + boost-inc, + AC_HELP_STRING( + [--with-boost-inc = location of BOOST], + [prefix giving the boost base directory]), + [HAVE_BOOST_=true + BOOST_PREFIX=$withval + BOOST_INCL_PATH="-I"${BOOST_PREFIX}"/boost -I"${BOOST_PREFIX} + #BOOST_LIB_PATH=${BOOST_PREFIX}"/lib " + ]) + + + AC_ARG_ENABLE( + [boost-lib], + AC_HELP_STRING([--enable-boost-lib], + [enable boost lib use [default=no]]), + [HAVE_BOOST_LIB_=true], + [HAVE_BOOST_LIB_=false]) + + + AC_ARG_WITH( + boost-lib, + AC_HELP_STRING( + [--with-boost-lib = location of BOOST], + [prefix giving the boost base directory]), + [HAVE_BOOST_LIB=true + BOOST_LIB_PATH=$withval + ]) + +## +##-- end BOOST -- path and options +##--------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- BOOST -- check header files (and lib if selected) only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_BOOST_LIB_ == true ; then + + + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${BOOST_LIB_PATH}" -Wl,-rpath,"${BOOST_LIB_PATH} + echo ${BOOST_LIB_PATH} + echo ${LDFLAGS} + + + if test x$HAVE_BOOST_LIB_ == xtrue ; then + AC_CHECK_LIB(boost_thread,[main], + [], + [HAVE_BOOST_LIB=false + AC_MSG_WARN(boost_thread not found!)]) + fi + + + # If all checks are OK we add boost lib version to the FLAGS. + if test x$HAVE_BOOST_LIB_ != xtrue ; then + + LDFLAGS=${TEMP_LDFLAGS} + + + fi + + if test x$HAVE_BOOST_LIB_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_BOOST_THREAD, 1, [boost thread library]) + fi + + +fi + +#if test x$HAVE_BOOST_LIB_ != xtrue ; then +# AC_DEFINE_UNQUOTED(HAVE_LINUX, 1, [linux dependency (sleep)]) +# fi + + + +if test $HAVE_BOOST_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${BOOST_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${BOOST_INCL_PATH} + + echo ${BOOST_INCL_PATH} + echo ${CPPFLAGS} + + fi + + if test x$HAVE_BOOST_ == xtrue ; then + AC_CHECK_HEADERS( + [multi_index_container.hpp], + [HAVE_BOOST_=true], + [HAVE_BOOST_=false + AC_MSG_WARN(multi_index_container.hpp not found!)], + []) + fi + + if test x$HAVE_BOOST_ != xtrue ; then + if test "${BOOST_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + echo ${CPPFLAGS} + fi + fi + + if test x$HAVE_BOOST_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_BOOST, 1, [Availability of boost]) + + fi + +fi + + AC_LANG_POP +## +##-- end BOOST-- check header files only +##----------------------------- + + +##--------------------------------------------------------------------------- +##-- Qt4 -- path and options +## + QT4_PREFIX="" + QT4_INCL_PATH="" + QT4_LIB_PATH="" + + AC_ARG_ENABLE( + [qt4-inc], + AC_HELP_STRING([--enable-qt4-inc], + [enable Qt version 4 use [default=no]]), + [HAVE_QT4_=true], + [HAVE_QT4_=false]) + + + AC_ARG_ENABLE( + [qt4-lib], + AC_HELP_STRING([--enable-qt4-lib], + [enable Qt version 4 use [default=no]]), + [HAVE_QT4_=true], + [HAVE_QT4_=false]) + +#Only if enable flag is set + + if test $HAVE_QT4_ == true ; then + + AC_ARG_WITH( + qt4-inc, + AC_HELP_STRING([--with-qt4-inc=PREFIX], + [prefix, parent directory where the Qt version 4 library is installed]), + [HAVE_QT4_=true + QT4_PREFIX=$withval + QT4_INCL_PATH=${QT4_INCL_PATH}" -I"${QT4_PREFIX}"/QtCore " + QT4_INCL_PATH=${QT4_INCL_PATH}" -I"${QT4_PREFIX}"/QtXml " + ]) + + + AC_ARG_WITH( + qt4-lib, + AC_HELP_STRING([--with-qt4-lib=PREFIX], + [prefix, parent directory where the Qt version 4 library is installed]), + [HAVE_QT4_=true + QT4_LIB_PATH=$withval + QT4_LIB_PATH=${QT4_LIB_PATH} + ]) + + fi + +## +##--------------------------------------------------------------------------- + + + +##--------------------------------------------------------------------------- +##-- Qt version 4 -- check header files and libs +## + AC_LANG_PUSH([C++]) + + if test $HAVE_QT4_ == true ; then + + # Change flags: if all tests are successfull, accept this changes; if + # the tests are not successfull, use the old flags. + if test "${QT4_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${QT4_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${QT4_LIB_PATH}" -Wl,-rpath,"${QT4_LIB_PATH} + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_CHECK_HEADERS( + [qxml.h], + [HAVE_QT4_=true], + [HAVE_QT4_=false + AC_MSG_WARN(qxml.h not found!)], + []) + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_CHECK_LIB(QtCore,[main], + [], + [HAVE_QT4_=false + AC_MSG_WARN(libQtCore not found!)]) + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_CHECK_LIB(QtXml,[main], + [], + [HAVE_QT4=false + AC_MSG_WARN(libQtXml not found!)]) + fi + + + # If all checks are OK we add Qt version 4 to the FLAGS. + if test x$HAVE_QT4_ != xtrue ; then + + if test "${QT4_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + fi + + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_QT4, 1,[Availability of Qt version 4 confirmed]) + fi + + fi + AC_LANG_POP +## +##-- end QT4 -- check header files and libs +##--------------------------------------------------------------------------- +##--------------------------------------------------------------------------- +##-- Python -- path and options - +##-- Python header files required for callback +## + + PYTHON_PREFIX="" + PYTHON_INCL_PATH="" + PYTHON_LIB_PATH="" + PYTHON_OPTION="" + + AC_ARG_ENABLE( + [python-inc], + AC_HELP_STRING([--enable-python-inc], + [enable python use [default=no]]), + [HAVE_PYTHON_=true], + [HAVE_PYTHON_=false]) + + AC_ARG_WITH( + python-inc, + AC_HELP_STRING( + [--with-python-inc = location of python], + [prefix giving the python base directory]), + [HAVE_PYTHON_=true + PYTHON_PREFIX=$withval + PYTHON_INCL_PATH="-I"${PYTHON_PREFIX} + ]) + + + AC_ARG_ENABLE( + [python-lib], + AC_HELP_STRING([--enable-python-lib], + [enable python use [default=no]]), + [HAVE_PYTHON_=true], + [HAVE_PYTHON_=false]) + + AC_ARG_WITH( + python-lib, + AC_HELP_STRING([--with-python-lib=PREFIX], + [prefix, parent directory where the python version library is installed]), + [HAVE_PYTHON_=true + PYTHON_LIB_PATH=$withval + PYTHON_LIB_PATH=${PYTHON_LIB_PATH} + ]) + +## +##-- end PYTHON -- path and options +##--------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- PYTHON -- check header files only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_PYTHON_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${PYTHON_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${PYTHON_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${PYTHON_LIB_PATH}" -Wl,-rpath,"${PYTHON_LIB_PATH} + echo ${PYTHON_INCL_PATH} + echo ${CPPFLAGS} + fi + + if test x$HAVE_PYTHON_ == xtrue ; then + AC_CHECK_HEADERS( + [Python.h], + [HAVE_PYTHON_=true], + [HAVE_PYTHON_=false + AC_MSG_WARN(Python.h not found!)], + []) + fi + + if test x$HAVE_PYTHON_ == xtrue ; then + AC_CHECK_LIB(python3.5m,[main], + [], + [HAVE_PYTHON=false + AC_MSG_WARN(libpython3.5m not found!)]) + fi + + + # If all checks are OK we add Qt version 4 to the FLAGS. + + if test x$HAVE_PYTHON_ != xtrue ; then + if test "${PYTHON_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + echo ${CPPFLAGS} + fi + fi + + + if test x$HAVE_PYTHON_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_PYTHON, 1, [Availability of python]) + ##_PYCAFE_EXT IF FLAG SET ELSE USE DEFAULT PYCAFE_API_H + AC_DEFINE_UNQUOTED(HAVE_PYCAFE_EXT, 0, [pycafe extern C]) + fi +fi + + AC_LANG_POP +## +##-- end PYTHON-- check header files only +##----------------------------- + + + + + +##--------------------------------------------------------------------------- +##--------------------------------------------------------------------------- +##-- Python2 -- path and options - +##-- Python2 header files required for callback +## + + PYTHON2_PREFIX="" + PYTHON2_INCL_PATH="" + PYTHON2_LIB_PATH="" + PYTHON2_OPTION="" + + AC_ARG_ENABLE( + [python2-inc], + AC_HELP_STRING([--enable-python2-inc], + [enable python2 use [default=no]]), + [HAVE_PYTHON2_=true], + [HAVE_PYTHON2_=false]) + + AC_ARG_WITH( + python2-inc, + AC_HELP_STRING( + [--with-python2-inc = location of python2], + [prefix giving the python2 base directory]), + [HAVE_PYTHON2_=true + PYTHON2_PREFIX=$withval + PYTHON2_INCL_PATH="-I"${PYTHON2_PREFIX} + ]) + + + AC_ARG_ENABLE( + [python2-lib], + AC_HELP_STRING([--enable-python2-lib], + [enable python2 use [default=no]]), + [HAVE_PYTHON2_=true], + [HAVE_PYTHON2_=false]) + + AC_ARG_WITH( + python2-lib, + AC_HELP_STRING([--with-python2-lib=PREFIX], + [prefix, parent directory where the python2 version library is installed]), + [HAVE_PYTHON2_=true + PYTHON2_LIB_PATH=$withval + PYTHON2_LIB_PATH=${PYTHON2_LIB_PATH} + ]) + +## +##-- end PYTHON2 -- path and options +##--------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- PYTHON2 -- check header files only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_PYTHON2_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${PYTHON2_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${PYTHON2_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${PYTHON2_LIB_PATH}" -Wl,-rpath,"${PYTHON2_LIB_PATH} + echo ${PYTHON2_INCL_PATH} + echo ${CPPFLAGS} + fi + + if test x$HAVE_PYTHON2_ == xtrue ; then + AC_CHECK_HEADERS( + [Python.h], + [HAVE_PYTHON2_=true], + [HAVE_PYTHON2_=false + AC_MSG_WARN(Python.h not found!)], + []) + fi + + if test x$HAVE_PYTHON2_ == xtrue ; then + AC_CHECK_LIB(python2.7,[main], + [], + [HAVE_PYTHON2=false + AC_MSG_WARN(libpython2.7 not found!)]) + fi + + + # If all checks are OK we add Qt version 4 to the FLAGS. + + if test x$HAVE_PYTHON2_ != xtrue ; then + if test "${PYTHON2_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + echo ${CPPFLAGS} + fi + fi + + + if test x$HAVE_PYTHON2_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_PYTHON, 1, [Availability of python2]) + ##_PYCAFE_EXT IF FLAG SET ELSE USE DEFAULT PYCAFE_API_H + AC_DEFINE_UNQUOTED(HAVE_PYCAFE_EXT, 0, [pycafe extern C]) + fi +fi + + AC_LANG_POP +## +##-- end PYTHON-- check header files only +##----------------------------- + + +CPPFLAGS=$CPPFLAGS +echo "REPORTING -> current CPPFLAGS = "$CPPFLAGS +LDFLAGS=$LDFLAGS +echo "REPORTING -> current LDFLAGS = "$LDFLAGS + +## +##-- end Qt Check +##-- + +# Generate makefiles + +AC_SUBST(AM_CPPFLAGS, $CPPFLAGS) +AC_SUBST(AM_LDFLAGS, $LDFLAGS) + +AM_CONDITIONAL(HAVE_PYTHON_, test x$HAVE_PYTHON_ == xtrue) +AM_CONDITIONAL(HAVE_PYCAFE_EXT, test x$HAVE_PYCAFE_EXT == xtrue) + +AC_CONFIG_FILES([makefile + src/makefile + include/makefile]) + +AC_OUTPUT diff --git a/configure6064z.ac b/configure6064z.ac new file mode 100644 index 0000000..e32e460 --- /dev/null +++ b/configure6064z.ac @@ -0,0 +1,1036 @@ +## CAFE (Channel Access interFacE) +## Author: Jan Chrin, GFA, PSI +## +## configure.ac is processed by autoconf +## +## output: configure.in file for building the cafe library +## + +# Standard macros +AC_PREREQ(2.63) +AC_COPYRIGHT([CAFE,Jan Chrin, 2013]) +AC_INIT([CAFE], [1.0.0], [Bug reports to: jan.chrin@psi.ch]) + +AC_CONFIG_AUX_DIR(./) + +AC_CONFIG_MACRO_DIR([m4]) +m4_pattern_allow([AC_CONFIG_MACRO]) + + +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([./include/cafe.h]) + +AC_LANG_CPLUSPLUS + +AC_CONFIG_HEADER([./include/config.h:./include/config.in]) +AC_PROG_CXX + +# library creation +AC_PROG_LIBTOOL +LT_INIT + + +AC_LANG([C++]) + + + +AC_DEFINE_UNQUOTED(HAVE_LINUX, 1, [linux dependency (sleep)]) + +CPPFLAGS=" -fexceptions -fPIC" +#CPPFLAGS=" -pg" +# provide include directories +AC_SUBST([CAFE_CPPFLAGS], '-I$(top_srcdir)/include ') + +##--------------------------------------------------------------------------- +##-- EPICS -- path and options +## + EPICS_PREFIX="" + EPICS_INCL_PATH="" + EPICS_LIB_PATH="" +## Add epics release + + EPICS_MAJOR_DEFAULT="3" + EPICS_MINOR_DEFAULT="14" + EPICS_PATCH_DEFAULT="12" + + EPICS_MAJOR_REL=${EPICS_MAJOR_DEFAULT} + EPICS_MINOR_REL=${EPICS_MINOR_DEFAULT} + EPICS_PATCH_REL=${EPICS_PATCH_DEFAULT} + + #overwrite default with actual if determined + if test "${CAFE_EPICS_V_MAJOR}" != ""; then + EPICS_MAJOR_REL=${CAFE_EPICS_V_MAJOR} + fi + if test "${CAFE_EPICS_V_MINOR}" != ""; then + EPICS_MINOR_REL=${CAFE_EPICS_V_MINOR} + fi + if test "${CAFE_EPICS_V_PATCH}" != ""; then + EPICS_PATCH_REL=${CAFE_EPICS_V_PATCH} + fi + + AC_ARG_ENABLE( + [epics], + AC_HELP_STRING([--enable-epics], + [enable epics use [default=no]]), + [HAVE_EPICS=true], + [HAVE_EPICS=false]) + + AC_ARG_WITH( + epics, + AC_HELP_STRING( + [--with-epics location of EPICS], + [prefix where the epics libraries and include files are to be found]), + [HAVE_EPICS=true + EPICS_PREFIX=$withval + EPICS_INCL_PATH="-I"${EPICS_PREFIX}"/include/ -I"${EPICS_PREFIX}"/include/os/Linux" + EPICS_LIB_PATH=${EPICS_PREFIX}"/lib/"${EPICS_HOST_ARCH}]) + + #echo "TEST ", $EPICS_LIB_PATH +## +##-- end EPICS -- path and options +##--------------------------------------------------------------------------- + + + +##=========================================================================== +##== Check for header files and libraries. +##=========================================================================== + + +##--------------------------------------------------------------------------- +##-- EPICS -- check header files and libs +## + AC_LANG_PUSH([C++]) + + if test $HAVE_EPICS == true; then + + # Change flags: if all tests are successfull, accept this changes; if + # the tests are not successfull, use the old flags. + if test "${EPICS_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${EPICS_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${EPICS_LIB_PATH}" -Wl,-rpath,"${EPICS_LIB_PATH} + fi + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_HEADERS( + [cadef.h], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(cadef.h not found!)], + []) + fi + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_HEADERS( + [epicsTypes.h], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(epicsTypes.h not found!)], + []) + fi + + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_LIB(ca,[main], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(libca either not found or not operational!)]) + fi + + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_LIB(Com,[main], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(libCom either not found or not operational!)]) + fi + + if test x$HAVE_EPICS == xtrue ; then + AC_CHECK_LIB(dl,[main], + [HAVE_EPICS=true], + [HAVE_EPICS=false + AC_MSG_WARN(libdl either not found or not operational!)]) + fi + + #echo " HAVE EPICS? " $HAVE_EPICS x$HAVE_EPICS + + # If all checks are OK we add rlog to the CXXFLAGS. + if test x$HAVE_EPICS != xtrue ; then + if test "${EPICS_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + fi + + fi + + echo "LDFLAGS__> $LDFLAGS " + + if test x$HAVE_EPICS == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_EPICS, ${EPICS_MAJOR_REL}.${EPICS_MINOR_REL}.${EPICS_PATCH_REL}, [epics version]) + AC_DEFINE_UNQUOTED(EPICS_MAJOR, ${EPICS_MAJOR_REL}, [epics major release]) + AC_DEFINE_UNQUOTED(EPICS_MINOR, ${EPICS_MINOR_REL}, [epics minor release]) + AC_DEFINE_UNQUOTED(EPICS_PATCH, ${EPICS_PATCH_REL}, [epics patch release]) + fi + fi + + + AC_LANG_POP +## +##-- end EPICS -- check header files and libs +##--------------------------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- BOOST -- path and options - +##-- Boost libraries are mainly header-only, i.e. they consist of header files +##-- containing templates and inline functions, and require no separately-compiled +##-- library binaries or special treatment when linking +## + BOOST_PREFIX="" + BOOST_INCL_PATH="" + BOOST_LIB_PATH="" + BOOST_OPTION="" + + AC_ARG_ENABLE( + [boost-inc], + AC_HELP_STRING([--enable-boost-inc], + [enable boost use [default=no]]), + [HAVE_BOOST_=true], + [HAVE_BOOST_=false]) + + AC_ARG_WITH( + boost-inc, + AC_HELP_STRING( + [--with-boost-inc = location of BOOST], + [prefix giving the boost base directory]), + [HAVE_BOOST_=true + BOOST_PREFIX=$withval + BOOST_INCL_PATH="-I"${BOOST_PREFIX}"/boost -I"${BOOST_PREFIX} + #BOOST_LIB_PATH=${BOOST_PREFIX}"/lib " + ]) + + + AC_ARG_ENABLE( + [boost-lib], + AC_HELP_STRING([--enable-boost-lib], + [enable boost lib use [default=no]]), + [HAVE_BOOST_LIB_=true], + [HAVE_BOOST_LIB_=false]) + + + AC_ARG_WITH( + boost-lib, + AC_HELP_STRING( + [--with-boost-lib = location of BOOST], + [prefix giving the boost base directory]), + [HAVE_BOOST_LIB=true + BOOST_LIB_PATH=$withval + ]) + +## +##-- end BOOST -- path and options +##--------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- BOOST -- check header files (and lib if selected) only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_BOOST_LIB_ == true ; then + + + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${BOOST_LIB_PATH}" -Wl,-rpath,"${BOOST_LIB_PATH} + echo ${BOOST_LIB_PATH} + echo ${LDFLAGS} + + + if test x$HAVE_BOOST_LIB_ == xtrue ; then + AC_CHECK_LIB(boost_thread,[main], + [], + [HAVE_BOOST_LIB=false + AC_MSG_WARN(boost_thread not found!)]) + fi + + + # If all checks are OK we add boost lib version to the FLAGS. + if test x$HAVE_BOOST_LIB_ != xtrue ; then + + LDFLAGS=${TEMP_LDFLAGS} + + + fi + + if test x$HAVE_BOOST_LIB_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_BOOST_THREAD, 1, [boost thread library]) + fi + + +fi + +#if test x$HAVE_BOOST_LIB_ != xtrue ; then +# AC_DEFINE_UNQUOTED(HAVE_LINUX, 1, [linux dependency (sleep)]) +# fi + + + +if test $HAVE_BOOST_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${BOOST_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${BOOST_INCL_PATH} + + echo ${BOOST_INCL_PATH} + echo ${CPPFLAGS} + + fi + + if test x$HAVE_BOOST_ == xtrue ; then + AC_CHECK_HEADERS( + [multi_index_container.hpp], + [HAVE_BOOST_=true], + [HAVE_BOOST_=false + AC_MSG_WARN(multi_index_container.hpp not found!)], + []) + fi + + if test x$HAVE_BOOST_ != xtrue ; then + if test "${BOOST_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + echo ${CPPFLAGS} + fi + fi + + if test x$HAVE_BOOST_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_BOOST, 1, [Availability of boost]) + + fi + +fi + + AC_LANG_POP +## +##-- end BOOST-- check header files only +##----------------------------- + + +##--------------------------------------------------------------------------- +##-- Qt4 -- path and options +## + QT4_PREFIX="" + QT4_INCL_PATH="" + QT4_LIB_PATH="" + + AC_ARG_ENABLE( + [qt4-inc], + AC_HELP_STRING([--enable-qt4-inc], + [enable Qt version 4 use [default=no]]), + [HAVE_QT4_=true], + [HAVE_QT4_=false]) + + + AC_ARG_ENABLE( + [qt4-lib], + AC_HELP_STRING([--enable-qt4-lib], + [enable Qt version 4 use [default=no]]), + [HAVE_QT4_=true], + [HAVE_QT4_=false]) + +#Only if enable flag is set + + if test $HAVE_QT4_ == true ; then + + AC_ARG_WITH( + qt4-inc, + AC_HELP_STRING([--with-qt4-inc=PREFIX], + [prefix, parent directory where the Qt version 4 library is installed]), + [HAVE_QT4_=true + QT4_PREFIX=$withval + QT4_INCL_PATH=${QT4_INCL_PATH}" -I"${QT4_PREFIX}"/QtCore " + QT4_INCL_PATH=${QT4_INCL_PATH}" -I"${QT4_PREFIX}"/QtXml " + ]) + + + AC_ARG_WITH( + qt4-lib, + AC_HELP_STRING([--with-qt4-lib=PREFIX], + [prefix, parent directory where the Qt version 4 library is installed]), + [HAVE_QT4_=true + QT4_LIB_PATH=$withval + QT4_LIB_PATH=${QT4_LIB_PATH} + ]) + + fi + +## +##--------------------------------------------------------------------------- + + + +##--------------------------------------------------------------------------- +##-- Qt version 4 -- check header files and libs +## + AC_LANG_PUSH([C++]) + + if test $HAVE_QT4_ == true ; then + + # Change flags: if all tests are successfull, accept this changes; if + # the tests are not successfull, use the old flags. + if test "${QT4_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${QT4_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${QT4_LIB_PATH}" -Wl,-rpath,"${QT4_LIB_PATH} + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_CHECK_HEADERS( + [qxml.h], + [HAVE_QT4_=true], + [HAVE_QT4_=false + AC_MSG_WARN(qxml.h not found!)], + []) + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_CHECK_LIB(QtCore,[main], + [], + [HAVE_QT4_=false + AC_MSG_WARN(libQtCore not found!)]) + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_CHECK_LIB(QtXml,[main], + [], + [HAVE_QT4=false + AC_MSG_WARN(libQtXml not found!)]) + fi + + + # If all checks are OK we add Qt version 4 to the FLAGS. + if test x$HAVE_QT4_ != xtrue ; then + + if test "${QT4_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + fi + + fi + + if test x$HAVE_QT4_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_QT4, 1,[Availability of Qt version 4 confirmed]) + fi + + fi + AC_LANG_POP +## +##-- end QT4 -- check header files and libs + + +##--------------------------------------------------------------------------- +##--------------------------------------------------------------------------- +##-- Zeromq -- path and options - +##-- Zeromq header files required +## + + ZEROMQ_PREFIX="" + ZEROMQ_INCL_PATH="" + ZEROMQ_LIB_PATH="" + ZEROMQ_OPTION="" + + AC_ARG_ENABLE( + [zeromq-inc], + AC_HELP_STRING([--enable-zeromq-inc], + [enable zeromq use [default=no]]), + [HAVE_ZEROMQ_=true], + [HAVE_ZEROMQ_=false]) + + AC_ARG_WITH( + zeromq-inc, + AC_HELP_STRING( + [--with-zeromq-inc = location of zeromq], + [prefix giving the zeromq base directory]), + [HAVE_ZEROMQ_=true + ZEROMQ_PREFIX=$withval + ZEROMQ_INCL_PATH="-I"${ZEROMQ_PREFIX} + ]) + + + AC_ARG_ENABLE( + [zeromq-lib], + AC_HELP_STRING([--enable-zeromq-lib], + [enable zeromq use [default=no]]), + [HAVE_ZEROMQ_=true], + [HAVE_ZEROMQ_=false]) + + AC_ARG_WITH( + zeromq-lib, + AC_HELP_STRING([--with-zeromq-lib=PREFIX], + [prefix, parent directory where the zeromq version library is installed]), + [HAVE_ZEROMQ_=true + ZEROMQ_LIB_PATH=$withval + ZEROMQ_LIB_PATH=${ZEROMQ_LIB_PATH} + ]) + +## +##-- end ZEROMQ -- path and options +##--------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- ZEROMQ -- check header files and library +## + AC_LANG_PUSH([C++]) + +if test $HAVE_ZEROMQ_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${ZEROMQ_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${ZEROMQ_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${ZEROMQ_LIB_PATH}" -Wl,-rpath,"${ZEROMQ_LIB_PATH} + echo ${ZEROMQ_INCL_PATH} + echo ${CPPFLAGS} + fi + + if test x$HAVE_ZEROMQ_ == xtrue ; then + AC_CHECK_HEADERS( + [zmq.h], + [HAVE_ZEROMQ_=true], + [HAVE_ZEROMQ_=false + AC_MSG_WARN(zmq.h not found!)], + []) + fi + + if test x$HAVE_ZEROMQ_ == xtrue ; then + AC_CHECK_LIB(zmq,[main], + [], + [HAVE_ZEROMQ=false + AC_MSG_WARN(libzmq not found!)]) + fi + + + # If all checks are OK we add Zeromq to the FLAGS. + + if test x$HAVE_ZEROMQ_ != xtrue ; then + if test "${ZEROMQ_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + echo ${CPPFLAGS} + fi + fi + + + if test x$HAVE_ZEROMQ_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_ZEROMQ, 1, [Availability of zeromq]) + + fi +fi + + AC_LANG_POP +## +##-- end ZEROMQ-- check header files and lib +##----------------------------- + + + + +##--------------------------------------------------------------------------- +##--------------------------------------------------------------------------- +##-- JSON -- path and options - +##-- JSON header files required +## + + JSON_PREFIX="" + JSON_INCL_PATH="" + JSON_LIB_PATH="" + JSON_OPTION="" + + AC_ARG_ENABLE( + [json-inc], + AC_HELP_STRING([--enable-json-inc], + [enable json use [default=no]]), + [HAVE_JSON_=true], + [HAVE_JSON_=false]) + + AC_ARG_WITH( + json-inc, + AC_HELP_STRING( + [--with-json-inc = location of json], + [prefix giving the json base directory]), + [HAVE_JSON_=true + JSON_PREFIX=$withval + JSON_INCL_PATH="-I"${JSON_PREFIX} + ]) + + + AC_ARG_ENABLE( + [json-lib], + AC_HELP_STRING([--enable-json-lib], + [enable json use [default=no]]), + [HAVE_JSON_=true], + [HAVE_JSON_=false]) + + AC_ARG_WITH( + json-lib, + AC_HELP_STRING([--with-json-lib=PREFIX], + [prefix, parent directory where the json version library is installed]), + [HAVE_JSON_=true + JSON_LIB_PATH=$withval + JSON_LIB_PATH=${JSON_LIB_PATH} + ]) + +## +##-- end JSON -- path and options +##--------------------------------------------------------- + + + + +##--------------------------------------------------------------------------- +##-- JSON -- check header files only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_JSON_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${JSON_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${JSON_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${JSON_LIB_PATH}" -Wl,-rpath,"${JSON_LIB_PATH} + echo ${JSON_INCL_PATH} + echo ${CPPFLAGS} + fi + + if test x$HAVE_JSON_ == xtrue ; then + AC_CHECK_HEADERS( + [json/json.h], + [HAVE_JSON_=true], + [HAVE_JSON_=false + AC_MSG_WARN(json.h not found!)], + []) + fi + + if test x$HAVE_JSON_ == xtrue ; then + AC_CHECK_LIB(json_linux-gcc-4.4.7_libmt,[main], + [], + [HAVE_JSON=false + AC_MSG_WARN(libjson_linux-gcc-4.4.7_libmt not found!)]) + fi + + + # If all checks are OK we add json to the FLAGS. + + if test x$HAVE_JSON_ != xtrue ; then + if test "${JSON_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + echo ${CPPFLAGS} + fi + fi + + + if test x$HAVE_JSON_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_JSON, 1, [Availability of json]) + fi +fi + + AC_LANG_POP +## +##-- end JSON-- check header files only +##----------------------------- + + + + + + + + + + + +##--------------------------------------------------------------------------- +##--------------------------------------------------------------------------- +##-- CURL -- path and options - +##-- CURL header files required +## + + CURL_PREFIX="" + CURL_INCL_PATH="" + CURL_LIB_PATH="" + CURL_OPTION="" + + AC_ARG_ENABLE( + [curl-inc], + AC_HELP_STRING([--enable-curl-inc], + [enable curl use [default=no]]), + [HAVE_CURL_=true], + [HAVE_CURL_=false]) + + AC_ARG_WITH( + curl-inc, + AC_HELP_STRING( + [--with-curl-inc = location of curl], + [prefix giving the curl base directory]), + [HAVE_CURL_=true + CURL_PREFIX=$withval + CURL_INCL_PATH="-I"${CURL_PREFIX} + ]) + + + AC_ARG_ENABLE( + [curl-lib], + AC_HELP_STRING([--enable-curl-lib], + [enable curl use [default=no]]), + [HAVE_CURL_=true], + [HAVE_CURL_=false]) + + AC_ARG_WITH( + curl-lib, + AC_HELP_STRING([--with-curl-lib=PREFIX], + [prefix, parent directory where the curl version library is installed]), + [HAVE_CURL_=true + CURL_LIB_PATH=$withval + CURL_LIB_PATH=${CURL_LIB_PATH} + ]) + +## +##-- end CURL -- path and options +##--------------------------------------------------------- + + + + + + +##--------------------------------------------------------------------------- +##-- CURL -- check header files only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_CURL_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${CURL_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${CURL_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${CURL_LIB_PATH}" -Wl,-rpath,"${CURL_LIB_PATH} + echo ${CURL_INCL_PATH} + echo ${CPPFLAGS} + fi + + if test x$HAVE_CURL_ == xtrue ; then + AC_CHECK_HEADERS( + [curl/curl.h], + [HAVE_CURL_=true], + [HAVE_CURL_=false + AC_MSG_WARN(curl/curl.h not found!)], + []) + fi + + if test x$HAVE_CURL_ == xtrue ; then + AC_CHECK_LIB(curl,[main], + [], + [HAVE_CURL=false + AC_MSG_WARN(libcurl not found!)]) + fi + + + # If all checks are OK we add curl to the FLAGS. + + if test x$HAVE_CURL_ != xtrue ; then + if test "${CURL_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + echo ${CPPFLAGS} + fi + fi + + + if test x$HAVE_CURL_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [Availability of curl]) + fi +fi + + AC_LANG_POP +## +##-- end CURL-- check header files only +##----------------------------- + + + + + +##--------------------------------------------------------------------------- +##--------------------------------------------------------------------------- +##-- Python -- path and options - +##-- Python header files required for callback +## + + PYTHON_PREFIX="" + PYTHON_INCL_PATH="" + PYTHON_LIB_PATH="" + PYTHON_OPTION="" + + AC_ARG_ENABLE( + [python-inc], + AC_HELP_STRING([--enable-python-inc], + [enable python use [default=no]]), + [HAVE_PYTHON_=true], + [HAVE_PYTHON_=false]) + + AC_ARG_WITH( + python-inc, + AC_HELP_STRING( + [--with-python-inc = location of python], + [prefix giving the python base directory]), + [HAVE_PYTHON_=true + PYTHON_PREFIX=$withval + PYTHON_INCL_PATH="-I"${PYTHON_PREFIX} + ]) + + + AC_ARG_ENABLE( + [python-lib], + AC_HELP_STRING([--enable-python-lib], + [enable python use [default=no]]), + [HAVE_PYTHON_=true], + [HAVE_PYTHON_=false]) + + AC_ARG_WITH( + python-lib, + AC_HELP_STRING([--with-python-lib=PREFIX], + [prefix, parent directory where the python version library is installed]), + [HAVE_PYTHON_=true + PYTHON_LIB_PATH=$withval + PYTHON_LIB_PATH=${PYTHON_LIB_PATH} + ]) + +## +##-- end PYTHON -- path and options +##--------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- PYTHON -- check header files only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_PYTHON_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${PYTHON_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${PYTHON_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${PYTHON_LIB_PATH}" -Wl,-rpath,"${PYTHON_LIB_PATH} + echo ${PYTHON_INCL_PATH} + echo ${CPPFLAGS} + fi + + if test x$HAVE_PYTHON_ == xtrue ; then + AC_CHECK_HEADERS( + [Python.h], + [HAVE_PYTHON_=true], + [HAVE_PYTHON_=false + AC_MSG_WARN(Python.h not found!)], + []) + fi + + if test x$HAVE_PYTHON_ == xtrue ; then + AC_CHECK_LIB(python3.5m,[main], + [], + [HAVE_PYTHON=false + AC_MSG_WARN(libpython3.5m not found!)]) + fi + + + # If all checks are OK we add Qt version 4 to the FLAGS. + + if test x$HAVE_PYTHON_ != xtrue ; then + if test "${PYTHON_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + echo ${CPPFLAGS} + fi + fi + + + if test x$HAVE_PYTHON_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_PYTHON, 1, [Availability of python]) + ##_PYCAFE_EXT IF FLAG SET ELSE USE DEFAULT PYCAFE_API_H + AC_DEFINE_UNQUOTED(HAVE_PYCAFE_EXT, 0, [pycafe extern C]) + fi +fi + + AC_LANG_POP +## +##-- end PYTHON-- check header files only +##----------------------------- + + + + + +##--------------------------------------------------------------------------- +##--------------------------------------------------------------------------- +##-- Python2 -- path and options - +##-- Python2 header files required for callback +## + + PYTHON2_PREFIX="" + PYTHON2_INCL_PATH="" + PYTHON2_LIB_PATH="" + PYTHON2_OPTION="" + + AC_ARG_ENABLE( + [python2-inc], + AC_HELP_STRING([--enable-python2-inc], + [enable python2 use [default=no]]), + [HAVE_PYTHON2_=true], + [HAVE_PYTHON2_=false]) + + AC_ARG_WITH( + python2-inc, + AC_HELP_STRING( + [--with-python2-inc = location of python2], + [prefix giving the python2 base directory]), + [HAVE_PYTHON2_=true + PYTHON2_PREFIX=$withval + PYTHON2_INCL_PATH="-I"${PYTHON2_PREFIX} + ]) + + + AC_ARG_ENABLE( + [python2-lib], + AC_HELP_STRING([--enable-python2-lib], + [enable python2 use [default=no]]), + [HAVE_PYTHON2_=true], + [HAVE_PYTHON2_=false]) + + AC_ARG_WITH( + python2-lib, + AC_HELP_STRING([--with-python2-lib=PREFIX], + [prefix, parent directory where the python2 version library is installed]), + [HAVE_PYTHON2_=true + PYTHON2_LIB_PATH=$withval + PYTHON2_LIB_PATH=${PYTHON2_LIB_PATH} + ]) + +## +##-- end PYTHON2 -- path and options +##--------------------------------------------------------- + + +##--------------------------------------------------------------------------- +##-- PYTHON2 -- check header files only +## + AC_LANG_PUSH([C++]) + +if test $HAVE_PYTHON2_ == true ; then + + # Change flags: if all tests are successful, accept these additions, + # else use the old flags. + if test "${PYTHON2_PREFIX}" != "" ; then + TEMP_CPPFLAGS=${CPPFLAGS} + CPPFLAGS=${CPPFLAGS}" "${PYTHON2_INCL_PATH} + TEMP_LDFLAGS=${LDFLAGS} + LDFLAGS=${LDFLAGS}" -L"${PYTHON2_LIB_PATH}" -Wl,-rpath,"${PYTHON2_LIB_PATH} + echo ${PYTHON2_INCL_PATH} + echo ${CPPFLAGS} + fi + + if test x$HAVE_PYTHON2_ == xtrue ; then + AC_CHECK_HEADERS( + [Python.h], + [HAVE_PYTHON2_=true], + [HAVE_PYTHON2_=false + AC_MSG_WARN(Python.h not found!)], + []) + fi + + if test x$HAVE_PYTHON2_ == xtrue ; then + AC_CHECK_LIB(python2.7,[main], + [], + [HAVE_PYTHON2=false + AC_MSG_WARN(libpython2.7 not found!)]) + fi + + + # If all checks are OK we add Qt version 4 to the FLAGS. + + if test x$HAVE_PYTHON2_ != xtrue ; then + if test "${PYTHON2_PREFIX}" != "" ; then + CPPFLAGS=${TEMP_CPPFLAGS} + LDFLAGS=${TEMP_LDFLAGS} + echo ${CPPFLAGS} + fi + fi + + + if test x$HAVE_PYTHON2_ == xtrue ; then + AC_DEFINE_UNQUOTED(HAVE_PYTHON, 1, [Availability of python2]) + ##_PYCAFE_EXT IF FLAG SET ELSE USE DEFAULT PYCAFE_API_H + AC_DEFINE_UNQUOTED(HAVE_PYCAFE_EXT, 0, [pycafe extern C]) + fi +fi + + AC_LANG_POP +## +##-- end PYTHON-- check header files only +##----------------------------- + + + + + + + + + + + + + + + + + +CPPFLAGS=$CPPFLAGS +echo "REPORTING -> current CPPFLAGS = "$CPPFLAGS +LDFLAGS=$LDFLAGS +echo "REPORTING -> current LDFLAGS = "$LDFLAGS + +## +##-- end Check +##-- + +# Generate makefiles + +AC_SUBST(AM_CPPFLAGS, $CPPFLAGS) +AC_SUBST(AM_LDFLAGS, $LDFLAGS) + +AM_CONDITIONAL(HAVE_PYTHON_, test x$HAVE_PYTHON_ == xtrue) +AM_CONDITIONAL(HAVE_PYCAFE_EXT, test x$HAVE_PYCAFE_EXT == xtrue) + +AM_CONDITIONAL(HAVE_ZEROMQ_, test x$HAVE_ZEROMQ_ == xtrue) + +AC_CONFIG_FILES([makefile + src/makefile + include/makefile]) + +AC_OUTPUT diff --git a/examples/cafeTest/bpmDisplaySFEnergyBunch1.xml b/examples/cafeTest/bpmDisplaySFEnergyBunch1.xml new file mode 100644 index 0000000..3c15d06 --- /dev/null +++ b/examples/cafeTest/bpmDisplaySFEnergyBunch1.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + BPM agent configuration + + cDBPM + X1 + CAFE_DOUBLE + + + cDBPM + Y1 + CAFE_DOUBLE + + + cDBPM + Q1 + CAFE_DOUBLE + + + cDBPM + X1-VALID + CAFE_DOUBLE + + + cDBPM + Q1-VALID + CAFE_DOUBLE + + + cDBPM + ENERGY + CAFE_DOUBLE + + + diff --git a/examples/cafeTest/cNodes.xml b/examples/cafeTest/cNodes.xml new file mode 120000 index 0000000..cc87b97 --- /dev/null +++ b/examples/cafeTest/cNodes.xml @@ -0,0 +1 @@ +outAramis.xml \ No newline at end of file diff --git a/examples/cafeTest/cSF_Aramis_bunch1.xml b/examples/cafeTest/cSF_Aramis_bunch1.xml new file mode 100644 index 0000000..bec66fa --- /dev/null +++ b/examples/cafeTest/cSF_Aramis_bunch1.xml @@ -0,0 +1,380 @@ + + + Collection of Nodes for SwissFEL + + X + Y + X0 + Y0 + REF-X + REF-Y + REFOFF-X + REFOFF-Y + REFORB-X + REFORB-Y + SET-GAIN + I + FB-STAT + FB-ENABLE + STAT + ENABLE + + + SINEG01-DBPM340 + + + SINSB01-DBPM150 + + + SINSB02-DBPM150 + + + SINLH01-DBPM060 + + + SINLH02-DBPM210 + + + SINLH02-DBPM240 + + + SINLH03-DBPM010 + + + SINLH03-DBPM050 + + + SINLH03-DBPM090 + + + SINSB03-DBPM120 + + + SINSB03-DBPM220 + + + SINSB04-DBPM120 + + + SINSB04-DBPM220 + + + SINSB05-DBPM120 + + + SINSB05-DBPM220 + + + SINXB01-DBPM120 + + + SINBC01-DBPM010 + + + SINBC01-DBPM030 + + + SINBC01-DBPM080 + + + SINBC01-DBPM100 + + + SINBC02-DBPM140 + + + SINBC02-DBPM320 + + + SINDI01-DBPM010 + + + SINDI01-DBPM060 + + + SINDI02-DBPM010 + + + SINDI02-DBPM040 + + + SINDI02-DBPM080 + + + S10CB01-DBPM220 + + + S10CB01-DBPM420 + + + S10CB02-DBPM220 + + + S10CB02-DBPM420 + + + S10BD01-DBPM020 + + + S10DI01-DBPM110 + + + S10CB03-DBPM220 + + + S10CB03-DBPM420 + + + S10CB04-DBPM220 + + + S10CB04-DBPM420 + + + S10CB05-DBPM220 + + + S10CB05-DBPM420 + + + S10CB06-DBPM220 + + + S10CB06-DBPM420 + + + S10CB07-DBPM220 + + + S10CB07-DBPM420 + + + S10CB08-DBPM220 + + + S10CB08-DBPM420 + + + S10CB09-DBPM220 + + + S10BC01-DBPM010 + + + S10BC01-DBPM050 + + + S10BC01-DBPM090 + + + S10BC02-DBPM140 + + + S10BC02-DBPM320 + + + S10MA01-DBPM010 + + + S10MA01-DBPM060 + + + S10MA01-DBPM120 + + + S20CB01-DBPM420 + + + S20CB02-DBPM420 + + + S20CB03-DBPM420 + + + S20SY01-DBPM010 + + + S20SY01-DBPM040 + + + S20SY01-DBPM060 + + + S20SY02-DBPM080 + + + S20SY02-DBPM120 + + + S20SY02-DBPM150 + + + S20SY03-DBPM010 + + + S20SY03-DBPM040 + + + S20SY03-DBPM080 + + + S30CB01-DBPM420 + + + S30CB02-DBPM420 + + + S30CB03-DBPM420 + + + S30CB04-DBPM420 + + + S30CB05-DBPM420 + + + S30CB06-DBPM420 + + + S30CB07-DBPM420 + + + S30CB08-DBPM420 + + + S30CB09-DBPM420 + + + S30CB10-DBPM420 + + + S30CB11-DBPM420 + + + S30CB12-DBPM420 + + + S30CB13-DBPM420 + + + S30CB14-DBPM420 + + + S30CB15-DBPM420 + + + SARCL01-DBPM010 + + + SARCL01-DBPM060 + + + SARCL01-DBPM120 + + + SARCL01-DBPM150 + + + SARCL02-DBPM110 + + + SARCL02-DBPM220 + + + SARCL02-DBPM260 + + + SARCL02-DBPM330 + + + SARCL02-DBPM470 + + + SARMA01-DBPM040 + + + SARMA01-DBPM100 + + + SARMA02-DBPM010 + + + SARMA02-DBPM020 + + + SARMA02-DBPM040 + + + SARMA02-DBPM110 + + + SARUN01-DBPM070 + + + SARUN02-DBPM070 + + + SARUN03-DBPM070 + + + SARUN04-DBPM070 + + + SARUN05-DBPM070 + + + SARUN06-DBPM070 + + + SARUN07-DBPM070 + + + SARUN08-DBPM070 + + + SARUN09-DBPM070 + + + SARUN10-DBPM070 + + + SARUN11-DBPM070 + + + SARUN12-DBPM070 + + + SARUN13-DBPM070 + + + SARUN14-DBPM070 + + + SARUN15-DBPM070 + + + SARUN16-DBPM070 + + + SARUN17-DBPM070 + + + SARUN18-DBPM070 + + + SARUN19-DBPM070 + + + SARUN20-DBPM070 + + + SARBD01-DBPM040 + + + SARBD02-DBPM010 + + + SARBD02-DBPM040 + + + diff --git a/examples/cafeTest/cafeTest b/examples/cafeTest/cafeTest new file mode 100755 index 0000000000000000000000000000000000000000..65d5de86554af94e76ecb562dc3e7f800dacec6e GIT binary patch literal 467193 zcmeFa349bq+CSa|(4Z(0Q4tR!;)(~5gb;!k;TTA`j07-%I=Ln!n9F2>0k0rNi7{(d zjUuiZZx*kpDXcWDXbEIEi3u_UdoG=VkKMA_&eA-);a*%-Z+)N z6!}YCTP3u*MoW~QxH4jtR79nSAM$#vkPw47R0`=z@!3a;{3))(T_T<8YFV-DPT?r6 zR=VVop2vDiUjHgV3l0`)6^@ce;o@YtIO$(q(`EYARq>-(=sZ@s9~+ediR2WzSd;j# zeI>tiq<`kkquDGKRD5Sacp7Sm31HjXTd!dCuQw;*Feh}X0;+yPrABSOmsCOh_MD)DSe{*M8zIC-!-BxCZ%X# z*@|9P^?)I9%cHZRXU9g@oY3RNJ}35%K660(ij}c34gLGZM@@J+x@l-sbacuoStnfo zX&dtRLq2QYsHY1 z>bO)3m2_xS%EW6%A9(H6eFj`T>)m6ct;3?1p*b`i)a$b$)@ZA``h;F5cvB8sUOlOQ zI{as^wo+o#w^`QnR!r|WD<<}Y>gb`c|t31wlualyY#*lfON<=Hpz5vk>RSIE!%7Q7kT2DXwMm zcR8*VI2TL#Qe3O#@1?k2j`IqfSK+M2Nyjpr%W+a9)q|2AntI`~yyP+>9T$ zNns_fx69wF%F+%kMjYX4@n(eR^$8=&NU?9cm(I;{7d|K zLjHaV*R}HZGq^r0f74|>&gTsIdHjCCkT>9WE6$Blw+YvmtZ=l3}2_yOlXasG=09KYh+gOj@RUO0Q>jK-;sKJxd$xc0?)2+l*Lj{Nk) z?--niN!Jp$K(IFH7849;V59*2{T<8h6}c_PlCI8Va)JDln`8NY|&JO$^eQhyq* z!*PzlITB|)&IFuvB;q<6XOfgjH^%s#EPs#1^-TGD9Ih!iC*YhYb(7?E3a(RePM7jb zT+fxi3Hv|LpGj=bm@S1$TXL z>Kn_hx-I7YSv&4~_RgLC;wRp>bjlN_4>^3o(-Ug{e%ln+oH@rPoZ~)!RqadtZy5Q- zYg-l{+&}5m!0100UtDtilC+E0zJ1G%$@9~ny!YWthP<_MQ&H>TX%ikf;g?-~-Wum# z^V}`p5A?PF<;6R1zU9XcT3^}z=*G^|?zkh+=i~a6x6V1Q_^dk~{BhfD=kCm#@TX}v z9Jp$6=C5Dhc1F*8o|wIU+fA3>P`CBn;ctz6d(q+1kEh*q?jfx^cIQ2H-`8UwEIK-) z@3R-Yw|@Q2_Z+x>#3?7=fB)Pow!O0DlOOuUe;YUC@K+uf5nDXw?4^&N{C@w#>P~&5 z*S&AQ`_!`cCrp`m`X3LtWbo{#t{m3<$)NPaS7(nNcj0R-+wRPL;pL~ZzDd}yZPn79 z(Sha9Ui9oYAFTOt+m&;Q&-!*u>zVBtJM(&eGhp-x-(tUK#G4Jf9{PH0)UMrmN4zok zpt^C_Y}vf*ptoL|@?h0O*SlZcd_dE48DIQ<@*8uekDcJY^y23R75p^s{Chr2zwy*J zKD&R_C$0zIe)q6{yypJLS%YTY{btLyul|~N?I($sE_-oa@mWR3J$bro=YY}oC%oCv zuk+6B@tYp1-L-jI$LSLfS~B}>#P!`e_fNM^?*H1vYqq%F8`kgid6}{It-Y{d%JF}` z{lyR6Kc4t-UZ0K=F1zf&kpr$cbpG_Q#cSTa{E-pfv$w3h_M5~V&pq(Wi$~AAeZf7S zJ)3vQ4bN}C^Y@!?`MGS%M}x=RI^fol*opVOy?cl6$9bt`*LwZ49`>F$`JwCu|46U; zseIJPq(AIBcv*vc$Nj}0eEIf{Lr3k&{q}`(4_kTCmGxCgS8a;xHS^@Y?h|^?x%Go9 z7d(H;mQmL=zEt&9)3T-KZ|pVX++BBWFZVrE8~8Ehv-G1*|KRHR!|pk5$c%LX@7H%9 z`N>Wg3N zJNwtxs2e)RkI1dKK02!By=@KAxBp!BW8#0!IBey2m!IO3re9*3_{z(Jkz8Tv*V9K7J z*H?VrbIi3nmY$z8<*DMBS$BS&@`em2SvyNEVcjAg)-d%ss+gr|lD*4x!&U!xZ z&t1#@IpWU89>~cX8948ad0XB%IHlKNPp=GgT=C78+HpOvu6cjq$Jq}Je>8UZIgea5 zJMo*bqYvz#^xY*fvyPtr1uOAn|e;N`P4yQ0eI&X@g@5l|0 zGdn{1Pl}+gjG({&fbjSFa;n-O@WM@av+`0%{qBKW6i zWVrl1GD12ZLq_MU;AWmy!WFY zCY4wzcX6skC*zsIfR3C!#|}+jkr8HSKud~DEuEJ zT{mY5{h+^y^h}rf$1fE6mam0g`JX#e=&!#==+T_{$e$+khi(-5RH+{f9)}@!V>2;u z;86PG(D4!9Pn(4QNz(rlQor<5p+8gV+h+*>LuJ0Hbgo4IKsYaL9M3*SNdIGJ3H@}* zSEaKuQ|RZ)bRH}H-<&JzTUOm;GlZ&@fSJHHb0yqHR3V|c$A(LGRSeDIQZBh^SNQ3 z(93A8yG{`J?b!nVkJA5{*+PHhM?$aa=dH+C;&shuLO(?MKky=#ejnA9I6>t}+@XPCi!e1hPF|8Xk<;&_?=V*L{RSd8`Uo&s6! zQf;joBK%LjL&PhayLFAshgIJToKZbQh+jaE@I(8P1K^GHH+Y4Awcd4ehR`1n!uKjH zx0C-7FN%22mI?Y3;w8Q@l5dREUn1M@qHl!%SgC(T*8kxPh5jt5|BLLG?teFhHL85u z=Zknl`>S6D2>q^A!TE6FJfRQmXO7Gk`q2L52xK7D=Z-nS?P~%0TjKkU?4L(PiG;Su zdewKXhkL(sWN6CCUT9*5hvV2EK|6b%Ljk9fQ6oPPw zlld9i9&bEd;GZhnFTC;bJ_>^JVU`>hRQ<`GD)gc4_xd!U|Dagpo9aJleU$3M>+^&A zv14Wn|3$L?tNhQD^)|F!cw~DCZAXvGaw(Agn5qvK$@=_p50RcUq=Sy69GU;Jzg78v z2(q2{Ru2&Q-zdCW*UNt6ud+T%wN)eYVXBN*jn}JWzf>W|S;cFu9Phj|VZniF%*Ua! z-&-a7F_q8PN?x(Dy(@iZib!YcHc=l`z4DzS^r7t~J5lI|$$nVX=bL5zhqj{`sJCnv zN&94=Oy|F3Ia+f?IjVK~uhF0=-$Ls-?!K|UT;`7&kFG-hK>pYNQRG9R#2<(bob;jf zu$Rn-o%4kMQ>6cKGM_{1+lkUH3awYwGM%f2iF|t>;px~T`+>ExKT+kCJYS?|qqN6{ z2=CUiqlNy1cu`N#Z21^1aYF0ic-bxn$$U^a3(!Fk-;!a$_3dJbA6jppkT|PlJyG`3 z0NGv^$?-+$*JKI&6xqM2`Z++>!?m&>Q~7y`%(qw9h;KiVp9!@Ce>_jb8*10BkodD66zNps_3vdpU;MVv|6Qi% zuqe_0RLlNnrqox$8}SNlM_0j}`m3gp@nVbYPp*{p&?|99p}i2!#{F+)zxR=xcMK8Ut=$Mn@g}_?$|bJ1aM&U9 z`AlgCJ|g`u$P)hBWIaLm#m9%T-}pxM|0+F?O1mXhwu=Pm{~c+EaR|f_2inD1Yc!m zmZHLw|4_T}@2J3}f9C~(L-+9LSR(tG4`sW^6>4jzY+s9HKBGAJc;O6zGi0a0QRBkv zvxPo%zBX8n3$OPTyi~va+*r%H2j$x=%U34HnsI`_x&I)6zeIK@n-3HE(Ee((oacu2 zSG}Zuc}TnHhYC;maMo7>U!~_16e#ICI#QVDCxWh32X9mlW97b-Bc#4l)`!RBJX)3e z?ab3o7W&ttg2#nSS>Lig6y>P;)wkui7TW(@DtS!^ zSszG|<4b72G*gZX*Gqc?)sK%%na~3S&lC|Xf7d~z^n|uY_h};kQ$qUl4B1X&L+qu=lGmZ{34B$bYqAA?XuB?# zb*(QNrB%MkgHCD$KR`>l}mCv=^&Rp$T05+_mO3{4X_y<~e)I6b6( zSP1^T(tiGz>~B#Ve6*m0V!KGT(_vD7N|eB_3Ryq=Ri+c0W7y}B(!Uq=jp|`&|MT8V zsh8@JEobX|Rb92Y|Shg;>mAap%E zMwZL3vOP|g@$Lpb zddepjWmi;qDy;M+X~kuwa26NH6SK=IDvLbsDIV|4>|&3hNvoKfU4$Jf=}TNyxiWyO zyu7qrYGyAf^C)>nX`Tt<&Mzz}G@t;UURqd!gg`l|FxN}brFlKY8Q${3l7&#tDJje? z&GWb?mzUbgb8{AXgx~RAZ@Ko1NZpf5%ZszUln=St`5wxFI4d{XT~=9vIP!Ax-Cj?X zmoz0r$~}K(;?#=LlF?vP>6sYsnwjAq%fFcfhxC->xeH4}yiSUDE!J@EyuxB~kB{?| z73NmVs6-rzMWwkH!%v7hsj@^mP@)Lhv)EJO1ynhw%w1Trm@`);RV!3dlV*9c^H6Xi z0WuUNKtWKV^NT7g3Mkd2tSDUS;U7S*^av4XqjO42E4=aX#g#?gLPV42sY=T8c(V(O z;*(3u5rqf5N$V~wE-Ol#nGxqsD)toTc*@hpOe`(Qt1R>`%FNE24ycSocTz!iNnVl1 zMMs7=vB*4otw_$8?LIL1aCIZGHjK2b$lSyFgOrH7TH zyx9xW#^x+>3-pUTO2N~_&APid{JR`#eR-)Oxa?FHKRolj4H^kC_p8Uxi5-G<=#Fe0cD#_S&azL zh)1EKBrSFqqAN+un1~t|AMYNs7@bCGd0ZNBU9RbcaqKnTs0ShyZd5w1x$$F5DvOHT z*_8{6(MH{6rA39gOI)s`;?g`6VA`lSD!7FnRa0hpP;D!`8QyGfWd-^%mn(kD=sFM7@dp%N;*PW}Fd{AxGN^cTRQ%@Dkk_ z^SQ<&LKVs&$^|0-%*Nm_e|B1Y^2G6zUFh6BW!^$G4fNSw?#SXvkG8+qQ|?V0pBU%P zb&Xx<0b}Z{U5nyJk-K}+_}SxU&r5fu$Bzw?-E(H9oja3(5>mOhNc9wzdCC(K%Mji> zsjwoq6fG{->&X+&6{7zX9hK^vMpu-%b4x2RW}xc;LGFo>>I~VTCB)|zcycd>Yj$~g z_7ZoVr^tg$PYatEmy45=MCqKA?aiiMe>RV5F2} zBv2(4F(;(YrFc`(J9x?^m6;jd_=M6*ue&tgT}~BD>Ejd9xeCf`OG4JmE=5*7;Y?L; z(X52HaBd>^O_)&z3__02r6NDSz*91#6vbXzF8l&;)F=rU*%zZHQf7)qU}R-TMs_L1 z1TO2@b3?gDC?DZ{CUV5gKdB`Q_grr5q7CGsYshoC&FW$tm?85T2X>dRh>Vg?7vu0ws2hbwRQ2dB1Cp-6IQJc$!qbp&Q ztmf3T(1BpoEJs~kSV2@Xyn7RGQeg?q8Lw;BG_-C6>)K>XVOzif^hUYST*{WXi%S=K z+}UZ`QHwyIxDlM)y8~qTtTgK|Hc^Hx9c1YZM$i92_iH0B?%5~ zcY0{srRZ&A{y*Dx$7-wG{Ez{>t^p+P1%hWZCEG=8MJDvZ4WgH)m*p=N*sq>EY!Y;=&B%haIf{i|D zs?SVLpBrRF>j{BMVW`Q;1~?3)c*8(q^JsbwRw=v*NwB^1N{ijuxw%-(&@(q42$EG8 zGAq+(yVIv(qMwoE7UtN@_%YHRJQrq|umoVg~c8i_O3kSUzfQ>g!HNMTZ9r@ zq{>TJY#H7VM{SP=nZ+n#u?}U_s5Ind*PQE8X<+`Mp1{<#k% zKy}!qNzk;Z4RuV|J0-TN-YKef0mb{Y|quZ4riFVc(xNwlawKY5pS8H}!we zC|7a)?;GV@JbH%m?-}Lxin_?r2rJAVV8~%H3v0c(-uMb{8m+MguiVk1>lm#6(PEej_8P5>Nhn^L=OF1BIWQJylw!3?SJp2?b8yD_H0k<_o%Nj z(>xyB=Q1WJdo!m27%*@b5IxOe%rPl=LV}!FPVy`+%=OUjhr%3eH&8uM_?tdsfg^9@ z%p610r15h4kb(UO6DsrbJ@Tf{G;~^6yoz&=Qqi8DUFgLQi&>tE zvQpfF5TM#yLZZYBx*f&N2KWDNIQZ}6Ol@umGKco1k1{(ndvGvUMT6HU^-Y}6HA>zO zBGCSy?I!nX!$CUMmHuyTIG7n9W?w=47%T#cjRmyz%T-cY>{_%a{Jr+{@d-)pT z(r)X1rna|s+di2i|GjOp7t;;2!vEejQTc?-P(SzP2fRnx1N9%cZ4x}K3u!UtUZ(#c zlg+j<)RO;x+^#bzPHa#~Ll+aYImgi~3t2c)EAEjej0vOEt!I0BtoC2hRX$z67m^au6i2p=^&<0q&ZAC>8dJ|<# z9(LrFmoAZaKoZOayZAT^F+u@Ly~{%3EEvAH_aSe9*irpkcNZdCC~9!{?+%&BcA#zP z?bEm`j6bz&<$q#Bt%_?u*|-0{*depm!^M7{&0{}&zK8eZqYclV8?q5`KMoQ5V}&vq zE0nxiiVi&N3MKVJVzD6}T{!jEw7_6?U%JcU4ou!QMi0+oKDx8~NV{Ig6k|-tUg&WZ zI`?+}#vnDe+>?`ClwFeRap#woYpVa|ST&1oy^EDwT9lzZ#EG;6lGb@E(ihR4=>J@? z+gnEe&8-9|moQri_HNHF&HkMC{F)5*slt7!wMv;{s?w4^d z&9>Z8qJ-FWqbPQ9&*fT4&gu?Z*rz8)YBvur%J^o!?J zC=q83CSFp z4x3km?%W>V?0c{I`rd0kc89@IiFEHZU*9a)x~~fye!9&Xb?OOyvTP#A_N_T5<_WGPXb_9<(;f9>O zey&h-v!nB9J4KqevHX}g?M2nygzmD;ZcKJn|FN~CczTKv&!Eya<2=3dn3k8i z>>}Qe1DKpI?rp~C{u)EPu{C9HGc*_Y8$0(;P8_J!oUeB1W`1zyVNcD zR3bJZh)McbJeXTtSVB)@hFQxEE*Dwcp*tLeQ4>EJTO20J$1QooK~4^3@P4o-%mG8s zdK?yONA0ium%nMOvj;joc@23tgC6GeAQ3cq{eR@`2WkQJ-?lXDrBem@zi&|BmYynH zOgh!iz4;;Ls9|4nkRJM66czNp_gvIouh{+v4G8Wg)lMtk2Yag>_RS59N}n^A%JxW%y|p( zo|~mGw`fCd+RU+dNl{6qJGZI|Z@qwpfVcP*>1VFeXdTy{sA}q1Fvau}Pq8C;?83X`hH{ZxI#K#bZcI6Nt9fNUmy~)lMUXulK0Qv2-@BLe8AIMDchfQw-gr|*i#lBz zI_j-%(^y-Tot-Wq-UXmD0*@UQqliUWMXsWe>q$tfO4O|iD`L49s|qGw-G$^zwn(FD zVf)m_QJWOq+$^e=cs7=Y9wXuV&|F|Uvq7s<6~6TBP6xRiAsf|jbhmiP2$v6fOnL{13-1NVammt&9J^XVjqC#}*fUUnjqb04>#v=0C7#IrcMjGw zGqCE=wacGPZzqAhGeNX<8!nt@kP6f5yHqj!roiR`F3NH5E1l>f%;rv`6xFSWi^X_; zRWy3^o56*O2eiZXmSJYov$Th_< zW%eyiv~+COFkU_YKk>{u9@LI=)9b@REefvW``y-%#>Paqte275q7epn0o`W(Xr{^A zmAD(;n=Tmbd=wXSH&r}>{UqwR%1M;3GzDn{;Ai1oz?DOT>TtuDhg`YELIJJxMCi#P z*DZvJb7M^a+$(eO$U}u3A7@QNA3)u(!ESGDGSzR|L5mC1BJ>lu&Fatx#gE48-tbU_ zhjuN{5+U`jxU(6~YxwMra_2Q`IYZ@N)BHvmT~Gsw2#XZcm!cE-eq z;AkreVVAp9C$CrgRU>xiX2mZMX?Di+!8<{y#`kd$#z_!Jztj!r&_gBafP$cB1eIiCq~_FD}Ut9QEq+i(sx7( zp#~C|N@A%9RohHs~fku>}Lr_Fc zdpZ6^==)T9BgZT{ihY|y*aOTy_YIM)^Sykk4(nJne2V!CZ8@kAqo=%s7@26q;?hl6 zEL;S2L#j*DevF|GbHaphb3(lS)U1KwDp!QkqCNrTVXQQ>eUC@8c@0dM#@r>yS$CJA z-?YOcX9cwa)m4S5$jYf}FQzJEHw#YO*{L$3rM`WdV}^EAk(!1s8|NAk;f9Co1@<{I zN9)Zo%XQ|dDGug$RE{N=7N>LjiyS(%?&=cK^>VN4t{t?SX*engPq;Dh$8D$F%JL$* zHDmuN0Pu;LbzQB7n(D8=!$`Vgi8Naw&Hiul*>7pr)Roh6^b`ZQ)4^NoM z#{hEZIfpQdSy-8zrH$XQ$i%{2cPaW7yl5PMJ=w)+xl}{&wkmuAp&YLzsK7&TsCal1 z4z%Ee7w?x=xakFa*v;!9j`ZkWd{OB_AbI$66@0HQxe(r{kP_3dgrvrxjM5@>Uz2BL zlxE0uk$r?5mto5)%RTPJh2>tn zVhSGL*3Q$X@dM?^;W6~IB%ZU8*^NvER>aB| zIbmaHuTu`ckAJiqFW*Ls;&kTYWkx|6mX|Ghos0@y8!M32ND%<2h9gs{GLJQL8JUIs zOZ=LC_9M$?rl`nr35Q@rr4f(H8;wC*bJX^^{-9Cd9s2aPbnXLT=LNMC6#*L>22kRq z1=(UhvxuAb;czPGt(QWVuYd8AM(oND>F_VnS5X5LRh@o`8}{^zzwJWz<W~(mXB|psG5sUw%{WN z_`V7G#Jy+GwknG7-WJl)yVET~DK3M50+t`sDaNBK78M}HCOce;6D{0B!z+B}pclox zgK`uNYNR!?vZ8z>y@9@HB!4VsBy~L_5qf0C^rYcc$w}^{#4|>gmU%}m%+DT4kFJdr zAM}xz;rOr*el8`K;qfCzjffkbT~t<(Jv^R3?2y>8FmkB}Z%()bI~3v(Cd9R3A6Zh-7nm zi)eS8mpoZhCQfuC(bkmdX%i;86GkLpQw9Id%!EGCnwXh6enOfX%)}>+@S!QIr_~F8 z#n}tjp8QXJ^2l@{KbED!kYAx8KPo)^j$#QPZ(`p)`6_TItZ*g&B4%<}9 z%D;-Im(`=ozutz%GJf}9eC3}If?bu%-dxR)=IP>_?VLj8%e;1t+17}%H+}EzZ!U5!p&j}3El$gd#hL!QB?nv90oJ_* zw);~4R;O^U98}oHvU*!<4EMfW+!8Tu6Y{YuhbVd&L&lS$uc=$j1xiByH; z(Q4?QQA%86<#+c8r_|7^@9~j-fq~N?zjICcD-HkZ``4sb-xMV0)rS9j4F9c${vkuJ zzVAsm2}Zo?yMd&iZ|K!`x=H^J1Lt-5ok7w+Vd&NO5J^AVz_AvH@*@4EhW{p6jt4?# zdS7kmsfSZXv!PeLBe|_J^iecZPnmp+DKsw;B3jhQ8g_-`=u_++U*RvP+oT5DNNhCap6uQv4K z4Slnrf7sBkGxQS-eXF6LXy`W^`bmbq&Ct6HeY>HbZ0I`-{S-s*H}t87zSGdB8T#FZ z{uraaS<;@N{vV%$)!ZogU!b+H>kR!gqr938Jw6?+k9CIr zBCW-Dw+%f$QLK;D+kW408pq1sfNG8)P(9H6yB=;h@iRFzXlPMNxV0k^sWP$~% zS$>jas_ua@me-I>CRZSf<$FmcQ!9|p@+y+a#0sRad=trJS_R@*zMf<3 z7R%)%lZg=M{1=x$$z&P?I#|vjIiBP;mgkd9ra+*TT|GWBCJ;X~+$< zviugwG}H!~S$>sd8e#)YEN>*4hSop>%j-#|AvI9V@{=S_A-Rm@H6+sz8pvY#UXp3( z45YKXiewrZ11T)uL^2JDfjE}0Cz*!AKrG8wlT1TeAcp0oB-2n9uvji9nTD`H=TBVz zB-79p=wLaAWE!#pZ7k0xnTD!BE6cM;rXecO%<@!{X=n;Gu{?of8j=DHET2I#4Ml-! zmJ>*(At+GB@~I@#&=bgFc?iigKB@oMU6v;Gn z1Y%hJX*FaTG6ELMJ4vRYBGCCyE`O4HE6Ld;x3T;I$vGsqviugwxg zL@TwX)f=^^jfbcP^O%!b`&kBgtUi17qv&-ir#%;&o@XK0y%1BEZ68R|i$C{FUB10X z>e%**q51s=qc)~4Z|#v<+xrT5+B4u~_Eguql!Aq~?*;hTgQ8ooWmA5B{)m2q zuK@)LcXrmjh==0!_Fu;;q%C^GFvPQEPsf%`4GrXmB&DR*Ua>jV=W1t9K34}{>s*^t zYkmHgkQb@7uJ+XBSF~H+xv6#d3H76>f>3t|+2zL-rTgwf^W`5&34MWwX`qnv;7VGwbFw zBQ3~~_s9peclbalU(se&#=`~ZKL61iaARs+?+qBbQtM_kx5NrePLF>c+yfsWKEO30 zP@9DN7S$PiZb2@2rwF~z|HmIGj!g>t1$23-wS?Uh-C}B8B>-kLr`7%~t+ulz(~RXi z_}soEB#LuHDYin5(}hf+@>xxJi%KySzrhVfK*gZ*yIuHVjhWw2==_EsmEYSl8@BhL zk|d}OYYNTnzWaQy6y)Ma1A!tSkeB`@FIqu(_Tfpg2s zOD9?zXsy}5{D(bzTJDEPO=>X-WHXac_`TtB0l7RRy`4)!^TR3Ztv}WEI@dr7@*vmy zO_S<8$t^89idcA`RQox3ID#-=kucHFr`CQ<`d>(|5L*&WY*(>e%ya&a1%Y9~iNgxjV z*wp2_2lTt~D=L^e*Ra}+NOBu`F+uO-SR_Jm@cD-kwfaVKm(UHA&msgRy5~^x;A%~+ zuP0CIfr<=$ot#<@>tVILqYG{!MPH9DOhlB7a?yo!3_8s1N7ufcR{IizA@pvjrq_0) z=DxlCP^J5nybY1wIMEc(uoHV&!Y4`19F2B77>UVQ#v zp)#1W?o0BfnX4qcGu&jpmZQ<>dj^h1NnZ44h_zJM>0HsdejbwwWt}S~we}U!fTMt+ z(^ex0tA=qbBl!H8QwT{0cyp%_U^W8yTvW5Hz;*c3@`cWWLinqj^OeZz3%)f14Mw0k z*H@{z$VoG87k*07`26E08PVmK(S3%Z4j1x78S*HET<-d+2m5K)=stf{Ga$!q>UR@H z?S3_Lkso&6irn$}S3PRx?R>;*09*mb?MsY~?|NdCUMV`hD@dTp4JE&<({RZp7uE62 zHFM!;aB1n(*>wio>gIeTvg0$Eh>^wAOV4VuyCl4YDzA5FV>p4UdNi8J#H%QVz@&dg&>=3r%j^)pr=-b<#&LLR9<%@?BWb0oCp7B;V71`nLS1qoIW)4@dRLS5UN{+A zwxux+aA(cEH}}=ldpE1zoBL{vah$})e-M_7={`#pvlgj9hbmmp<|L5l^M89l536<) z7m#SJ11O{8WO*G3L5_c48zt9@ngr&xcM|h{*HE(*!_UdzpxR$<)Ztg4&~^A(5=tfA zM+i{W?z_oFRg#-XP?cm3RcN~oFNRy)oKFRhK4#gU4v%DRE_;dUY)CbZi)>yDrPx$D zjv}E(rtly$g};!nKxRv)nHf(}iOXs{1&QcdjbDU!S&i3z1sGM0{{+3P#&?;B*+2~Z z6T>@TV`^)PP8_Az6;qM+g{b

%SH)* zT`;`z-C)Dl3V7wRI2isD3BLoi2ONdCvE?HPKaAjy(?zR%$7}fQ!*wX1e-P9yegqW* z|1n<}_3&dvu>CB7G^6HI?}_WUa-Gti`eH}VwEAOvO&`0>dnjr|bZYG<{wA>9{Z@-@^n>{uT#-3kP)X0NEgGm^P$A@Nxhsueue9F@eb4bpS0@J!;f z@N03$qK&IBM++#Kf8%XYd)b0raT_)-?P2+|Kc)CLrPj6+nXz@~5RM*S`%YTz%S3kD zXH*ybX}RwNw#J~U)!tc!Ro|8rP4_K$&<(l~eZ+=Xq{n}75b7mkkf7Q-t0`!;4tkpz zbUuQjxXL8KaR|}Us=XGOUPlVAO{F5^di}&rAiZ3OKHL-nP>d9J;vO2|775oY&H}Er zR29|$6Zd@-WNKXv5u~hG3Afss8( z>7Dsp6vwBJc;wh1wTYH1&;-a5druiP7-N zgnRU>nL=qH|NkKWHEn{hxEO?45k$CYn~{aNKoo?RAWees8~7y&Z^a#8qy2cypu>pM zM$IYBbn8oQcDoyHx^*HyMU=O~7kE;&Bqmp3rzK_wA8E)RP?loY`U)g& zn0_YMTc|2_4hb-y|DrQ>4xI~A1v#W#Cc(v^dL|lSP#t;_;39`se`4g&#fZiTHb4Zk zbLcW1>=H9rVsNk>BRMuZhbHM@XPCi$0b5G591!9V3^hkqsjQ_s!)`kV4)u-f5B5DA zbcPKwGVJ4z4JP-%!Ok!Nh8lQ=&amULf{n=<2t%;i^(yRuAt>n*a zoby0XWbCQfpo)f|Bj2)tb4K#y&h^mEDsn~86!R(CP4$mUCfBfAbe?JA&IT?GI z&dC{Pb51fI`c^pToNNGqVtk7Uc0R!DoD^U_|27QuvT?o>%{i%Dwg@9YrMY!@NDhtB zX&!Dy(}_A_P`zCQvvbJO!G8G2p!#fZFs}$^=g=0S#a+P$GuYJ#X7t4OnJLL9x81q} zyv}r+8XWFo(`|%EO0}%c7vIMbG--HTzL1KHO%*3!@BhvARnOU@ zAny!<uB8+H(s#hzM(9ZHH6uVh2tFmY-~g*Eqz}431kT1L<>W@{UzCiN%2LeXqK2MaCx(C$Tla*%zqOwR^u031IjiZFynMkMs zq|`&9?h0gu0kW8z&wuUBK|o4f3ib9gRjevS&s?oN>lBIn_W8eSRBnM*F}+tVe}fBh zi$PSUz{N1NowBi}fhvr27v*!OmqOH(b#YiH9MZcuye%9U3fc2jEdVfdovCZgT@;t- zD>s=naV`WE6#_mb15VTdJ$AtB&45&&5s;IDfN?V5G#&7CJK%X{z)w+keKmeGWpsX4 z;8XmmV^Q2pV$vcT(t(K{4(DMtO<0LBy$PnAji(siR)=^K$zyNpR&bsO5H%QH_Z}Kj z2GUFwZt43vkItnO&yo5Z=#h>Z0w;e7=#6wBmvp2AlH(ENsG8<(2+NsV50!YnrA6fj zzdv7xBg;oMgF(&OI1ac->)~Q>b6~1MUizr{|~o!brbpJ^M4S= zO;zvqtGb43mPx%ROnhz9ZTC%G!>KNFQ5a0_cffG*s;=R<>w()hH+FSPsS??i>Fes2 zCEeDB30E!M4hR#UnxtO<>q~YhIzQEX{`J9D7q@gdB*dQB)lIDuWPRDyO<7I@PVO3C zgItK%{kyJi&C=~7!%Z%k$a!>qW*pihPpQXlvX_oLXolNA7waih=UngZ*+ct!Xti_s zSFyEMd{kT6zWj=hFxq~D%C_tZ_{VLxntwppFc2GK{3oLNt!w>LinTsE16yrKM?llj zbW-bGJLq?-{=KoK>B2@LZAO~l!0&+3)u}c3e~<)^$YSC!wy~GD+w4%T;3W-s^_3;iAB+F*n`9W zB1Ejk)V9^uXK|pK0s$eVCLyu1wq`X+n7;9)rhzV^^M2NdsJ_u~h((Wp#h%)>R1raK z2!1s%V3iX7ikcNBuFr2Ffx1S?*nIvkQCgx>1!nfa;!Qkp;hyvRE1bEs5qzCUKy6Js zN7l&7`kGdf1edP?qcROQoot8MMACsvGrVdp>lj|*`uvGVwarC<`uxY+T&~8{tK}@> z!mD$qbi>6$NSjMENw6vTQqyTC`Gg=YhQkVSaNyEma`6i;BDl{_g=KS5+F8)ba#?#| z5SI%tcP^K>ATG&*3oFsXktE7x4q)tZF&v&J2L~=Oz|iF~kl`gR_JRJ(`=2A`G1j(V@ za4CaV&4mpih3oV83gRL_VJG~gxy-_Ru4Nu^!Nx($|Ia1PTv~&;Y!+NtSzps^C;3~z z*jx;UOd{z}E=?wv)eJ9jeg0&m+HNlb)aM^!bGa52T5^aB-4^l>?}ke!!RvC_&5<>- z66>lYiR?cqh>PKH135TwX#<8Xmv)AixITZ;KTR$I)aRcIt*m3~QMFnwCN8wx;m@ve zE|*yJ@iv!XBw?z_mzo&52rlygW0#BJ&`J&tTxbl@T%t`}tTXI3xd>37|9WU8mv7MI zTNV=+bZC~p5wl#Uu`-?Db-846WR0v0+U`*g7@JE9c@rdek%I%5IC#}uk{MoZBk}p) z`O)MeK(W6QTFGSyak+-LV4$)5Td*6!fs3nJ6LGD;eu?T-Oi=BVzKYN`1;Zh}8wyz_ zg#tlA1o!z53!DAT#}VSU}{zm$Z@d z-_@Wp-?dU;`TQ3mb$a2$1t6b)s-57+kj$25O0b6#Jg3q*&pYe{(>}TmL;|yk``CF1 z3Rkx4?A?$qVg%pC#;#a2Ee&N6AWiU)9KXSTq*sDl2 z|K8a0CJKW*&G?JaT*PE$K2#zbC>ec;ssu=Z3*WuQQ#x`6!OZ0r5_I0MyfJR5*M~s zF9TaAF7(795-GV1BMH4cUux*-L&>GW$h7)K!{GyRaNt5uENU*%CNAusohBCn>hs?Z zt>p3;ZmhR_Ph8l-d;Ah-F6jiXxny!=jjTj3Pm(B?hX7-ji{Wr+H(cU?p}8b8yu^k5 zL%TBd-BkhV^S47QxopKf^Om293tM>G%AC1W6TIfKf+K5WCAxc(1eXs1V{)XQ=2F1$5*PMQ5ElW8c4u=rlDJs2!G$fnqq^bJOz@h^I*zQ7mAEfSlHk%Wh>PK{ zm>e9qGyp?$S;_Dc7xqu5SuO$;dqkm?EAWtP5S&0WVND^Ew1&qzbaQK)U9Jq9vTy_gCA~@_H+OVj(DD7&!wK4D{?zOiZ zN?h2&d#c!(OG*%zRKbOn^)+!emxlpkb1@wHcf%zX7`j}BF}%d}`FGMrL(N5i`urd9 zK0|s2C-6CLgSQMIE^Og_QRK{}jNo;-2+N|8mAI8|bNK`?HW$NTGLdvBmvoa$rr;ui z`~1HP;-a)MHkU!fWgv0E5|8CSrW-CzL0ndIWMNjR4iDneK;A^V3%l}NFGncp^F3Exm zD}z?49tVugC6>I2ayhaaE-~<`%Vi+L>s2b+Cv9^Ppgw;Gw2}+2QY8=<3^bO1J6_D< zWRGPLye^jljx5Y7)i%J`T++##;4+m+I+RNaylO6~46j$IP7UHBKz;rJHWyx{8be%Q z09gLP-Ee6jc+F)cM;2z4>Zl+t)#OcZxsn_lxRk-G=2FG*dPCnuezRNzsL!7Ytt=N_ zr8L%K2 zs@sbI#eD{7B^O?$8c$qc{9FF(@}0SK61?WJnp^~92~f`!K>!d z&hUDb>J{v}w7CdSJa-DMCm1+iYp|=nDcjP&9Nhf&CCE_a87l5(3 zhy^8HikL|x9m*xnkKIB0{b0QLFjKr4%bSE=R`1$x<&KP%UUl;Fp6oDL~=Z6Rg&*j_W4Dv`QrstXHWHpaiQ8IbxOSJ8ZiY3AR_M)MCpE+Km=3&RdHDTlP{4 zW{r_osjf#5dzEV0R~?{^RUB^Gbv1ke)DKxqh()=Ib6IxKD$X*9a-@yn3RW|aE_Jf` zil?RPgtE3KVryFh7zE;oSujyR#l}v3tCxK=f`1AyNYh)!h5ptY79FH?H4LdJv zhX={QflD>KYA!1nUgBc?_wObb0gCq|Kr6ZYek8c~iAyHho&T~6oVm0Syynu*ku|as zJ1Tsm!%hjzoI!{p)@TtslJ|9)t4QQCHBC6^zDgG(xL znNM7{&3EQP_iF5NNfumKi8(DvqFg=%jLpSxm_Q^Q$|VLEx?Bb_yu`)&Zx9y&iuGTc z%c;brkhm-$E=P64C5zy7xfF0@jjY7Z3z7tvenDIehsEUJz$FD3noBCfOI)n~VwbCJ zqYF^1|3WLv<)YKUg*u`pd5ujNAg;sL8=`?UzNn9=@E>~qbb7>`b&1Ex3*2qfCX-N`XE(MIu z#c=qT92~eb0Yh_H&F~Tz>%Z+L7Xj+?uZC7~dF51aX(leu6PKsXcjnSb@S4kRj;xWD zxOYa9;PNnFY%YdF|8BUn0Yh_XXLyN=^pb0z@>w@yg*#OnCr}i z-qK}r8AcNB$?>HohAx83CxEfJ7!H$(q(iw_z|dUy)n9mKmT|HE8^lFvV{9%Xh|9pa z;L<`|j_HO=I^pVa$t0=1k(Ib7$8mC>e0UHS!(k~oIB$m zztGBZ$r%PNRm6pCRR6hioXe$};5C;O99bhPVHT4l%4G^*>~b+29wP?_E?L0PTnZRo z;`;o*f7j$9K(YP{t>kj+$>6e%xX@z{{^hfsxik~J=CY0>Yh)$v$&n%Z@qTm&fgKR_$Fy!tzE*-cztBreZnICJSBc+JJnku|as_vA^^7-Jhk+^K1<;*4KN0ZAy zl5oGBFEtij1ea}qvAGxyQ;DQQxpbObb_*^dxX*uT5ErE#U~@?zE>*;36LA^b4VRQ4 zE~$bGD{)WG=5kaJ7sKI7a&X`h3k+Q@!x&!T;;G%Y%yJQ+SpS7qmP`InYA?j)CE}8C zo^!dB5xlNrRUBC(D>2U?NtDYpz}V$tI6O%X4qVcKp}Ax-yu|hSZ+g?@B0#bJ3$5g` z>O^qqBrY!#m+R7@8^LQX?HpMnD=~i|NpN`zFg6#%VNf?*nt`FY ztYdhIi}l|(OfCWx>%Y)SE>Xl~HgO3MmmM>mxmdeRF3}`m{=%1OHI2=4Qb2;!o&18puzCx8o&`(F~56T9IO7sMr5aA76pFC>X_IVOmU;czuM zIBqg{+!p%auJ|-P6k?8E{kHprGUz1J8?OGhI6@O5xlNr1squ;D=~i| zNpLwAFm|~Z4r|H5flCT7G?!F{m$*Lvt*@C}1SsCx0IlS5*I;n@19AC^xYSK|=F&j$ zn#)R#tdW(NzmO!jEC-Cu#c=qN92~fm0Yh`CVt9#*_cZ<0CSYhTs~KM6;yt6-d1%}G0@UaC zLo2x)KwLVA%QwX3yQ$7xItgBL+0BtPvJ&$bk_4CSfU&t44zq})L%Fm8Lvv|oc!`VW zD1*2NP@n%;o68w^kxt7I^T1^XaXGmgF0t5iZgUw%66P;_sfnSB;4(Ofi{WrBIXG~! zfT6iWo49yu3AU8l2T8!f|$ODAzzkmg)2=>)IKC6gm-WF_V=Bnd7V zfU(QPa9B?c4qW1Zp}8b8yu`&@RJWL11gOt{4YZQWz4(YoODb{smbl!Q>dd8@;5C;O z99bhPF@GURaJddJHW$O;8**^qk_8OSrGVijuFwDaW|NBm_4(I9E4jQk2wbX(%TD65 zX^JzKW`fsT)^TKwti=3&Bf1=HL?=(7m@^*9e}a97!GrZq(iy10z-4z%>@6wb;E_eSYdM+ND}5Re5tYMBDkCw#Kmy9o*W#wbeddt3oatK z&%fvulZ(>MhE~?G@`2zIGap>OCoXQ6bGf7haY+?iSc&t&OR0L6V6XeE~i@d2Wi6yov&ak+VtGnX=g*LAFlBWq+O<}W0Pa;XE1 z&BbuoNe&KN(t)A5WHP+O#e0ZfGPwv)?8Apva`^xsS86FEEr5YHT%L;~O8b2*f_tRybGiObIuoVm0S zyynu*k%>3PWBx*t;PM?{Y%Yewd?M*kF3rHuT-GtXe)s7aNVVPe1*p$I)aEh)+YVYb z5tn}wmyz9Yp|A7UT%t+B{Dm(yoi>+~gSZ$Dzb6L=E*&Npzu+Q*`}`#vO)g5C39YPS zi?QdU3#c3arvO^X<@8R$~4_lHjrl zFg6#%;nZ%plmSC?sbYAE>+>HJ#6^Jm{JS=2F8zs1I&t}hxa>K{nM*6dYc9NH22Zt% zIGgDrxcmqhn~ULa5s`E#mnL9nE~`ykpZ^@B+HU&-6kmg|xlG3PyOuu?mtTp?sBXA) z61?WJn`_1PauJ|De*?6V z3qKRpL0o!Z8`BvVtQE^GuWvFgBMm@+P>9=!Q!cylO55 z46mPwI`nyyivY!UR-V&b_?f6w;u1w%dUnI5ncy{-bsSlkXQF;S!{pLL-UOE%BI!^r z4e+YDtYmooOw!>uxQO6B|C(n_E=qd~w2})y6Xho^y@|`+$pE7&k%f6C>Mww?xnz+yQ7#GHa7l+(%_WoJ<+E1!E?y890qXPr>lw|3pNT3U zE(a2q1H0kUMDUu+YK|<-Gf{hzOfC)NO>oI4k`Cok4X>KZ3WnFuL`_Dj?Y1vK@zyw- z3qKRJlDI?@mot$Fr?%fl@S00IM;7Lps8K;&TFIN>vWgrWxHQA7=CY3A^)pdR*P2`e zsL!7Vt*m4GOjJ8@=|fyfM>}(|el@v7lN9dFJqrP2*Rf8U%j@Lez@@|F;ul;*aJ*CM zX_Jf6u7p-{;b)>^E&`W>h|7J6&RpVxxFicMti=3$qzp}aTGf@r1Wjb*=xEn4F1h2WQekQ7&xXd6f;}V?9rIp|{m(3hmm}jEK0LCtt zX7VPu+(ix!T$7flATBpx=I?(f z&Y4T>9+L}i4#)h3l-TD*7m?(<0b_G991iG)iv$qzk*hB;b)>& z5|^8a%ZDSKxug@kE|*M>EXWF_u+aGbpJ^mZfD@WhGjV0FVK9bPq;Ooo@Z*#Gyi$wh!- z{{ys=%Li%TQbk-+iOajEI&*0vc+F)sN7l$n-0>hul*?;?vCGA9NFp$xD2|qUiAy-zfU(QP zaQGuRIB@AOx%dSa5ghyf{$z4d+I(nb9a}sFT%IN_zb7u240GlZ7sMr5aA7583?zwi zDFlqo#c*gN2L~=Oz|iF~kl`gR_W!Lmxd>3~e}GnUSu+`2wh)(<#N~mLow;NYysl#f z99bhPamRxs!R1cC*jx;UUfpm>0fy$1%J32w`~My?xd>3~e}GnU`Pc<69}|}*;_|oO zIdf?sc+F)cN7l$n-0>huaCs9jHW$MonMgX6OBpaUmnw#rxOo0Mh>HNl{s)^&f8z2T zacL$lhjhcGmEbj(%^X=HE3spXB*CS35EsLth#VZaGyy|%SQxm@)9BCWbD8OEF+?;AlxKe z`#sOv*E4f+!uNlD|Gs`7KW*l$wf3{tv)A7H>~rRvH3xu8HM#VY%dJ~Sb4e23=A~Yo ztq>ue*y54may?)i7f(?-0helESS~dJuW|AG-_Lz63KY*jK&rXCG#gyvmsb zd7E6OO~9px@Rm!jI9nk?Jh8sfge* z>T?-WTvT&B|JUVnG140#)m(nFKe${;F2|C~?OQ~1sSR*RC@vzzb%x_|6JQ({PqEuuUwEYQ z@+@E+7f(@3k`Z}H0>g5t7kG_}=l=p+6eym5a9qAfF007pTja9I1YEiZZ@F}fvlSx5 z^$U*_myH5kJjG%vBDkc0VY##kyvEJtkNBCN7X^yvA0X9vIdore86=k`a+$k%bY2Ds zZ@I9-C+3R?as9$0#bq{NTwXjyHx&_FdVpcM^a{Mj#q)pH`dk!fE`JuJn#)D|fXgVk zG?UBH8PQx~Z~I(Id4%g1`O`Y;xGVvTp}uQ9c2ea$wlJR0zDr#q)nZ^|>fe z{KgNYn#Ge2EyAh)+o+ah!EE=JW^bq1B~P1Ddv!5L|$rvVYws( zUgP5VzW^5nn#+IAarrX2>_sjeaE=|C& zT$%-5il6exbX2~y4F2YZ6c$>eeaxh$)Q<}yln%VkWQtq>uu zUwEXroC_Go#ZwGX5y52u7?#VRz-wGQ|JUhrQJ{GK0aDH7o;|?jTyp6qmpi`@&86}k zpGy^waQz~GTFd!Iak(8Zj*F+5J^_~)Ff5l+9~aO6UFCC8pt=0>kZLY(><%thkV_A_ z3~w6EB}sUjmwIuwLWH<};gRCuuUwEXr%ms|gi>K(JB7#c?Ff5l&f!DZr z{%?iPMS-50GjueY=3mJLEDzE_ZJn&83`QM_DcvJi_&h{ArExkK%F% zU>p}uQ859RQJ>40;-Z@4`M)3eT#WQ3NHv$YcLtZTlfh+>TwectG?&@{7x}^n-@hm> z)sD+6fN@+r#XORX$V(+KY+kB-Ts;35;G#ft`Ar>{ZOLUjav36*Ehpg8M0lH*W^oo$ z@oTdHmj;@tgr%s6;F5%?FXRQzfr7pan!E|2Ci zKzPe#P@IKS{8|PW$0bWM#U)Qg1eYF|S}wf;Z!3QFclcZsXfFR7NHrI!_?00SsgiYn zSu~f}dp?&^9^v{${- z$wjJUZ8HIv2EyAh)+o+GDt>Jq;F6@7BDtK32rjiSwOkScZ!3PCa+#kO1)9qr3aQSE zRQ$@5i&V)vdZXyPbP(Qh=@e%n6~7JxjLS=kW{OKM6%kyTU~0KE3%srP)!FWIQJ}f} zMUZMPQt_+w6mXF$S?wD}bIB6ka_JXmAr-$`0pqyz&`fbzOGN~iE|^*_-2!hbe*NK6 zpNj&`0T0I$&zKbPBw!_%+bxb5WqE{|Tw)A{D=e$VIATJ-mK2mm$JiE_rblQt|74 zz&I`gG*et=PQWD#Q_H1a;BCdPsR1qu6!kwZwp^s*SH-E|vMt{>`(V9jF6Hn0Tq<~k z>lgXsSNwVlFpf)%dc~!lBqQ=N>T?-WTvT)X{w1PzbKgj}a$Kb1S1q|nW!xPn;8Gjl zl2BYki0@xq$lCIps4=|spcXT zzlO*~s+T=FC7R0s;VqXzaTZeXYZYJ|mn_W`m#PW4^uW||=@oce@vAhzMS-IJXN%<` z6~ES72rg2+?32mSTw-HBmr@?#`bGZu6~EpCjN>xuxEx245qTN%x#SfW)jXHq7g4*p zZ=~BgE_-Z=F}4M{NX4(6C*V>Y;8LTwh!EE=JW}01E5OB5bWjn&r5qSGFBJlBD}FUy z%$qCipq6H?7ZDt?_#E>iL9@pZAtXL_@Qw_N(gSxCjNhXLcb^w3Ok z*VHD2$Cy<7dWc-4;@6^2qPZjqZ}Ugg zyyem+&O$1FtpJSU(nK@GiKUnp~vf zSIGoih6r!DYg{kGzFYvbF*BnIc=Dq?&{ZGe5Dt^_I zi&XsD3qeH9{qhfeE)_h&^^5%RD}L=9;1Z)=ap|NYg3GASWlV8V%~AjQJfDk^o&>2L zV^Z;}ja;PS*XbWbbE#!mHZKVt;rkc)<5&DT6)iKUhg_uM*Y#u3T$%`PxipKjkcwYd1IBS_pqb(ln}ACarj|>+z}t#n zL(M)H1&a4yAk|!?;@1GVNX4&b-jC+eMR?1lTbzYd{CXTPj!Os46qnsdG9oW2m|8Av z0&gpRO%HHUpm_h~9Lq&2evOigRQ%dt0xkoDw_FCrSxCjNNdYcdnkg=gR77y;fvM%v zEAY1BR{~MHxvxO+{)^)x6~8JP!Q}(qyV&m^(Rqn|hgA{Hi4vsrYr~d(m8~16*np7ZKw6g-5FU7Xij` z@e~78L~tnwhRsWbz}t#nJxhEp3KZ|ZK&rV&#jn%IMJj&X^lmhl2EyAh)+o+GDt=uH z7{?_^GevUh1YBxiYPlo?-d6m2d9lw$f#UraNHrI!__dr|KIRyE_MK=h9fY@BI>lK? z#jhs;Q(V47MFf{Fm|8B~0^h2d;sPq0P z;VqXjaTZeXYcIgKybRGyap|HWg3AC*Etf%ow-vuqXZc(dDBgd8RCAGvUwLv_M=nd= zisn-JvCpN7N4S2GKe{rPyeoP-U>uin>J^u#sfgebgQ?|G>f_@5mot4X3KZ|ZK&rV& z#jo;3;35^jZXJ#0k|ey%OT9P?srYq0U>uiPnkg=&6L6`9spV25@V4StzRBmJK=J+y zq?(IV{Hh@rsrdEWo6%fSgtuJU#92tiuV(<`xHQpBaoLw7Bl6M!Q_H1M;BCdP838T| z6z{({E>iKUfn22G*R%<^^bp>1=@n-o6~8tJaOt9%;?hJ#1eXq&S}vUeZ!3N!&+zl2 zK=J+yq&hEB@vDPeq~cfnjp)1#5#Dmii?fi5U;6>Zsl;@3@paa^h$mklT2QVCO= zmnwm`6~ESg$LFFz@%{^>nu}EYD*qO^NX4%gN20kj5#ElmW^oo$@#|T@I4%t|Q+cT+ z$%wopVQRV53%srPRTiL9mDi%VG!Wj7 zu|{zgQt|6Kz&I{RnkkZVNHQWXwJ^0@5&~~4e$5PUQJ{GL#c`2}Usc}*7peHQ*#ulV z2yeM`inEZ4U(*6yQZ!RsnyHB3(gah>rCH!@#jpC){Jbboy#E5J&Wlw1I+$Ff;@A9F zqw|s_yyem_&O$1F#R22;(nB-FyyY?`&O$1FoeLPpWr${q%McY2Tn1ojxeN-tt@xEa)#su>@%{^>nu}EY zx{O?;;@6!oM{}uM=X0sz5w2h4k6-cYcEC6;<f_@5ms5N$3KZ|Z zK&rV&#jl&mMJj#`|5r4ZB;jpd>c!a#5#s$99;uLD1dQY2DH0?Zk(X*!K6aE26-}8{_Lrw3%7cjndLZA--1n+<2P~Z1b zMU`5|n8u7Q=+s)R07Zyjq3025pvfPZU@^4?0K};FrS`BaZlO ztrb2l-v9olKe-hs_P>zoxgvFvb|aT+a#;$tQCu1bpHTs%TN}k$NS&l5UZ>&LdugUd z*%~S$xYWYba!Clht&?=$2|gDEiu(7EYA#YINw_4)<&Ni~xpWZTa_JOjA$5{&1&qr} zie`#S`2<{=U~0KE3%sq9G0kMr}QK(YUYROdzNBz=usE+d!ue~Zpb<*3i4ibt5+ z^2e`}6bFpUOF8w5%WYIdaEZaxaw+w3@&5O*J{JXw{V$}Ni_}SyG1f^g%l;b8B}sUj zmwIs)QYYzLz&I|oG*euLsEFWF4O7ddM&NCor0g+17X^y_FQl5wOS7>i3zsf(x%1g* zE-AuWE^Xp0q)yW9fN@-!Xr{PKpMXmPOf8p2fwy&%-aXpqqCm0#g;aCd)N<(|m*K%^ zE|TzbV>NS&k?0pqxI(M)kkkYq$&I$&zKbPBw!lT;PpqCm0#bzBavMP6j?-$O2& zPrzk}@RmznoQ2d$+9bebfM$xz`BX%3$->lf=@)ogC+Rp`I=Jt;6)4{ShE(T8>Lke+ z%aY4se~HdZ`CC4h3LfD;vHbDtB+Uhk%S()U#ifUe2ri>OmoddfHOKqkNBLZg^gKv4 z7papZT>8nS_0Q2#&M~3TwbOkf=eY#ZCQmP?z!+d4@* z1h^9js{M7+2HHwP}ai5q+s{5A##&Pi!c`72f zlmo-&r9$9souvK+J{JXw_rD?4T%=BtjIoo*<^Ct5xik>oj#s3KZ{uL#p#4b&`ZjGr1i7M08$832(WKiL;P8NrwT( z%5^kZLYcCrReZMdZ@{$7n8<@AzD*c!cX0 z`Qz6~Y6XnrQck_%vX+VnE-{!|E~P#$e*fiApNj&;``?giE>b5+^3p~ws~(T$k|ey% zOT9P?sgra!U>uiPnkg=o6L6`9spV25@U~7;EWky9;{EUWmW$L$5-uI&^4=e!xughh zxwMJ1kUB}P1IBS_qM71y1W88Zr2(dvOQXQsI!U`BYPU~Tpm_h=agjPnGRCAv+N=q< z^bp>1=@n-ob&|FWaOt9%;?hP%1eXq&S}vUeZ|fvA&hxn_P`v*QsUBleCrP;6z`Pv) z`{=w35#Dmii?fhANp*m6c^ROY;&LAq5nQq`wOslI-quOF<`AEY0>%5^kZLYcCrQRw zH@RH#STvXNcYQ7uJi_&h{PF7~r2*r(#Hd$XMyZJ4GU{^~Q(RPY{Qk?qJ{Kds2U5*N z>Ldx59&&m3(P%EU0WJx}MTEG1aUtIi7{|p^%$$HrB`|DWssvu+;`d(yTofqY|DJ2P zNS!3%A~n)Jz!h24eyoY`c8oQPvyeJTZvn<}X`q?POFc_-;nAtCUug8%VXqnVlFx_1BAC+2E|!Oous1yLke+8z7ezk3@5cz2|c&E)@}6hI}r0 z#YHvG<)1#t=VGLNkZLYcCrP+SjkHG}j^L5MOF1xX zUMd9M)=4T2a8aOm|2uBENS!3%GQ_-mvO1be1L5r$YZPZ8b&}o#jN_7|nId@{Nk-(Q z7N(X7kk8 zvYLtrE?qFST)G9`)=9eYK%a{O#rxloYA#YINw`Rjw5uPC<}yln%VkWQh15y90x*ut z5X}^qF)AXs48YWK85DS1Cu#5ipNj&;``?giE>b5+-Mg5K`SSRxXfBoi@VQj+2-h$2 z$FGz0Fkl>)a_SYA9VXxsgQ?|G>f`3}8wR*2P`v*=+j5aQNitugM%ttaxFiX0^HML) zLh2-akoCFL(oAt_AjyclRKwJAsS$WvC#e=uyScAG@&32tB6X7FTq!luc1I9VdzcjA zEtfWN7E&i^#{icmnkg<JakEw{@l7*?|(l79~PSTqFeJ%lgXs*GYO5Fpf)%dc~!B0xqLImoddfHP7YC16+*s!~HB5 zsgopJq()lF1YBwZToQ_l2m^JJKDp25Qth~$LXr`Asf4M`OO?ReI!SX7wVN*r6z_jK zE>b5+xJZq(y%0py+;1Yh9b?VnETm4-&H*kBG*fx$q#}Y#5~h|*y};W#NzMEEToh<7 ze-fm6j7gm&;UYECPQN#rOBdlSmu_(uQYYzDz_>BiK{LhW4^%{ONx{@|X%l!`C+W6* zd@c$U?|(z8xk#NP;UYECuE#g9QF$34yyY?|&O+)WT@4t=B}+5KB{l(<9++A#y#jCR zBn|EDb5Wpp{~J=xMd~EUIwm#Jp1C`kOKi;NQpzJ-zsMiIPSWFmaa=|nm)%G*A}>Qe zm%QSln&bBm16+*s)4ePgsgopmks4_mOu(f&z@4DBk~eT)tIlp1Y75Y5Vm?=cR%0c8oQOvyeJTy937MB}p?y@){~4 zxYWYba!Clht&?m*eKxF}G(|LwR)oh0G%cXHWi0xp#w_*|-ZgzFdi zLkgYe}r6S|1LT&Ny6K_ z)Qhu_I!Sv0#^t4!W{OJ}6%kyjVQRV52)wP6l-kYbqCoNfH>8@2)JYO9QX_52Z=<=S z2yeNxiL;P8Nv8wGacQEN;_@^V5nLKzYPmEDyseY;yIp-Q3KZ{uL#nw*og^7!QX}ow z-$ZliA-v_%E6zgdBwY^}$EAyAic9GPTsmNCxpWG=t&^1B#pj|x@%}fYnv2v)lDxdZ zG4|XY(OiZIZ@J{fSxB9vX8_~44A4w**_R|E@{)zA<Xq6%kxUeJ*2)i)xPFKit{Ri;?aPsm_bk zNfItnBQ4$&otN4GmxSUXLR`PNkoNks4_)-X6_mfbf>fpg0Sulk_ZL9G5K36qj0(jL1t5Of8pQfwy&% zDg#^;DBk~eT%=BtaFH5mn@qqZ_L0w}lt;LJkw1Q&q>TbxMje;MR77wY^10*{7u6iU zf4HNc7bD#tQk@s6lO*RCsgXAKw&=W62e{NIE+WMB3y)Oy&jyUki>K(OB7#dfFl=5b z1m4z3YTLo*qCoNf3#6Kh)Jc-ONR70mzl`S6KzKXG8pT;iounmzaa@u#QzX|=5y7Pv zrj|=W;BB3x`?mMFC{Vor0;%RAb&`aO)JVJI7tvfg2yeM`inEY9Nw)&VaY@lkaVejG zOA|~jmu7*tb&^KE;&V};c>e`b%|+@Y2^Xo6_R6i%T(X3>T>8aXNS&nT0OPpy&`fce zLy{4B>4K@{(k<||PSVT(7X^yylO$ZEM%rc*a2X}MQXDWY zFXhxLF1Jw;!6gP$%ca!E#rrQ+J{JXw_g^5@T%=BttYcCmZP_i+T#|&hd8rp?A$5|@ z1&rfTOEbk~h>8d<)iAYOY6RZaNy={Lb5Wpp{{>RbMd~C87pakU=grYvQiQi$+QeB% zouu0V7tq9k|4>5ymY|Sa_JO!TPLY1z(s-L{TIhY>Lkg0ks4{6Przk}@Rmzn zoQ2d$+9bebfM$xz`BX%3$->lf=@)ogC+WCt{Jbboy#E5J&WqGZ5-w6B?XVl8^HTna z&!vJ#xPFm8ex0PbfN^<=QLni4P!Yjp)aNp$xTxlM|7E7n#YoSCRCAF!Ny0^Hq_zG$ znoDhfOG0rGA+BFs$V&m^xOj?}sfgfG2@IQ;DuK6kl2&i+b5Wpp{{>RbMd~C87pakU z_YKipnh0;lShF|_sgraEU>uhQnyI{0Ou!`xQ_H1Z;BB3xv8{YA3KZ|ZK&rV&oh0ER zHPT+cKAKAx;VqYLaTZc1=@q~@E*&&eT;`EvL|#%bwOrZ+-quOlA;3j};{6xLMd~C8 z7pal9ouq~>{k$kpy#E5J&WqGZ z5-w6Bt*$FNFR@R3E~Pxe^^5%R>ma^ceO)w{>HwD-#YKd;e&Lbo{$+r1Ts%ddiU=;{z_59#5O`ZBsecQfivq>_ zFOX_3QYT5cNR71ne-_Q9f$(;WHHx#4I!Si|#&Jo~Op%;10hd~sS}qBJw{?;}{<62Yd82(RmpqyyY?`&O+)W9R?Vemm!)dF1=Jla2bH9 z_FOX_3QYT6BA~n)h{Un-8lJGV!_2O)W2m^JJ?gotG zQcE+%rE&r;)iAYOY6RZaNs0xyC{Vor@Ldvlsgd^H)sbAJPLe995>_YaA873; zG&u^#lUqbO8hi?kih^pM%kPI^-B;m8x}BpSb&`aFlt$ZS0t!7g7e#fF_VDAkb&|R$ z9Y1)flO#o8;+={1co&P;q&Gv%!8%E2L!`$K?sw{%399~CXLO$rxqu7nB(v92IzHpqNjeTq zT%DwrwdINQ(tIKl&lBOzm7F5@+>))~@g{rO<0c;e@>>XRUsZL;GdmCBf)Ewn_c4T& zf~{Ld5MRsc@<81oKZ2I5c-j0ec-g$j%XH`E^L~&YFM|0N&K#bm1pNLd{c488TrZdSLAe~5KF7js~FX-Y&tSK9IqhC!I z-^O8Rx>#by5F3MbERn;E<4lQ<;cb_p-W&FXq5>jahlPdE$ zS6l5q?#7R5WYeGiq`FFZXYT?qT(jC~bhMe;8IL}s;@2qYx6%V`^WSZYkCH;!U3Kra zB`fsD(YEAfsip767FU$r6(4OGorKb08!4tUNN?m^$lq1+jZ;fUV^%wv+GCwI1c1~= zYWm`QH#${+N-W>@+NbOKdVX1p^#$V-gQTy)>b~Rac7o2Z(7bXnzMh~$o9aH6x{n*W zkLB*;bVk8ukJMJ^znf{88B~qi_vt0lUx`ez6wUFuwluNVgNwgPEFP5I72EeKi?>xe zu@SL8?H-TW)tX(hKHm+Cjg;U4D9=?sz2xOYrVb0({Cp<<@@Uzr$?5pVnfS*AoH6o7 zFF|Fs(2-|s{js9##TgR0p@fRAj=jq6JeN&D zRx>xOr$DDQySU7R1^W0l)*Ev;u`C&a7XQa+WyW!C5Jy9aH2vYIZVVqoqRz#tGb(HB z)~(U4MH%_-%SC<7VFmMFvHSGrgtNjdNH2MpicE^{=I;}Kx9rE+LS`~%>qb?3^;-s4 z>IEo6@q+3^I$2%Vir(}B|1>%|gpt4`&IT(R{f zo|42^CAz&H7ca`@HY}DLBC}zmVAU4?$^XJin$^mgP^O=!**y>^+T#PbCZ!9#FfE3D zUi+y750qod<&S(3HtB~@U2&c&+juG(jU0siUm`s)JH2{t`td~ih5Vb4&Pxx^J$ZHd zp}FZl2r4`@V`z^|Q^tvwv2{!4tRe&@wiqtQAlEJL$VditnIM8gmVTklwhIy`h@U zYwy0y0VPU0rZ8<-0j}WRRobd-W$IE`l|3+^1&Q|FufsCa%Cyc;=hKhmAK>h2uY&_A znc0l_I<(&VLrDAh9rL0N=hYB(-Duz25CIQ=JV6V*hW2(zX%uP{QC>}JE$sga;RfR zJo|V(15k^zWo=Rh|B^w~?QfFKCPF7Zm`SOa>rfH&5_Th&PweTY&%|GB1&^3niVv0i zfW@`0iXX7B*I~UnVrC^Pmp+kyyIq(8R+#;#FjM>2_P98!5KcphlmA55k73+^nP@&` z7^;eB%j)Df*BN@1<1=7BD}<@9HA=?V?|?4ZP!{QYqNJJw36ig$U?qAqopvcn;yh7O zqa};1WM3`$ww2Us$tzYeM@x>il7qD5cq@^Pg!gY+$r;+_L@R01lIyIbSxXMHl9ZMl zZY6D6QfDQXYROSnV&=^ioCU(POWWLPB|TcQ%1W|Y@~o8%XvtevGNdINtT4!fc!=Hy6cS%%YtnbH=D85uIG4S_=t4%y7 zhN}&Mnc-@~__eW6-=>Rx5w13UdV09pB%wN7-J^T^9lRqE!n;eW?+RCUX!TF=?OsT0 zGmt7SiN%!K>v1#gUQ354Q^s$Y(v0fXFlCc&d1IK;%$YsIlxB*p7p62b@|m`fXw3w^ zF-%#j16miRG|R)0VM?=_Y!jxe*0Aqh91@UOtG;(rXkN_X);-OrIlY$u6)R`px|n+% zbs2#@FxNLTgZ}i7;4KY1eJ+4P4}|HeiJ4fZ6gDwaYEe-WqxnW*6En>|#7oIRFGj;R zlKmS2C1&c~TGYg7E-!2{s(ZG+sEN_+U)W?wH(9@^iP5}{8VZ5H26U6Vpa^m?nrjN1 zWOb8Mi<%hCA%#tPbd%{tO^oJ46m|&&)}@;~1Vu0~qq()PNr!H7rCVco*@gjQH0MDx z{8OAky#>Im4j;CLj9{}mJQ}70o-v z(=f&s8ddtSDDd;bT#EJSBp@D~XAg2IZnE=JaFw(4>Dc0uO#ErwNTM1Wqw@ntM@;o~N$=>9RI7n_BvlWEpxwjP zee3k)XzQP)e+F@bVc($U+fLIQ)Es6sCBFkyP`A6*Wm2S{eh}A-iB&_B6O;I73On}a zPthZ;GnPHrfxg4l0)O`4l}s#_i?1b>k!>>ZwZ#^TFii0NC|i`b#McTJZ0&W38R~^N}`wZe%g6(p7c32F74`wJgHPiOszY5 z7jm6YwDZ!Ncj<+~OD~SR^y0`%FOIzQ0>Y#hA5D7m!F1e=8%7MQIK7uTO+k9kGMbR| z9;tQXr*}2JNJjGV!St?&y`;n;=N8@&kZXe#%Un+FoOE*<`PklWVVT0Kp8RxO==T-& zl(iQexlw?-gto#yt9u{Mn4yKl$)NLGh4^)kt2CNvJ=_Oaf z0$&X(X~;qIs~^`_m?=a3gEsu zZV2zBSk>>_x55H1a=<6}z*`#N_WI_&Tdeus&U`1|{B4y1^jRm@kG{KYi&EF(lRtVS zv$}=4NrBs8=u-XpK^144tnTvt>>ru)pRI??>aS}LKzR5;lfK_uKV1OV_tRF;&vVeQ zRT~ae$6fF^#6wzqrXS00h{X&r?O+-lxB>PKtc~mU4b@Dlkz=Vf+gvRHXF7OXwzA}= z3$}_S${xt#tBa+ZD3vnJ%y>9<3Ryc{}xZ{d(VPggO(#@o*+Y1=~!90A5mWkZDKN~4)@S5%I=cWlltOmH#XCf zvbzTR*8i><=X(NEb?8Qa@B$rWo;fXax3r9{cfquvV51AZQXnY1Y#mpPK(py(m;YT0 zaXXOb>9Pj~`!=)wSHi3Ef4uL%N&80|uIp^Gy=~KC+syLY>{}G`Mi-n}5Y2@R6l6NN zX7kgWOcxjIzWprtwt&<>z;iEC_YG(`@;+ys-bnE=TKxX+y`_zQB}~p_J+5 z*`u$)x_Ag}6z8J}Wd_IjrgaB*EfRQpo9rpu@#9iynKjd|l39a8)LA0m^h14TS>SI0 zSP#2z`f+UqWH%$E@j8gyjChd^#Y-;#3N(GoE#{_F2`8Q^F=Wdwz6P6ubT*Nh`fz#b zz}UK>T>NRMVk3uPeyL)kvse4+j-G?%jS8L7n(6q## zo|K7SxmWz@vLABmaKrFS_|3%!#n%zs1ag@S_ zh`T}MZcw?qZum}|PIB=z;%-4Ejvsp}bk_`b@06A6?`Ah-G7YyE9woOm%Gp`IvxlK+ ziLX)4)+lG!4=2Rg5ShR|Ve)lj(Gt}M9D+AWWf#pzbkU&5)3m1jsv{4IF! z$_pB`5oSZRA4l@Js10()n|+%)Fc({H$Bic5j(gDUqv?g;DJiI^tFz!PyOsl#9EvWY zwso3H^DMS$p5ls0+Sa{znMLOnJ^6Wc`2u)USkt(o{k7f4WOwwziySyY&4P zSR&GQPM0t5TX|r2?5!eHbK{$c3!8Qkc>}v?wKoTL6(%7h}*K*or^@kcIpcKH3TTV-GU88^6u9xZZDZ zir=DeLw=5H^c}y^POg#LlM4~IE!VxQcjm2?>~povnDh~X$5Z|y!F%=q3+~Tj@TK?X z?>z{1<~)$@O4o&N3oNdL}Zq0+B<4cnh3n-)mcl`X$;L#{`vcRRT^ z_crZ+Mn9+?3FPN;2OYXEzRos_vm;I4)d!jtZ;cymv(Nd>whT1m%FG>g&Q6h?ZL`1N zAtCGS@63W8{_UMy>H40vZ9aje?zFf4Mt8bKrqiaBEq{xrj!e6n*DI^6XQ%#*ud_S5^k*bB)h(ar%*1&Ld*Z+3`*1eu8?kYn%DC`DlQMSY zX^~yQ-g4R$;knVLtaABLNZsgrN+4Q|lJnQaUK@zLM}m>qdv%PAJ*z)6_I~}Du@A^+ z7yD$!{)vtK)(0eZaiP{b&Tkw0F&LaKc4d{z?-q!CQx&^WejyNhG7$Tq1S7Ez=@=P% zUVmonqxv&rACu26_JdwP>}6+|E6LaUBzAG3V!zj)OFzR9bFnKcJpTd{*YC#&{Z^wq z7E0Ie4T0EWvK5ioOXZ^)Gv)d-W3SMk8GEICcClabJYwI{#=f(PU0kTx*ZI@uCG@F_ zU0LCG>0#nx|CvCv8YSnii@hljdzAzuu~+LD+3z*_Gh?sSpBZ~XKD*fe_#9&2)yBT$ ze(85{p<+MKkA2%f?8*wyGX`RRNg(VmBmWnNkeRD>DK}A*5{U#}uLES@4f-F`1z3c9sBxI%8RpQlWX|>q5 zjD4x>viZ2CvcVhqR%Ms(E^@sV)pb~t&SnW%_@y)t@@vzd$*)6yCcjSk?D*}z2K%eGn{9uyHpANm__YLWsxM&XNw6OW;a`ARa01|Jvj*Id3=+BI| zSAS-_S^4bZZT%bKU1a0kLB-pp$$pNvMXs|ThXX{PsS@;cJv3yn55ZgFPvMISX{qB}xKI44vg>%upqn+w|I9CtE?#DlJCnv<~KJW^vax+J-MgIMqSD%(ql(qeTI^#0? z>=eAKUF8q%g4o>8Sp>0-{Wu)p{*dafH`$RU_5+}CV+}6w1`xW_jkPCXfUzc;XP}Y$ zIhv@srGuIR>xR$9yfe3Sj+R?GAxsZDt?;hSlXrS?{tgW6U7fG{asC7vxvQgH>l-^) z4f8&;xv_(^=0nHQUl;oKb`JGj&K8&Y-p284FYfY{=4XfkYEVv7k=6@IM(MQOg6M7ZG$&gD&ww zYXnrkr&7&4zg;#hKDw~%sO-YBuf|8^TlmEX_I<9&Y}@xhb79C;U;_@F9iZdE3?KLf zXc!DTWq39E%0aeXkHfM{@RqF3`p37v_0;^6l9Khlr1kU%M%|>rAK-x*&lhQMNhkx( zd(BqRvP(B>!vUj}8&bz2(-vcY6W~3*dlT}=boB|ZaG0UUw~^BEL81-1JXEsJ@SaGz z4tYl)cyCE%dDP4DsLt}J$?{u0h{R<1QtwA2t>&IR&yuU(ppPLOJbB@+ZrERn5(UrtjCjQU1>6 z!3hh=MPgp&D#OW^=ZUC%R2J8U;$Czz2si17z=llKpPogA#1nP|RE$a?tV>^;FZ+|oo- zI~C!y*>Lu<;q2sx^EOhA&5{ad4VGOK&KeBAKsaN5vwNl4kO^na?Fgq|hx3GQ_(K>9 zzuHoSGit;61&mbhbg`}Jos*q8p3<13TJr3$q^7UxEYr28`yQ&%q_5uU4)b->3D>f^ z>ezyj5;%u(%)wFcebovMX-fINDlI&O;B3G$S*0W#b$C5vX}+(^hV!7$j`b+|vQ~Gq zuUkZ&Yj=sSn-3kkLQYdi6~B$gL9!IjEWCBRyAP^f=;dnXKd|r`Ecynl*J>c^OQdal zCwUAI;%4fn_q|}PC&NVLsnhS+d$n;QQ(xWphP8hBHjBN1kA11d-nZ`)Ykf1U752V9 z_BUbd^+XC*c6=O2pqAAYNT|OW;(3R1T=AM5nfEq}-|)*Er?VRIhF@{3y7622Pp!#I zkocCC$x&NzzKe{*p+tMKM#S>cyw*iM&{NzTnqEqe;k8W&@n&Y`k|tcTCDIr;m#F7Z6a1JGVFIi457iT_ z$qLi&e%or>Ry{K+ZEIcIgnTq@^(^@a&e2VS@XyE7de@_W>6w+M^5Y=?=Vdyu8^fY^ zH}>Bq7;JHuEgf42Zs(Nu#&8mpb4=p>C1d&-P-W=nN^+FTFZzob^!T!{hD&L#FZd`o zM321aUoPG7i^AS5MAb;^ijmF_Ak`B|hj9`#Avv>eRr7V!|B&`en=w6g*x*=+R?-(plmVlDw8Yd5SoM#1QmBBp9`ZQd=N-DKv-KRz}s3lwAoi=5ozEHx9GhJ5_!}*#xPu^gBZJ;G_i_CL6 zZI)U|m6m+lN@}&_Xe&|QSKuvED{0a;AE?&|5Oar?yk;dmTJnsQ3~0$T{S-Rh-GT%c zktMI-+gLfp*joy>zGaxwJ8d4N4f-KwZCb5OxwdI9vN_S(uz&h0k3B^?;Il@9j0v3%FV-+rZe|{BLvp;{gz=$ld7p6*Ak5d0Wz&qV_(!H~U{y84@t*J(D$R(VJr>&9Oo4%CLw%ch)p}Q0YdsC8t~5%r zXu<&3cWH3WHs@EKTRE#`$Mah?=JYA|hw3!fA%A4sM&lnU*B$($&zs>pDaBuK@$Ce* z`h(#+DYfb_5&Wq^>F^R{!xLlfi+B#idaKp4wvrb(ykDaBxg{o(x367?+cnd;%jBX! zG4Hnwu?vn;xLQof2Yigk8rmuHSAck86W8ehF=1srjQMe?zLk~Kgmk5Hg0)pxf{oBw zqR@=kI4OnLvh>i*aBKUSxesFQE(|6z#}7VGeGH2A{I-GEEnH+r_67qyL1z}+Jx)|^ z=V2L9k7%#Y6G?33z@XhIAQadS@d@{<*uf|O&>=wW>`8e!rwdwqVf7Q9piyQ0{$FvQOst)qMkt&Bgfu`bk~YE$qUT+w)M+`P~rP%eeEe*JWN1 ze~o`F_ZfD)2UlR{TY(*LCH_`o2V8|6u)YGHeWa-_qR#O5xAB~mzB47KrdA$hl2wU} z6uC@yRISerk%LT%2e{Et*7~IyNZVVllcxBE3(RI12~q}I?t8YG`@@<1Un1R~c>nK- zCqLweRb#jZ`lrM!RtHI>TfrQSR>&WD>1s-17IN@dVwSvwWehZGErwfbw~G;%_T@GL zNx=7kly1e{K^IE7jy#d>;8mSDGEO@x0zyGgcT_rIW(DEU2~PA#iZ4jil1|1qw4L~Nmgaa{BA3Mqgain= zVSYOq#NO({c@}#opqx~My&0tQG&Wyd8yEblBJgd?F1rZAzA-yAcfST>Fu6nx$SNM} z$5t4fU;3%1`5ZM1wAmycnA=mUF^DaL`trUe7^&}!{|W$oS7qH#ycR$7Thvx0TC*48 z{~0!>_nOryj0|3Z;qrfx=Llm9RLJl(ROWwE4DPC>@Zie%nX- zt?UPLy|`AeThkq#FdE+7lc!3-AS&J=7lG@#ydQ(#b)(MO#5?BOdhy2KI2i9WYSc?g zb-avjxHUNN_r2O1-aGN&96j*2>hv_5P-6yuDG$uR|2>9x=30)bzHU3_UqxHB(yzJ7 zv%L1?$ae91?B9upYj&8~sC<63QxljT^E&QEORzbNKR z{rj$G&`80|%QP^J8WFc*a{0{=`rP!xkTQAm+IuRn^!Ak^9<`vP(F60+|Dfp!WI0Vo zdZx(VpnM@a=}TIEw8&qj{DL2Q^4XB6QDf442@g!H^O>qD+cn?ybvsjcs?{yq?v%+D~5*mf1%34tq z${(aLBAV#mVZbO-D<_RtukgW#x zSDUUm)R?5~=|}OQ>r>tq*GXB9*n&xU>54#7{=`Fg!cVjUtsp6Krs!~I3INOAJ(v`8 zT~PJI;-p;Z2Y)dSp47C?gSDk~IyHt?0}o76w&q}UNtxs8)~C)TrOMZhAk8i*^KleN zio|S_qDd7c<(?3{5G)u!1|I6$`h+*9KW!D$IDe64h$u&FD8~ z+y{rT|obewDLH|`E7az_>1O)hq)G%w;2*8WT^O=px8IHO28yJ`4L&o5*l z;DQP2)C(prOeZJ9z_2b`Y0MX|uq}^fOSQZ#5JJ}IIDgDKMOgt`ivHzn&)!5uTSPW5=%H#$H2 zloc?h=wF`w<}HP7m0^qT2m)(nd$I%)stZmM?Fp+OPkol4VF68w6wMn8u>UVEU{_QM z&1yrl`1HippX$)lQ$Pv2_VmOS1$-$|eE%7zC!TX~SvQ2KiMeIYU-%LN^HNSR|7Yhf zkTngx>n=g<;MKrz!xqwEHKxOgX91ofZKXQ&{1#B6!}R%$_66NV(LZk%{HwZa=Pyfl z)kb$0)#G-TRl4q?sGz$j`uFdy$(u`eCC2YAyiU$vuqGc4^3x{IQJ|L*$J zm!!Lrrn?GG(Hp8$G}RMb$F$dDW~v`38}AhT7UmF6(L^igOp2s4|7oY_f7Nuo=!?>! z^`=9MS2vC^s>d6DM(2+|$_l!SqJRJKclc(~T@9wYiZ==PsTTEmdf|ngRj{MyK;a@eZwy%(WYBc@i?K0#RW_vP;exf>bml05+zw9o9Eebk}BGqBuE<>ES zT|(hSaFNa;15;xt(3EDis5oJ&fgz6{*Jomx}?8kRe3xnDyg9Ho`!yjxS zBc{oW7;hnxWV9!D00`Bg`-XrLBSvqtXkRd1C@NZrit-)2X;P%Nqo3`q zFNnx?X2FK(Bu+@)KJJQn4V7Z*#>{GxsigWzVV=XgnC9gIU_<{88wJ93udO1 zGb378;Sr(XFHM*1Hk<5v>!!}`#(h^V2%-{D`!c z-L+uDwurn!zfoHfKV&yf=Ai#vTasts@XSJA)|TX%Wn6uETf`cI_S4#uC^!rB%a`FeqQd&kYVj>2PZsgNy1o3CSr^%gds3g$PSQpx>! z0k|9G|HL)ko77y<{l0C8K_A(DNkwVGZOR1K)P5pl#Vodp_ZPR(zp6{9d_q zW1Dp2>;lj2T!-;{v|+auoyIPG@wS2vY*QV0YXR*4NC)~o<~vyM|NbPowmD*c{kyM= zV25;ahvAn$Cj)}dY{W*22L#r1)UIKfmV!I4Sk0BfpHUqJ1ES-fHz2(6KfzgW z^K&B7S+;V)hS)`oe;$Ov=U@=AAg)|c4ukS>I~E8y2ShDtD;G?M!T4uWAZ!W)7N{F{ zm{-7H{1Yw^z6gUa4wq~s>Ft#CeiMMUAI;rn6gLfCo%*+$)tQsGnv2ZbedZm`LWj4+ zI}4KEsgj?GVDXvGmBX`Hl`j|X5)Q?ub?p4&U7>q?r@5+usjfcQ8)SkpfI^I)sMo?0o4%DrOcuzqldQ>KQ3h?~1_h(uV(B7_M z>f2p^l`Oa>DmybG6WE;oJ8YhZzqY>QL!KlYfAiZLa-KGuU(xxe>fVCn^s40iFWdYc zc7|lnOSj!E7j1sG3EGBie&xyQTs%9@I#Y#Voef=QoW`v)d_2mGLp)9t&;Ik)8GktY zv*Ul_H1g)@5%c4J{pNRg8$P<6i}#O{Qf^=SL#72^F;WVDPV^U~wEv%%Qf~xLuzfw@ zI}r)NzV6>=`#Ri)x9^ag0ZC5y<`b_?1%9<^oXuyUncIB+`ZRP`OMIXpbptAO|NYJ9 zYF>$(AFDXdP5H`%+SL!&d5`_`^6sn$v$VB3o!SjE}uzVwz>g5h8labkDq;lshr`ztFPY!KJUEH zH%hhkd8-YnfAI>6G+_Pl-mc#f=1S7fIfIUT{kKLkpe38htBPzjswJ;2H8$nAx5HNN z;mu`*qsq4A@()>?q_(-~d}E`^zTj;IE6Hk`^{r$~OMYsRD|D(CS>zfmImEVV(vk=8 zc#(>yTTAYAytL%!loZ$30GrvUC!k&tC$|y|Evdl}_GWa;gAMwn*Iqs>=)V>n(WY6q zS^k;ZEPIfr8r@7DMDSe&-UQcm9h$35DVxHPP{M_g%=W<=7O29}r4?I2q2H0mU}fr! zrj$)KcNGF!vPmLc2WPs0Di@{Y7enrQfN2tUvt8$QpUf!&576wvd*mh|(tERyGVk8% zw~$eYCYwmt^(NBud*-Eab;h$Pn*J7kMmx zwmou#3IgW1q*Hgv2E5HrZ?+1?(FUWWU)#K5TMcQ+-CBYY3z*yj@JMO{^D!YcO6+^; ze>hS40xoK~b|Q>R8bkuhsHwt-bbWtw9 z14EQHa`?Weqzx~z5^2-stBOhw+kDIVk;C1cA4Su&S*-kYvrU8bBZu1yocK{4VcMLe z{CJ&s^Oh zjpwD;<;yQyw{GsTTr=kO+?F>c&29N~UD=8(-e`Ym{kW3YyuC&iPfIKtp&*fdA%EfJc+2?j=)$hKC;x>b{o#4(*Yan4lT#v(AGRN! zhwLyIdEA-fucL|!qYMt!N4fmxr%{3~NMEE*kSc2*m0PiT{5am9OI4$_9TK@z4G#IA z0A}?2Wa6gQxIry_8njPWM(Gaz`jc;uy#el>${PyOGHLauWvg|O?x?p~LGRthU3wAltwKvBfi??W_d-ZT1^Smj@c?yt!5eOhlI9n$;!HMI)-zx=ay^( z!%B{$Oi=lsmEkRA`FaDBFbuYWEuRckLeXm#G~54#acVO4$bKxB|K6|7Ig@WNv&o58 z(xfHdu#$Q$`F^))RjVb7ti%*+Im$}PwN2bgVp{TROmhEBQDQ1&{O(S3zK|NM`GnQ{ z1e!n-Riq@B-^7+mF-?r-BkU#uO-$jIw%-(bF`Dl}6KEn+54|%5@9OEK=#!+;4D&T3 zzq*wfS~ubw`d|~IxdfV#t<6l}kGYmI17&BL20Z%yar$JbwQr%3Jz<8{+cNv1Exu>6 zWcExuTZ!3eeeZT-V|HW1w$78;vHitL%&yMan7!ck7H5ES9dU1FB_UfHhk30>_+4nziIui`=CpbG0OwYJ#MctFpA3Cc4wZl%@;Ter#I0lK?Vr`t1AYMLiXLzowH9 zMz@EkO;$EToQVysM<`Y^R^FFoB8*3T<(N`n+ZETTt&xe~9nTz}-$b;sx3;KPrxyXM@^Wd4L%bJqK zw#c|FPx$-;Xzb9EGmSpYjKN}z)_=sr52@!B&=g*8L%BPa6L|-NCo8GFbT@zs;<`C- zWqcXNn~CevqAO#m`No)X7=>O)wdtj6aFINaXs^Tn=dVe$$4B)8JrBVn0C9+_UqUCI zm){nt%losX63~MJk%5^5#5;Rr`{1ruwoZ?(NpY068iz zy9+}GKbFz({R5H5TrbCLehmi0@E)+hPawl&dbaGCtXQ3_t)PnK@1hlJk+DJ_lQGt} z(AWQ%`cYVxtpvye%FlOvKZ|McM_6R)RQrJTNNTy3O8b=|aqdQo%V0t0s`};`3O_#! zs*$sc<}?4mcK~(SBvG3QjX_w3jN*zIi=pn;~~bQk(fKjGL8dvArHh_ z6lx{yaZ7y3W_LGScwp?F`>-YJYX;K?viK)||9sBZrK7QPwf=sq@2CD+>LrL$%-qp} z?D?mym`Q|6X_=tvsS5^cT-GswyvczAt(zkOd9y7BbnY}Fc`b_(nVo= zi_vj4ZEpQg^(^(TfMCVSV+Ao&=535*HDyw*oHF=vmV%y|!gGY`7qw{3LB|dcpk1gf zo_YwKT^Dfv{bamW{MGUCX51XM368agxo`VF-Dhs?~7 zUXYW|SYKeacC*Fm@mkPN*bF|4t-@#UX;6jD;BQbKGK2S|JY)uML3zjwUZ3)i8T{s< zff;P-Y!0TEJe|g=J3YT2_qVh9r?JdWRqcqMZO^i_y}G}L8*uW-th(7J55VA#=T!dU zRZE;dFP`5gKA?W_`w^Tl_ldu}xLoC?^G$Ub1N zgOSLqWtfc*1oPma`5q$~*K?MgbkQ7udVSLXN49Sc=Yi>)gLq*2W&grFo@Uj0>n zWmS7sS@HE9tS3+Amzl-;v0}?xKC|W0&un@4XSSU6nJw3y^jR4_^O-Gw`I#-3eP+v} zKC|VHpV@MXvsBkWmG)YqW$8d{@wPHJaI(kf!6qZdO-85PM4W(8mamU<2=Uql7b$9} z|MURvym+l)MKRnVF&9rF&E@Yn&A&%**w+E0HCI6sxX$on(>8~F!n;}lAJ@QbfsgqC zAFm(eeC%52!@GtURp+rxY_A8uho{Kmqa%0{hg-L>JGPk3d+yI`9jHsI;aG8hbe_-s%+h3Y!4}u(o()C#5$bIAMp=#2W!J} z;l-DC;`&+Ihy>rKqQtG#nT!w4%Tz)t&6YA#4rPBF&Pxx^OTVNaj=0QZGJQZP;;NAE zfZX>#@RiFSTkEq)V>qZgzT-vy?V!&&^4LH@?bN#n35^{0d0D$QR%+5cwU{ zb9_WZex1-A!Z(EU^TZqzdGWpKI`KA6hVfKMVTR)YPr5|VFAG`hW z|IDY5I~>D|Bs~tNzd~6sYFA+dx%&dwALuyU0!@IEs=lp$1q&I#%?&-?z9Id{uf%2e zmF~e13Ua@fWKQLt{aBp)=Yl9d!(kxzZwNwk?%&zhXY;26bnbCSqY_gM^A~$Ixf3J1 zn8#I2-fu!`D@&kX=T~>n zqF5qs<>E)Kklm;OEH2N+yHZ=vL(*;h^F6|O9(S(7HGlkf*SNbq|G(lKJt8KX5mC@5 zQ{@E1p9lFY%DUn;0U2qs!Wv`%qf-~&ju)sSur|&oZ8FqK^HqP1TC@2fgM#}=o8v_|^ zWOsEMPb&TyHf$`&>1USsv<&}%?;nf$X-8qH#>!P#sf*7>1?RMK7zO$XKiWHCKOGM* zuAk!jj^9rk6HNwU$X;`IC=2>&N&tCeAJx-54*9 zX&Sz&EsiM%Hw7`JL=+ZN6(9;?S_J|w0}t&j{UkBnLTY|Yh2Jpk0<@4-3f<>4=5A45 zzAEAUB3?3O<_~eyw#}HSckEvR6nxp=LJ8lEY)>m(mbjI>Qterab|aI5mY*?-*Vu7h z6lQf**Z4(V13RS`+4eKV#_!ZU%g-3wwZYgz_O(l%;*}w~qNI5;JRl9<+*&+Al3ZU) zW*SKqUm2y%HbxTTgMgIqQD4Cs+(b*ZGm;)wDxyu5k+kutOGw)18SmAVO0uPmrHuYZuhrPwdtPGLqgT2Kd(X$hk%;| zEDV1f!DMWA^kztFlj5mJdWhPLi9c->sy2h@hAqR?$kf&Yh7$9Z-ea7#yTtVWqWLBx zCXc_o*hozFx30lGXzx4l5|f;I3>3{lKe}Kv`$H3GViI<@%cpK)G}l2BY@(BR(zAtL z%wSGH6KG-*`-OuGn;6X}a|@c7WdFjYO9y5&9nb{4m;rFAOQCLJG>1SFXkrFMB_@Bc z$Bbq@XaY^lK>3?Xwf15(tDp%qF@xvF=((U5qd6a%Koc{d4zmw?nr9x3W>0ARCKy(I zkDKo0Ae*_HJB{B6jh)Wp?LtqaQD99x=5u*65H>X zHA-TVcZgkW%?LR6>&CkoMjP39%vgLBPfRErGoXj<>SkuebGsC-iB~K$t;}57e7TXB zHE{$ZQz4r*@!ph?m^pbb#;EPYkTvneOHB6%7d^dvABo^YRu;o{<3ES0P4}!hC{%6w zvn708G6`7V2CM&AoXOahZeaRqlj2bfgOJG0n0R3GP_-GTm(2)MV}O?Z-caIjU9$5; zYhqo(WW?n0s*8-oWWQ|Jan{5+7%0KHXNJ&Mpz$YCi5YD-xqKF^i5X~uO*jca;?SoH zy_odw22G%eN$iw(VH2Yno>S1oB)fPWF`A-v#0-Gqb;M{2*O3x4C^mFi*Yu6%Z6rLv z#SE03OLf7Tcsn$KCT8$l0aiid?&Xi zc0gmN^LT6Gd>RGT#64M1F|a1?$$eg6P23ZqD~ai{J;7f|Y`>!umBb`(PrKTh5pe1O z#=99tALOh=FDrN2eSsO!&)C(?%!)^MEL;BT-xA5gKXBszhGpl2+f*!i+lf0 z?-Osq7`2@kvL-%`on^?By8?64K zXEL^t8<@V@4D~e_1|gA~!TU@15T)PR4Ak@RaAa|74A74rHk3GAPuyXmHF5TVCPyZZ zE%rT1ll_m7{lG*r1Em@RMMt6Mp3!UyO`wTM*cC3Hx{1-815L1rPU7BA6nZg(xe}T{ z6O-6CzgF19Xr6&4(8MIWcpWjCqIJX!fZ}z;XbRU6yC#mgv}*chxIE9NWBtvz87RMX zsn$)5=4xmHP0Zl=?xuEh=q5&U1T=vrWXcSlzw^naade_cd^J+M-CT@+;mBe(}*5I!sw%^f-N@9|?wOwt^2sms% zfIk(f2{p;{v`YvPa2HWIT> z{1L{e?Zl8Z@owxaizmO`c6=4VhpF{+8nL^k&^7UQ`-ZkQ{due#!2Y^q67Ur_Sbeq0 z7)zdpgk}bGKZZew+6>;S@YZaI+6>f%?ty#HHwNfySwo4#b^dk}t%*DCZ!%)?cm`^1 zs&Qqq{~EII&kB3(JOcwo2dU?t8A6kx2{bV)-%^)P-Na~4h9=lVCvn@y3cZ-YydgA! zCT86KZSTS+Mzac67Bo0JzeF`AFcf=w{2F6uMg`~R@_L;G;%~abn`_m|4b&4O;laAbh-R)tz456gOL|r|p!u*;=179S3#=o*~)* z2RqK{&ej(D!0|G7wl?ttaDzCKYoAzw_hrV(){a_$_btX|!$DvAhi($N>y)GWiiw9# z(H7BmJf~i#XzRZO>w7wqc9bMIijqS0J)QF@21pNyHdv)&Per10@{r>tQAXU~OnvoM zmv-iz8+|0&u$?FQ1=BfyL5_!uHg;?r(K#`3L_0ui9ML)cIAUUAw_{e-eC;j|A;%+_ zc9a&!)QUvsT!CTB_;(k=f6BEDNQ%5%~=y%{MWpr!5gM^ZzRrVd7zHmK8@AMi{PSM8u4r-MY z?Ezy>(A>2fJ=$(k)I4#ynHOk>zNtZ%(Y>N|gg+*xFVSUmUwW=ar|6h?^T|3z$HWV& zbc&9N7r;l2663_gYcaEo?fhn*I26Li%U0d#$qjL{wR*0Z6gOMz^909%-BC>&V4&ly z?rd$b7acEiXKNF;!RT=$*FI4LFNu?_9rg62c-e5!#~;#7B6l5qWM46H$cfq_+Kw}; zb&9tB&)%pdW#@dikA~_L-NQaYW4tl(BWT1M6F)N1R(rrf<285fMt2%{w3n8f zd4Z0J^cxmZv+fnk5B0~yaTU6Z?n@7!uTykP{KZ6_qGRHm#X3dD#5wR$qr^Bd@iNRT z-aS>ApweW^45<8y7cQcZQ=J2X;p_?f9QMp6AZi7JC#nj3b&h@imSU zx~a8KoC7b3L#>@??4WqraL~K|s+&aay5I1=V&dnf;eOMBj!OPPt?f+`P#>0qmj?? zu$a4fMk7IolTRb#k>e&oo1R3Q9F6?q07oNtQfqsY1k?k}XreWe{Zqe2o}QjSBW)-e zS0fWVGJUy!e>L(Bo|tnt&uHXihm%huMC>mEIM|xy>cfbB>hUD?2`N7I9Y^sVDpQ;UoWCq}#7GasXJ!Tuy7`dfX$9tC90jG_FSe z13f!3Jvywv8o3kCu*KDg<#6(8)5&~uf*a)T`EDG* z2Lt95m^|{ueI0JcQB7`c=Eg5Q!@$q_bVjb(PqQ;G(0BuM`gSbcnKf@D!R(#igfP^3 z6M}x)!d2tc*cu;q)fk5&DVE~NI27uMinlq7Mo811ACMF0rfq<3J}8aL&G4te!tDo8 z>>W|JOP&7{N6ptD$EcZS5V*yRXP0_=eksw@D*Hl|_;;{pyK`*5Cylq&?8pY6Fd05A zrV-sFm&!enb4jA&us9>%fS*9gtUOe*;4G($OMmcvIlB z0Xu3?FCJ8ZaOx3{6wbw?4mWU3txeOp25!u^Fd9GipsLr8kJ_MF75J?2vd^p#e&tA> zfjEXNj2}gkZ-bZ=pI2PARq3FKRn;oL+AUu39ZFFx!&cr+jdElz<5^Zy8p+angMgdx zO%Sf^2vu%sx&lS;-g7d-d1!U3M;~vK9XE?8ji`tU<5f!dD8GIxPs858Hd875L%PEr z;$Qt-#Xl*#?Jbf`%iS6I6&F|P3j9(%`tUqm2%-mOm6)m=J;UhJ-g_ts+2?Eu+}FF{ zhl=2MbfWk^NDai#Wr@fXwV-NzRq_UI6k&Iquqp5=q%D3m*xHJ9H9b1rp@{w>MEI(S zx`YTK=A&rK4ReX$%8le<=O~Yp-kl0J?Lye<08?OR~y2mrXW3R>jBy zZVw5HV89P~gAYGuokcmEj3CdQnE5%e40S0wE8$ynK<|-LMh}h_sFh`q$OC=pD5Kt5 z!{ZEoq|24U^v*4pCUEqr})OAuRU8PZx3}%Z)E(@V=U{tGcp+bj8$MoH9A4Cd%#a} z{NrLvnld*G0NGtHNzy}QOOlAks;KuJq@!+Zbh##BlSxXYDDJp=ViH&4_l#WrG5%_k z({G6f#+7(Z?9QoI;-3%sArc>$P{)rLi9KyG3PwMSr(h(Lg3*Ck!JEHF%u@Ee6q=2- zn&;(pG9s&&oxDGSY2_Jj^{|$z_96%u=k>o`pl~M8mkv(oVLUhV^z2JeBLu|+6AzS= zz$^rJ`dd(|@<%j2Z-Wn&ErjIg)?`Qp3$2=f6Ib+^tnxv z`qbypzV-PtPtQMnVEp%gn+^bNLAy?b85+00UJ3d9anNJ8R|Yu!^-bjX=Hwph#It4* zD}WwHj5E&0vnI_U;cFo9%=!&|e~kMb<`IT~ES6}%j5-B9eMfm|BC=1I%o}6%dXC~h zO`)3O%?8>ihq^DnQIDqd{hJNARyN+|BplUOCTLmTUR(uA?&UnLaG*GZZ*2A*6$bY0 z#by6-M}=k4UC~&-i04NmSgIf3N1ym7ZT)eaEg*8)L~M!~7DYigL$WIm3C6{e-J^dR z&jmXp8(9Ff1#hY0YPG+R1rZPso+y?&f$tq7u`cPUce{}-?u$bX9YC`oOuuF2x)*)L zTSI=;fgU>?Gx@k`?u*UwoH`uK)#2L;>jzDxds!|r<` zZkRm-7bARO7T2L%!(+|&yUawcl+>sva_;!xF(NFacMLo;h2KCwx_zFQ)_2dpid5^} z%b3FV68rA?{g@B5f8}oQ<=^$U=by+@{eYf7$PoPa5#$Zi+4>j?sM9LDc(m=GM~q^# zkTv_Z!#e4Ah!3;`;s_jdx+14?L_(&2Ue=EY?43t^{U5PIKRtfK&iM2G&e(bX*PeOA zYVeWvbVh#6JmO?lzz^_(A%@_`d%;^KVD;ez@45?mqV~roCq~1xWDYG5bEXB=%pTLW zV2UV;=c$_{h#^^saA9krk5k1J{%`3{i;u7nvf`uU0{AU?ZX zK96IF(AdD^5rp*^pC(n&VCs&@@2AnDqpP39jI3xB##yzv5x1uAYT#w0@550JkuQI^ zsjD5*ufq_s7DGsziI5%}4F4}}@P&S0C9Vxd^kswVzy6av!zu|k->@%`rk{n})`^@ZKdYoAqQbrQ@nb{vXmsh~<`OWVrnbm~| z(XTVJe(!I0Ir8>8LwiDr(3yrCl}ehjM$|B$ZP(`%^SQY*as#t7a}K3l#Th$T z&d9Y>dT5%8G|s$mD-=o*t2@{_*GA0z3{ebeJSs0EDfuTi_+aaCeAS&p{Se1>NOE== z5AH$dP&rJ?ua=?%IpYYp09bjhy9YvU_oceU=jie!StTLTD3TwL$6^l+^oDIez0P$n-%co*|0jv}uoaEU2v= zL)yvKs{$XvByCbZH~3mUe4x+;mi&{>=SA>K8B`1m-v-OmKIbUa4i`wlTo1>7BpjVa zKrzk{*vGWTMy8h~u2&19Lui8Zw0}@eh=)BydfB?Y}vf^~*w;uh5>#2dS;ysPW% zTX?M4%uR4xaW_u%jKx!RPv?zfY^v@k1lurGAK{ZfKE?r;ZZ(t>HD2Hd-5n+c;dF}N zJKA=~0rU=%oU3?MrMUY3A5hm;Xr@P5XESku1GxOE9k!vrql}ai!^mSeUK3}iYgW&C zGMf_YZ-}DGka6f(w=~COyKe3^;zG2}$X7ddDJ`kFvEJOF#an0OpP!J};BB^M9@Z(Z z2ghK$0B`-@ISA%9n>79?WqZaUZV+5X4)rHhyjTuz$_c6?vbQC)9PY0OMs4yD05;b8m5$WqAY9QvQnH`J~UT6^Pljrv66V z4v`gImWO5Z6^Z3M%BUHQ$M$4LKJ{SMA24h3DGJPxB9VKUIf={ydW0R^+2KK<36U84 z>3qZ)bJTY$D@J;l+frVMM)z0wERn89dFQ^4f9agwec>a>9dAf-$-nP*+4pCzL`+DT;#Z$h7l;R%$?>*%nMnMJUEB;mQ3LzudD6Fl6Qby`Klg8(GL87MR>RI;WQ`} zf~Yuy888m4NXcOeg*z_MVs3dKwrr;9%vLo?t0v)SU4a11TILBy2&pnZ9xbF4OQogF zJk{lf-AW%xafj>7`KqZ<+?6U5lah#@l;A;Ta-}d9JUc^^`4dV`j}huM+SDX5XSs!X z2dS8`(+`{MBL*fdk=XxtgJ!;*Y_1gg%yFFNt`t;uvLEg>=n}=y*1J11I_4VU9^peC21>M z99@+ATnZ%NWORvvZmA?9D|tQ5^>XP&UK$O4w7h&=f~e z3~`p0TiCYYaB&8-hTP6b^dkx&wD^qRw|yetbF7tRXLukUIlynu4a#oahknE;!ogc_ ze7q;^iIDyg=1?~U*WYv?^8N`)V8^Q@$(r&+s0fM7v6VSe07RJ}nG}dv!xp%PYE=cx zOhHtl*+6_QxDW+*r0Akk{6$?=PGLd4H-A0$oFP2>4jHi{1Qa;p2T|*}cNZ+v0n4m| zQ{q2!6tbPi0uJ>k(i!>mC75SgAk5A^Y~??A7{xtrKDRiJMg$b&tv*E=ktF;U3sE+c znxQ?ua}3mKet|N@Zcv3PgiPl?*dUXfBsH?uHyAoSLUX0wOMj4vm)6Kqh-LS-zv~$Q zTJ>IwYSr~{mk|AqBFZMCBPvxeul1}7kxhE-?>1vWU5C=p961fO9XqO28QS1%lBq*c zRVNh$0oS>R2S=fM6t&5Ao)Yvt;*RdZ>fFdBu~pDKgMPhAp9S@0zsG#`yX`~O((BOD zUhStSBf43O-j!y>wcjer?A3ni93D+ek{Y@F(@7kri(@~1IiPR*y?v8vRd4oN9b>=3 z58~PHTB^)rzu#&ru}`?|H&y4r?tw7TVcJB_LyqRL-;G@I2ixyD7TW25mu^)p?bCjW zG9udUjBI*Unibc6f2YhJVZTF2od4c_&pxAC)tmhmuqxdB?>I;u+yAbh$~^Yt2`x*R ztmcop|LyCt-|epuT_XEc#kU^@wVlC!t{*Rc#jGFI?9^ES4L8#aHK+dZyE7K#Z@s@78H<-K$!Y}Anzm4ACBg*X>sKtbq~(K1h@12C z+Y#@r9ffi(l0$)dJ+|n5#E&N+j+_qL$-xP%@<=@_pW{)l}|O1`Dlf-?qqy&TDNM;4`^Kr_aC?Irj3o; zx@x>vDSqqH5(pUEy4~F|ts9hpIC2$QA+4K>PfqLZddc59vs_Sp=skIb;g6h&J*KGR z>_fv}QE3`t3QsTTv+erqIibB4)wou*{&oLT&PY1Oe#DZT=8qy-B(lB*CO=6QcV>O6BbQ$B>NP5&$(CI)?U7up6LFwN z$FXYCw;PX1dE19&5CkS|Ine`=4r?V97eAr5Yhqi4rI%B7I;%w)j(PjjCQ2(G-*&6{ z;-L_B$0_XgoC68z@mt4^k37dch^o}pOh;B@glV=obVI#Pul);Ebp4NPuTP?~hCnc!U177j(aDA4^_U#c2-8_rf;PbrOKO?D${(boS8_Kk9Cp29##Gk zBSK_0R3@rC9-kalUJhwZkb_?+J*j<4qqRg@z6o-eLaA^Xs3741;KlC3RAUdC34+eZ z_-D}v>3I<4rc{%eLvIR1u~lV`6Oqmxq|T{LtvYDaO{&mmFLZC^Gh*-(b#e>{eCXO4 zA+gb)=qLP)haejv-t4ODI`OQd5=*DJ?*Nboz-^&#=Yq^EsvL33UAO9S?MZZG)jHTb zN2c`5s~3=P7>@9*tm`^7y^i%HpE>iwdxF#el0IAib|!fmI%>l@a9>BQe(|4ZH6M6T zQoD2Ub|V7(s=zzA8TAfNSQ}2;whRL~(OkBP9f%23zkL=BiX4PKDh{**eZX;`)1-%h zFWyAJD^%r+nn!_KKT+eesC5+ zQy2V_>8aB@Woj6L|WlvDbEyf~V zL2mm6J`tyejU*QZ{?5q1yM+4^FZZ`q@&YgSPL+I+m-`l!^4N7RaF0BO=8IZ>g-?!J zJ|s7kF(UoE^q=|r0{18M2j2|z`B5eusov`JUFQ?Jh>ml*Z>j!?2JcjU^nz2>ijPw{ zSS5~Z>zu->M=NfL>wl6-O!P73DWX6IwWFctGv|K_1H>Djj(U= zGfb^mzxwskLyl>|NtLAWWu^sZWW}NJWd0PrOlT9z{0WLEnS1zS-!gw_YE2|_jxo{W zEZqmgbtI3a@XYLQ;Hu+ls?E(+ET(k0#^mTRF%0M83rM8EOOTCl*bRHSE+o}Zs`J~j zqMtN40@}~#Tpf7Ghe9YOt)P|J-9X+Z;iVjkVP6(+1C_xC10-)5gNnEOU!)L2lUny2 za7YJxveeizOONvHs3md}R3<^92A`ZDvEd1sym*_YkKrK0!*7uc=Emn;^p&n9iX4AA z+S5#3i!_o?D4f<5P+6H*$s~fOYEOD=fB{oIks|&(5AFw*c%EkIu}O!p^4a78FRT99 zB%jYVoK{@Sp_y(#^vfm}J{H#|3!Z~bhCugXlQ%ZFZ88quXcp&fn#(51)DXue1EjUu zCYHCEx|X;$`3=U^SeqQ|t)ZVb83L+aY;u4|>9ffmURM3HNda$`IyM>l_z&tQZ#@#% zCW}x@V$({ZL-~tXOl{A4gIvqTu{Y{ z?zSG0^sJep&DW2*M}jybyo!fuPMvyeRynCo4voM_{eQ4K_cEzRcIUS8M>uvLqu}!> zr?lXf7;7DB_wz8cFIVP9JU(tRs|2WA#s$gc!P~ueSLbk1t&gL5Zw=sH<)Jci#I;Zn z9M_bPnxNzL7XBU^fPbhp$2#?S<#oS{535GC9m+c3K>W?aR5_20&U%Q%kidcPg9$t? zihcMvZEZ!)$DA^>SG6RIOS~qo~kH=yQ73N*aaUV>Fsb(?~a(^6L^cbw<{0;kUui{{6bEaqEj* zn6E76Cu^QQ{Snm>`0-#z21g?5(8Hmt2$I4)Fr)AadYGtXIKGC7HpE}~RTejNpz;2v zBX2CRN*AdPL&s|I4aV)LfQ)5t5gd_YZqBG|M!G=t6AvRAM< zDcEubdOBS!IRhG_dpu{rSV36k4ERRS2BrX0fT_ULU`xSd9287;>EHOC4&5**&*Qov zEp*!%naB?vnTgWT^wpUt@w?xg0YHUsaTmGk9Y#g??zz^2n~O*5;aS;l4Z5l946X=l z#dVJ*I|tyP1NI;-iLEk`!-4kwmcDz`dBh>UwGS9ERm!isnT(cnh6fl1h=Z1 zK(K@E)p0GKnZ%AA2k69*lc;2wr^LB?2ODIM$Jw0S#8)5!>d+VkxX`kt{sYbh-k>W zOf9$RS_Zii|E&_I1@t>6zjbMG8&}d)ODtLiQ1t}9{e>vA;<7F)G@aXn>0hV>@S|;{0vgb1Bw~W8OyF)|3Z=kH z=*^X;*$3#v&d6cHVjWA!%HxkB%R4yX-hq%zm7{Hr71Lfst;$~POSng$?K6MZok;*d$TaP7VK%;%O+*Qv4~|L@DsV@w2Z`TZE)zD5A|?aG{0mhM{D^NKCU%$ULcK<)89-H|sPANI z?mZrN*;A<6go*)FQxw%}4i&7x0UMo5n%1z;WteqJI2~*!y7KOzyym8L!h!)TKE{4S zutg0519u#(b^QxsZPHOq8hd42u3PAk!8Inhxuy!&4&llGu1ke0*V*jidX{ii>5v8e zsxy*9Ke*i7)Gc)|AoX0Ns%LYCtt`jc&$f5vr=)n4Oj9z^9ED=Vu$5ID;AKj-O6AH6 z!ozG=zR=OsBTN{;b{)=%WOp;?3*q!@nJfQk`3#v>`J z{gAR+ZpfFOj?(Om*Sm;6qz!(GpnQ#!*)CB@SXE8ZqRi99u)Y&^wy2&oYp4(CN-8bA93%)rR+Kphrmc(CB<0ks}y6^iyZw{YKb}{ z-E=^Ru~VudFjeuj1k*C@#Lt7lwtHQD?IFJAjY@c1jwk+?NTuCUDFckwf>d{3z330tkO_EB()?1&*^+o`@>s?Qfe35=;9qAVrk=~8UI6eBRr|0NgGVHNdrUpv((r86?- z9n~6kM(%5$((Tx0`XNB-Yb?|ooD^upl#7#F@looE%2iq>d{9cQ3F7w(jHLUxBz@#< zVW#`n@w)y$sSIeZRw`*jC2gjXPUfQ9psE&rnTWbSsRP5F>RBuhG5OW}L^j2G$v|QdumF$yaWqm8AR4V%Rz8 zq`^(^fvxyBjTXPnSeUtX4febXj3f^53ioFD-h*2x19mJ2?;e#4#GHw9{o4aWNO#SW z+8Ue=0l|W|2=+kEsz9{yvZxiJ%YIzR(NCgyi?w5zPGEY9wiq!fkKW-*ciY)7hc#Vf z+#nFD`PZIr6`O1|0RWfz`O7jgn#F zechc-Gn@++DQ__k+52cM)-4-{WQ?{aut0mXlb-SDBX8_tCB`qjVfN2G!Q>8me$tuw z-S5t#3iOU{qP>bkIHGn&DuJ%O3jG^?lQ@}v7=x9wjbl=0PTZ3dG0P3Ki;?Lma?bheb;E8)nwBBW zsY90==dXdbF}Q{UJcVJT&dC0hByW{z7cb$6^_Kj)DHpkj_!=+cq-Q)yT=&zILsAyI%i81#yY1#Njl@smt9LG8%9{^o9b1qfM_i{4%AeSyz$rmw_ z4{~Ft;;Y98KcyWhb?50EUam^P=>;(YW3>vCZg|HTAmqd+zQ0or@do$58rD`+E2ot`&7S?*khBH+@M+w(V2V zR=3eO=AMovk$7Y`M<%l;kCK?P)+^8XB^?kGb50Yl(d&-RwHV=nz;xJU9LI@U!7)hWoQLOr4y&MX#PLMPeLE^~ila)tR1S zo1W{6Zli8V&?Ei&MxTVs3MKc?`!SMWb`<**&gVDrsDr}Y!2uoe(uKj)H-`V#@Y4OA zjwM6%8+u%2Cl@d+ceT>IporSsi`Ndi+hb08i?YjW55QN)YdOP%2l-ZXnu4Vtq_|Z zl>LGx`G$Q~QyrYhq}r6q!!rB@zgYjgl6eqB=9HUMiryl?*12Rf>Z14!IQrO(Er^yI zn47a3@gObm9c~+?;2K@W1M(ev3&pfa(WczvZ$yQI6K)62G!Z^=mOxd@l7~*!;1j9< zdsGfcw*8tHU#4xdrFPyTpvGN8)dDy1-aZ`^I8~;)q#Pl19gwJl$`>iR)l5enD|rW= z&o+EMrF2@#smFFksq!10^18uia*}9?jwekWcS#*#X&FU%ZdL>Dzk{VN$*Hf?-t3hd z$=qs-qfhH^hVzRvI(6Y3mQo$-AHdSVg^cwFsFWD%M|6F7DvB$KXZ^o_M@&r{H%UQb z{fFec-}(;{l{PNUe=zy+m@1C-b3x*_{#>cuSbsHD3u~&UjXYJlt#1pRvHomD_ciVP zb6E9SzlYLY)<0I2=d%JSudV+#t|E^0?~ywE*1zam#Zv2#t-qbN^^NttQE*5tj+spS z^hDNF{IX)49Ht<>q(Fw=^4C1md;TjXUq6vF9D#i+uPxLbOd%hIbVhCmx^`?%Rms(y zY<6r$tK?G{Y3|caa(;{Ld(WDx<1N-wHwu6otEh}fd^P_2dh_0}l{5GZ!_>W4sOJkc1E_zasIw(EUve3c zyIkcSs_Lel9(wURzbzO+s55dQmyknjeU^>;K}c=t@SnB~TRDpN>WxTSx~O4IYlJBS zsvNAC9xPQiN-lxf$X!fXYO?#;H(W`Z6eBRj(zuvmS1#*&q+A$%8aGmgzkrLnPNlRd7@{o|kB7LAiiQl%0G zRC1mYp@y-^mRtg({|?G>n(_f{_v6Nqlw?3X2dR2GB{yGk8Ib$UzljD<0SlKj$t5uQ zKikXY3aO`2N-}`{K2=Ytx7O0bkmXAj~;X#Rg0SiLd*c-C%zJ; zZDEXi_Books;Syvq*z!gAutx)O<9fwj}dmsH1ooZ05t(CRP2UGt|hq)5auM6J5#vy z2p0ll!5h6?9^FXd`w#p+`I1sQBfpniTevVF^@F>ahI>$jH_B8CL7EUSfZ$eD-BvkY zN!Wu@g*soT89=?%VW<5@Yl(Z%FT6gvgAZzCLh4Li4p$5*G zZ&wpbS|-w6TfNC1;iVN#LL}9>GWj= zus30vkE_7*;_$eUcsTR)Z(8Gt7+@xTL6(D5Hr74I^=h-#Gkf%$kD9eV_6(9SsdPWL zuFg(*YUfh&&pFURqpDS9EOj8k;pwEfjcBB9sI=c2JPm%0Ngp4cuEWV#%;D)Qj&iQU z({m+(eC8;{-hX)7NXM_eoKfD*!OC?+DpN-1(S|316`+1Uy+%Rd@LuMlaaSn z@@I_X!YuUt`0ANQFWZb(s3mWJbf*e7w`h~lsnb+7#Xg0#yCLX$)L!iYPeD%nQ>W*^ zvK?M(c}|^9Q}T@j#-2LuZN!w*hs&|eEvHT|HpOVL3WXz;(3Cs}HyxiG4PLt{ru<4H zs(IG_KAPA=i33C$C;_JKjNGV_p8>kgeXdl=*E1U3&c;`dZjX2|@u}0E+zw$gQPsBs z=(6l#DmjOfjb#U^JLt{^)PTE5R54!Al)?$L+01wR!w$75j&}Z%QKpAxhV=5M0csbN z5)}v8HBLiJL8NQw;OhkJba>skdF9S8Gjt!s7{wEid$HV>=!mDaD0fBdD|e1SdfZp; z{Q4^H3KXf~-CW=D8{s44VO#N$!T99($ZWW%%Po4qxQFyGl-3!&yt#$;h_~{qjd&)? zM?{;^=lakS-iRElC-vMB_$GYC%vG4tsH$cA*9iKHn}4{V*RY_*GvZqG$4Xj-NvGba z#z^bZM|-jS4T;~7vmw+E)%cSbg`_q*@m&T_TLr`8KMr(jB2Y~;rj=@Hc?Z5@W=5~B z)%^>YeYG$kHZKUO5knN9|jDL3^G{RNoS|a7Xu?pL%+jx5A zFdW6X=9djZXSpboR35e}c(0rT$UG+zML8+UTLxEqDhT{|PWs<6~ITo+sTcWR#5tKnZsFjcMCxXgVsO-@P> zDR7)(eo)1;TLp_D?9d~mjyF;y8ZsAyl*dm{i$tgyzw>nk$zckTdnyEsLuvB=_)zcp z5tE;Ax9>$YOF0I2gs9i{W|p#*1p1RoevpyIGS=@heD#cFn|Y_o^DNnWMB?oB ziH`L7kJ1M}7X>y)>=47?V-yn+qXHW`j8`UcttoYsxc&i@!2MeMY6@*8dw#({-xz_#%#9JY-fvK{m-W@{l&yNu)GJ8>y}r`Z z$p|%wS2(o3nu^W<^Yg%T7t`{xW}36U8vGVtIP7J8)haw$yw}-!-u0E6M;4WJ)>ps5 zDkN4!*ZRsO$R%&;$3B1j`f50_cfA)Z!TRbzYDKfNzWSJ_eTmjro3Du12=Dr8nshT> zU)}#koXe?i&|!xAa_V+TAlLe{V*f+eS5vr(AF{sMgPRg(eU%Rp65Q(h+wz#%KAjRp z&b&-daYo{kGsUUDl*-F2{1DoqMGGr|u35OHk|%MpnT2noO+=Lbj?v7*AH!EqMhNAV=Waajcvv%XHuQnhj{`%@Qu#8<_Wh?o{0b|!!hZr$seKq1` zy}r6|S&Rmkp>SkRXi6rD?_A>6;6!{wzg;I<EIsu;$p3qE_`wv>o9yvw7xQ7`4bLS&Ty2gphUmBawb4IOQ?rO(zMDZk@j-)tzA<;9uQ-@#Rb#}{MWBbQUC1f_F zcJ|C{XdUk`%T%O|jY*T_xU(T=Y)er0Se6BKsrkoa*U^w8b!W!bEjL4Ds)m+WswMkN zEv5@R1e=iV(R2MeP<%Gi4!_KEXd2zWdCq>=TIpq;a};H(c}~GH9oA_^qr(X1&IGV7*0_AY@nUAP-c#F*yj6kE@XpuIctFNGUw4t6!MVAXLoZ39S+Aj)(#Vh= z(7vg64`|u=1|IJ6_ws=p$mJzKVOI64k(;FjTeX1G8^}~Nr=cV;?;p%c;|Xr4p{YhDnq+b8{Wf?b+_W};e+WNy09}Pbsn_3&tX93h(m=F zRB9gHcaLGnA)En4dL*OX0japh8CSFsH*xi|m<)&(v%==Z_d3Nx8{L3_9@o&o zLB5Z7VO_uuho6{h7z(NZJI>_qDD)tYE{OlNL`2&nx>=9@$w_GqV&aT#D|cRp>MPQY}7_Xhy*Q#wbrbjyzwzKX4T&Bv;!B(+IP()1^9Y7lmFXbPte*wp z^{+18LY!7?OmST+pbAAf>U2B8Mi{no3HKH>6g3?P2J|M6O{AsHKp23wNZwWC-x3Lr zBst_`6{Yf!7)C*8ipRBmxq#61uvJBuU@^_9<`vGtwg}N_(Z6K%38}1K4e1@6#TxiG z3(X(5(?>eIcGuF1qTAYBEj!<#{VRQJhDKGx?sV$PbV^;Xs%^z=)M?mBTtK9|kV_cp zk{sGOiq<0%dE2(1FfXD1Gds?(l`C9Iev%BQwh^JMeYrR{^G?q3HFFass%E@L)i|Wf zIg3fVm;rx$lneQ4nUA77mg;)an2~8#i$i=Y=lF;-n2)rm#4Ezrj;RCj_|oD=d1?Gu z&f%{|^}YkaNJRqwydxRDy%X~9Bp=R4txj+`L?>4|!mPtbUrbSJsxOB@A{p^$fbx!b zDxS;Efali^e$}C4td^rCEjd1iYr(;ZSpHrfrUo2}kU+f)ch=>-I`UY6gn;ikHXG}F zLSLyT4njLQs9ovx%4c-}-15-QWXj&>WS+s9e7J;~SdMEsmlnnt?Zm*BJ4xGq&W<5W z7g0L<9#hV7>dny~4b!l35-xk3E`WC$@?*tRkaPCq9L=8_cN_DxNK0Spr6Q!0Nayt- zM7w9r4Lr0=yNJ&DBRq9(X>4DW zVMP&}XY~Zv7anlU-|v56nFP?SfgnKXVJ}Z7TL*3O3q1uH0SBAcG`!GCyH02;ok6#at;6XNr`A~=I zXNKyX**Qn-H~x!!P309nDOlOj#IFBLa12;>ZyRMOKObLz$3CxLc$cOmetWw4B{}>) z<@0G$)*)9^Z~tU_SD~iz^4kmi_Q3vBuvznaz)(ipmoJ-m_c540ikgWZmnVr#dAhqJ z`h4==ubsEY@>4zK_on*cVov!YQ+`^{SNqr9au?Oy&0FX`c=^ zT)ges7yR~{@8O5U<&X|H5AN^i@O6G!1ZiT!q6y27_{CiwPdbpL8t&q9mnpw3`StYGE4<|oLixR| zR9E?nP5F}^9enEQ>%HXl+_FGx@)Z4`-GE)ABWSu;SQ(#)X))o_{vlLc%cPC zg)YC;DL<+1h{eA0hq64@K2G^8Q@-i>3&|uNn;gL{w-D}i{Rf-!-)#M0a`m0w@<*cl zJj+UT%6~{(eH=88nzH&|`MA^KZZDO`6nDN;{vlKT+J8-6UFa(BwaHO#9~57h~tL$Mg+$^qe3-a0zRgD+bM?q$j%FoNX&j@ z40}(E@1cmst)9O6U+uG9tsp5z2G@Utxd|F>1&7^-Agh)8upxu4+9A8g7{|DI9?j92 zbh3@^2nsV$E%Q@h!LK`G^Gm@E|2jH2;C0<(CeJkFzx)^VWXD2YjgNLJ+VI{eN8^JH z{gIs)eqWT3{#b|J5rlUZ^vJfJS3A@<&=6{er*C-pAL}%KrJ(})cg1vr1ZPTnO+ohRt)nA!S#6cl7&F(lX;b4 zdt@i86$*0LPV}*z;P35xBF^3P$j-Gf`kkb>(#YpA%l;16nXz2)I|7~_f2tx#)Bk|&{JcCZZ^dCaX)vutXJsMgX<@d!f2#*bEn-$Z11)! z(K_fN+V%XKwGW%5VfSIIR3{HR=#gu@gznp?RIv*>o-&!PJu(;;dt~ZI7k@^Fi&*#a z4lnktAO%)~^rMT=&5c49C)pHWvg1|*+YVA&1T35s`g*^?Zk#?6cufmn9 zS0iWLLXGxHg7xkCwreur9JI3KebZBGcjFp&XfLiG_c6@2icsoSA?N8QzkG5L{f!@X z)JilS&2O$6g`d|b8x;<=j(ca9ZRNC%-b#SCpq<46b-`Kyb>Ay6wT1 zb4MiwTdGDS=d_fK8lHnsc1}xZR7y_ErK3{G>`$(dKe9cU4W)<7g&e^ZJENgP|B;km zW(_+klgzavDcT)u8AKTkpMx|B9{BRh9?dQNs`NoIOcI`NZKa4jhaoK+ksEDE5tmXlf-%$t*Ir)1~a zg++P!_N=_z?4rDaF;YNRQc|3IW-iKE#4IPhV3t)7NYAw96l50#tYCI98~@AJ(=otjse4PxS?TgVLcms#1lc?H(2^fU0UYPDq*hDt*X^>)o7dtpUs zb#-}_y|4zbFjQGnJ=LTY=iACw{VSh|wvS|z*`-yLWvHjJY?@tPUbnQo&aSQr*^6o# zs>|$}I=i8|bZKd2Rq2AN@|g0qb>&MdYZ~gSmTRHP%j{5%u7@RZ*RLe^7Rpe~Dl4xl z4!FwOkt0X4P~fz%v}93bc~x0SXnAdU${3@W z%6hxZQvu4-ANdxfuBsAM+I0h7dHmBv5hANkq+bK&*myNeetEy@)DlZ!|(k?_bE}9AaxuE>QhVpu@-%ZPMfpkIX z!V6fI#pR(1Bu7ncc^#^+skSRh!4CFWj?@L^<<)j&_0pOPpf;kVzYI6MHjo`#k*>r~ zpII6zwHGujS_Bh7cjZfJL(8WTy}hKozP@yEIVmMOFT+ToDiH3LRZO<4Z>X(>ir`m9 znucn2SthHkt65rEhU|+f(1P-1wXlJ1LOiRFw`bKV~SSX?8|Bx3dy@uY}MS zmzRx)u!;!LLYEvl(zY#S9*BT|;AGj5&)?6$ph3Fugof(6^2L?)q4GMiB-~BZGm^;S z(J5b)E&z92vY@=KUP{N7zo;@)VTUTHJX4=7!pw?B!yE@K2%n!s-rj? zf=BqIMtM%@Z;;UPFRrU;s3jhKH<{}<0?}sidp%ybIJb} zR+ZLQzz%FP9hNa}mX$B6tVU~<5F_E2Rh3IB(Pbg?I32mlmrf`RAw(=d5?NA4XQ)fb z2R;i+7nNt!RF^eWVz^jvJ|e2|`O0ddUG|HeC!ewX_wK1etE@@c8B$+b`N|*@;X)^><@#+SO2-Jnk@lnTA@qv2H zFMqbUzsm-t_4SpD$q3-CJwSS*(ie$ZfbhZNvYsE5A<&U65Le(=G)jv^eL6DL2E7?! zK{|ng6W1;rF=z1&GcoaSVNFAo2mpgs)s)h3%F%w=5}qP1s$ATl<_y$ZY-WmoT=64e z71H?LE8==)nM^=wKHjaolOH=B}O!@rn>Ulnz~TEO+|U!LpM{CTb3!q4ipsR z71$YhnE_;>#0xWx>YD0t^_)(6j9-6#T}`M4(@J&?ng*fq-aG?cSravvc@JuX$vhq}0@-p*s1DFE2QnGXN3-V?b&@#~{;k?|8nFaao zR5UPSh7fp#hb1!ATGJyxmWD+t-Bo#dZhA(r0OA(<%#@o~7)UR`qBb+rr=8q9C}(y6 zD`8hXq}pIio3n~@GxGh~h02N`Nf2vXkATIwc#B3h`buG-V7504V&rCGSzM4e&&M>s zAUh8WTu(CA(M3TT)%_eMo_uC{K|%VwjGXKMyuibq3|<&Gt7ul9H@!F)_QSd-eSw)@=5RQoAqSD%e;+#N9R(ejM>{%eXkwZ(K>0YcCcMkRva%QAw zoQW_|R5CA6RDx)kccyG|kX}iT?(%cevx^W$O0x0_NT#UxkZ7w zwDp923{Rz;OYtRsR$w-=#Qt77y817tz=433sr zn6Qv<(_d_P1co4-A{(2=*iH`2%`Pk|j8|?BhWMFiHg!PmVhQTgdLm9(_2_uX9a`!w z@$}1C>2q~pLd$3ngbzTDj6i@!U-d_|dFeDCW|EDueJ&MswNH8k7B=MQCH${=mlMZ4 z#VIGixiEXuSZ6GzMGTd)0@#PM^YNxVe%F0u5YB|R3% z*ri-tKHlclntY+{4_-f}5+(L6)HdX7y$uN^+3AIa*)wwknIkRBr0X4N-il3Gf^2Ejrc3&5n7jqR9))`IfVC4r^bdd;mNhA4tPZ93`Ee@NjCg_Qa+Dv7E& z$2!lp##l55;mM~>X2C4cMqtf`Wo&FXWrXUg#PCz0L+q#3)5!t>%3Q-DeyLeN$Ogc4`3u&r3rFGR_s@RlRDiY93EMO! zafs|rxx~5*PKrO-wln=hZChqlHPlxWmRFa};FFAe-h$%362JT$91#@NB&JfU02(`` z7gJ9q15ZP0NXM2~VuI(&swRfn=Ob&OCaXPkiCl9Jlx%SslO)>f9#lQsM| zdiNR96F!rrlVC!a5wLnzO;t<4*#+ zPM^$KgCwTUQejx&xsYGgU^VDo)Q`Zz^iDOH<_*Fp-K4LOSnW;j=SM_3? zjh|85;ACW1oX>MIfDb+}43~)`~6w60Pm0}c`I+achXkrcu3dA!5 zc3ze}qc|%oP+%8kpN%~o+97~m7Az0Jp^NhLM?Fs)XJP6!j*b#f!_Oa&8v^;RtCP&=8d-?*F3wjF4TZQ1jn2;*xN2&R#Do3ZE$Sz z<3NT~i5_f^#<50V8BS=?YpAWDjH^d256y)7A&sk;uRfmKj_0j@QUdRCFU0vBo!~++ zOoYAs)s(%6&S9%?&}G+G$hie9T4z(|E2Y5kM` z&!#|aqI5|yHfC}CCqD<UsxE!z&{X2vxRU%Q#WQxSWDr51-1EdDblT`E+57FxDsRMpgT zn32!}6WhT+LBPfWqqelJJQF^wQmlI17O}AiWn3<6G)&(u{BK#!qD7b_q2rBiutqPk zMvtF(68{w-bbx*Av33gj`l&XPO`Td+9>T3Q%m->qaP0-7%c*veefrd?JZHBr zy|jPjPNS;FSYyYIwe>tu#u16bIFF}`IHzXN(1Xe`P-A5SEoR~FQ2=MuDVPW@J04LK z$;Z?DpJpkQ82W9hk`+SZ7Y7dO!m?Nbewvuz^VK*W-D|=>f z0b))dKRct)E(m1cjEk=BP(8)DvVOO5NwT2G#+E`c4qXdvoTK5Crob-3*oc1u7^`T2 zB$_}0a^&En&=P_aGsi(RuM6?2IEFw(E~M2PhelymhzNcjTmfrhQXTYMOJ=HFW=*x` z4xBsik%9K0$e^6T>jtknV1PBi8f+a5Eu3mug9orS^gjoteO~deRS)ib|8z+?F>RoQ zN9vrvwBO!De|Juoq*3boYwCManxu!-_vPyQfobqk@WmhgAskGf>5mgFb1PPTl{{BI zeqGtJ@gE`m<=>gc=>JFL`+U0KfHb~syl5{a=YERlV3mGY+H=p+-w2gIQhh&0l^dn- zScNGH$0|Ht;dq6q3MVR@r0@iVC#LcIRCN}oYn@sIH^#mbuA9vpJH|eTud~d9k!jdB zS9EEYH81yg^r*NQ_BrRBXVLV5Z)U}INZdXtU0x!$jF=%$HR8)6`%5)-=bV>9<{l>H-#t`t4~1{4^z6eWJ*3iaRQ1;!CFxg=5WM{e z!7FURB_jo|KT_~PRnPuEmGA!=E!cF7;KCHa>&6H^FiNoKXu)jNj?9I|EmWI4F6O7;6KX0_f!5|f3Dbf$T@;9D_pGb zG?hP5ecxMs|AYG8qQ3u0;g0`B9!LIH58_Y%Q}pl;<<~DMoRg8kcD_~N+X@fNl=NJM zD-}Mb@Kc2&0#dF>;cA6l3I}FM{v?G96yB(?OW{t1DKn+~0)@9Id{*K23Xcy;xpNg> zqwo=h-z%J!E#(9W9bS_AJ3N zg;y&a{-n$+A5h;vRj8{-zDDRaJ|X44P&ohYG%lj)^>>Y$K26b|u~Fz(Dr{5qx||<# zPvQyv$+8fiI2j9Z+(*V`{<4zFCAC#0wPo4)6Q{&kR^%3zOqz(Nc5pwp3|qmpRFFr< z>aq(bl?3p|th(owG0s=|(e2c7`1qgX;=iD@zFaENg@N63q`t7KuP`)m5)S`LY8I97 zVY;g*f7JYKrJwGzgcf$5WWMN_a7bi&MC(Y7^~6$ql-wU%`@&^p4hs(?1|Vqh9@ zEpR^Y6<{N<2iOMOH+xq!3|w8fE1Gm9$^lb=tMCYJKJdgvyQ0g0xxgENf2`aU?EpRk z3crjAG~j07eBhhFM&M~DfgU&?*a5r- z7zVBfS|cqh477p!oD6#4xxo3rHee(0Az&LY4D0~ze+uY>}&;iHK+#Ov7Ov&CIT?c&c4DbU^JrjB!4Ltx;fWI!<9nA->n!P)^ z3>XHs0f){3AK>M9EnEb+7MOIbWpx2lfcq@QdrE-^11o^H09OIqfop;LR_u;;0T%!x zz+YE_{-^Mp^Fa?>01N_`0xN*e09OHD2d)Kv3hV-=T>yGuJ}?RWVF54&7y<^Ve=OM@ ztpz?0Tm#$+TnF3^>;|4&1AU<1)BziTYk_URw}BnNtMFWV1b8DbX)N>&OaUh2(fc4U z3s?ax1+D^K4O|Nh1G|AI*X@q(1fCBZejNHOa569qoC`d<9(o1d5ds~srvY@psY_u$ zU=c9+c*{z<7^Q5_XESg%|L6MWmQ}Xd4VaH!H&QxU@h>& z2SEoM{1E7XM+3va(BHvtJoEre1-=Q)2kzevI^glZHNX#n?ZByzK~CVo9cUlo%x+*B zaG$48AMjWp?Lb#_q8{K?z*^ufz%@Xt3-tgG0&WEs0e1qo0PTs0XHTO(;0)k=;JLs? z;N`$J;IDukz*~V~;98(H33>q9z(;^-z)isUz;0k8@O5At@O@wh@KazIxD#ldfd2Rl z=z;qH(|`v9=L2nEBXBIR4R|8319&f!0Zo3upreKL>i?c;I|sF0c_;0c-}7 z1bz>!03Q1i{1liETnoGy*af@|7y&*HOu|ceb^=p?M{fZ=Fb7xxTnbzTYy++Zp87KU zmA(Ua0=t02C&TYwf!x3zU@h>jS0OKO_*U=(jsix2s%3o)Oa2>G{m zcq1?kct3DH@L6CZ@Izo5(0T*(z{7xH;E6!mJkJH%zzSd*@G9VZ;5EQT;2pp=U+GZv%M>=%|N{QH~ay3$2Z^uO#2r40IvTYegG_r!ta334~RzX4A^0CG)mL? z_l8EJ%Yf(a5skJ1zXEmvFHMR@dw@gtj7EoN!v4TC;PAbo(F$N2a1C(m-gsv-@P1$z zc!AHUd8dwgLCuHyZ5#rUApiI-r#We*oIRJAi4x4&Z#? zsA2e}2VgF6EwBRE1-uFv0e%cjnhE^_Q-H@O;~g%*TlbGfYk@@vM58wX8-eY>dw^Sk zJ;0s7!wy6{gYYllWMBbsF7W5TWx(4Gg51EzfE~cCz%X$3!Qh*Xcm+%WUJb;nJFKKb zz!!Kla1HQO;5y)HU^j5+aPS3Y0f(Of`GAvw+kq9p!|>+YRlqZWYk`*nyMR{%Bf#5$ zNoQhQISh2bcHn$q1lR~X>~P2nOaXQP=K;gOtAJJx#zmkFTn|hG?gq{WrW^r!;JLsy z;Q7D~pmikt0hkI*o`rE7mQ>z5=`v7zVZjzW{Cp4n7|Az^j4w9MlU;1Ktaq4}2Zi2;2>90}dYt zKLt(&hJho-L+^7jJ_1vKAz%>L2CM*1ngG26vw&-XmjkPJ9bDr z?bxGvUgx^bweB^`tlQ`N{T$C9&vCeqqj|6E{XVbr`hA_(TI-$(ybBx;t_SCWAA>8v zCLPHS_67HWW5GsOS=J=5J@_iv7d!}#2Rn5lKiCIc0hWW?z^&jRu;m%_`(XM5>;jGk z2ZAfWN#G`M0T}H}zk{8@ZD2p}5O@dJ>}vdiUBFG?K=3ng5@?-Cey}&V8Y}>}f%Cva zU>VqK2<-&BfP2A#VAC$-2fKg^z78?XdS9YKGAZNXXH88`64p0pcma31-La zcnHh~n~i4Pf?dGRz|mmr66y`E09S)s!ENA9@DP~YmwaPrH`oRI85|9!UP?Z&DYz6o z8{7zv2KRvXfT?5I-@vxuMzA+{2pkPI=tq7q16&HW12=;G!9C!3F!egd0c;Dd1bc&J zm(yNw6Sx4}2CfFb1h;|vz(e3M1E_Z)?FYMneZhg?L~s%~4O{^J9b63_0=I!FSCAiU z1U9>#{9qSwDmV;W08Rtff@NR@xE?$R?gTpwq~7D`Z?G*m4(tt11xJHR!5QEi;8Ji0 zxDjl6CG7@Z2AkbrS-*f?z;g#tZ*V*~348`z0A6$z`M`PL9`GMv>UiS8V9Eu%fxW@c z!AanWSCbFC7F-Q30Jnilz(ZgK*z88;5!eOX3l0QRhL9iZ4K4tS!S&$d;7)KIXiZ>$ z1~b9TSPt_MefJHc6?bra=-nc&&O*ayG?;CQeAoC}TvSAbK% zE#P!;A2=6mRK$D$+k<<+zTiP{JlJ74`N4kR3h)|m3%C`uZst4!W`c*nT(Hv!>J9b> zr-38EGVlX%J-8Fx3AVY0{1Yu}CYT8>1arZa;4tu;0>&AO}H^OK%|`IDazr1y_SBz%Riq;6894*!ecvJBfY-+k>;fzTk3@uVz_m!MWfz za0U1!xCM+)AwSpzY;-HQR1IL47!MR`&xB{FCZULVF_ksTfn@#4tay#<` zyciq^UI9)5r+^ES5$OK>MxZz}zD8~qDrg5AJe@EUL!cq2Fsd>dQ}eg|#@Tin6? z22TM~r;s0P3w8s0gZbcSa4a|jECQE;^TCZ^Ik*RW9!$NRI6jU1U>4XL>;R4ibHN$l z0&oSm4cr3$8{7v*?xf$QvM+$`!91`pSOks-=YVs;mEa0+Gq?r(8Qce+a~JvVu&mp` z_TVdEU+}NR^c%Q#I`a&C7hDhS0e6C__tJ0E*w4XCus4_sehQ8T{{_wf-?*Q0!9#PI zXJFbq<{8))Y<4H{=mEwHJmMkpfgQmaV0UmS_z1WKd>Y&bTJy z;6!i%*!p4m89W!<1C9q%?`D4h+k$@wdxLwx(O~lhlneF-mx2?)jo>tJ4_FGO7F*T} zU|aA@us1kiA^i;A2hIf_0at)a!7boAa38o8Y;+InA8ZdceUyF%JA>oF&ENv?CvY{` zbrJmq4ge2y}V1I0Nhp zt^vn`TfwJ!u(Yy)lqbHRP!6JVnm?6>9Q2h+j6U|VoJ*aMskjsRDHcY#~LCEz~r zW3bUo*4dNf2YZ8k!E3)mUiFAeLI*5jsbJQXTV|LTi`S>WjXo5TyQ;D2<`-zfL00T1TYgk z0Oo=%pCdomADjlx0n5O};Ck>4a3@#=TC=f#p8VivU@lk<4g)v-nfV4DyMp-!u78ns zgL}Yz;6bp_9QJ{~&~M-nurGKQI36qo=Yr3JE5P_m%ongFcnBNLq~2g5Xw4;#ftg?#mH!M5Nk zus667ECaWJt3ml>7_cIf`}VUUlNzPO+AqtsTBOxWof~oWEH3(G|5DRLi0%y=O^^0G zGUZ}SNJ{=Z`G?*R^z;i7dI59?^mcxIOhRW#TDeK|a`Zmv&Hec=PvozF?~UHluV0za zg{FP^P6O*X4UD-h%tDiYZODH|1I8|czqaeP@v6JyC9&Ah2Dp-TX44~6JJ($g@lnXX zN$8)0@uM>nel8S0(JfLVu`A_Y`!j#3dA2cjZG3j7y!#q!d5b7-CGSA%YPa~=!N2Fx zFN@*lwN{DpjGvA%^&|f;_s187`^iGDM8EHJsdww3pX*L{+aKj#lm8q(tUiVK>45&x zMfjQ0Cg|toi_}jMe!koo?q?-_cA$3v;~m;1{9NpeM`i>+PW#b!zx_+iC+A~#p3ly- z|F7q}?WeqjjSq*`I}5!O{Vw`5e)k!P^7=XBb{%epnZ<&#{wvSI+njIhtqDTzhjf>Qu{Fe--G@ zqceRI`gu}{S)Wzt3()HtH}M~j^K2@Ko`qh5&U8)q&rkTzL!XNNmS2yqcMQaT0eV*Y z;hIsk^x>Xfj6N1Utp4Tb{n3Zl%0Jl4UxEG*dTYOab)tS%=nK$K_3NV&dfcXu(Zlwq zEc6%A+xYXF>YM!!eKmTvU%xitzW}`gy{})7%4#sh=4Huy zLg&POXyVvXF_v|m!~A^)ySmC1KU46t6#W?HU%b7~&p>A%KNQE2*h%~5AICdBv77ZP zyQ6Kj+l<}gtq<4yByr(WpWWq-zt1HuNP7=pH$Lld%^I=W=d*M6-`L#|3FzIAz|yog zi+22c;^CSrNXKJmCfe)Nb27$eoo3f(owTWY9Y{M0v1^Zh26pkIe15KR>UU&)ZAU3~ z-TrvEX1~-g$7g5SvCWNd>#$2bUF&s;&n{4}3d-w(T^nhTdv?+NN$M3x?}mQMQCwf; z^E1JzSME{NOU5&e4R}s&_&$=2z5xAre>sDk?s4WrzUn>w`qYG8h`x^eK%$<$I8}o1 z6#8_(9=+3XAoW|0p4R9@wBaZ*g=%*y{zZYHVcd0*r)C6*8{L|Q{lK9U?&qWVA2jru72+^JOfu4o_2hKfS z|6X}_EcTPr#ZoJ$9r8aqrk{7Xrn?YsKTk=F^Gfv2=nQ8<_st{uA0;!<>$+c&dK^G+ zftV&8uSc1JoxhzL%qagB}(?E6}Z8b?eUhM{kP$1ZMHCeCz*eS^s8%Ipfa_+ymH! z)gv2y26~RaKW<5kOFnve61@<8J$h$<{@!=TD`(ZlBH zVD!Qy`KO>y3(22Nnd_+M67*u`O+4LKPjesfS6>)&;`Uzb5B5G>bAi~O=Ce2PHd`i~ z^z#AAZFb?|nhX8yikbx^dO90S5A?e37o=YO$)AJ1QqB|IeC0U(7yH21KxzY2X3dY@YQ1)d&fL)(O&>DR9^<1F(f zOZEAF{o=c0(PCpGwAkfi*X0tvQzV4DZ(WMrGYLDXPZ4%ou*>t?>3LuJw-o&V`mJ4j zexeuLol;`Yj?an3PVG|LUj_EvX4HKSbJ~xd6QWCb(!Q?fm&&}E;2TeKUTP5>&rWQt zgJ%*a{q<)Z%Pp0Z*B^a+61@n$7(HyfOVJmi*ERp7pDU?vDf$|&X`yY8uBX-NNTmEBp%>t?K zLq0pRu5NeF!7Gm@PX4#L=5PKuYHXIfCwcK#jlaMCQeCq_%H94ef6vPKTgEHSfhFsq z@cz!Dyq4(QDKFl*YoML6EGbjUE5xpG^p~3b_=^wp*^O|gu8HqO=#3t(yF95+DSCqt zUCODXoH+V5QulRdC+cJNMdv^xes(y-k&bZ~E_eY(8N=oRR9CDE(U3zO*aW<38$ zqGzG!CeicIPf4N|prnpavJ3m*Tk7E4T?i0H2`D7LP zK=iQn7eCg_zaoGBs5$7#`pZIpk^FU?JDv59z79RppI^@pq8F$hmcJN%Lz4XEs)y|l z73k~9AEsBKuT7%I$+!}|qd%U++Bu;__S-D?SP=@25ia zyOQW7=p{+?<>>R1=$p~YlIVNUpGl&papSQviJp!AY7#vkePa^65dDKBdI|cDB>Hmn z-66V+leBLi`Xa95mA-i8oDIxy=$493q=^l@CrfB2Q3E5uUHm&Mq9hus>n`^9HB&^&*P-kvyuiTz6KCq1tAN982q zdmZ*tk1Fh=f6{ui^4XjAIQ5YB?Bz#q?9#aQ+9NNCNQ$1u1ME)dVf#=vddnnwK6+{r zy%2pr?F#c>g1#e(z8rl+5`8oJiX{48^o2?EG#=y@hv?GJ`Q#sm?u_?ob@#K3UlDdI zv2(`zET3H+<0t)IOu60Yx3K-W96b*`Z2zo4zZg9SU*5R(zdI&VRs2_>k3|oQ4{;u7 z4o1)P=lAX3S*nMXpNBq*{9)r-fZi9K<(a6T@BMW#`h`jKa&&2bSpEuh>Ax_&3cX7b zJx;?rB+;|bvy-}3^a}KM(Zl9v75X-GS)1Pa@V%dmb7N7JM9)Is zhhA44koA>^F8#|gOZfMF|Dpi>AUfMZLifENEJiKAEe`NGIq}XbcN5Zj{QmeO8eqv>UWIKKH#?yy9=>% z{NC)d3-P-M`%2gEy*_)NUn#!=yXK1z*OYP{fACj!w@UfV*#X|No$#qVjJ3hM*zn!qp zd|v(jpo3KLt4)NKA_$|SH$BXKBsn0&(cO`c1UQ)l``|LveR$;&3W%Ya3 zxuNw<;|1wAYt-*FpIwOG9PInAQ@@*h_JR5qVE5Fk>bG%jqWloQrPw!mUHx9=v-kOx zd9x0?5pVLl$Xv&l`0O0N(Hq@$UxnQp*v%5VRX#h%U)1@ghxki7iG8v{{cZ5s1^jiw zt{6MV-^V_?fWN`m?RNcrxKD(^qh$N2q6O#zZW8+`|QUFQ_h^U>c$Kh2+iv>7L9XQAf5kvQOu<1n71 z+^X&*%;P`ORxJ=YD!H`ko~Dr=agg@8r*~?^mV2q}wDB=7o9J z5p~~ZR^X=^yRi9Lg?=zZmvXYu_o3g;b^J+RIaB31f8u>`HUr!1o$zw<(Q`v|DW`;T zx}rPfybxYaDSqaL_>p;v?XEzdfF9Pas^7>Tr^9a~f7m+DLZ6((e;)ei zB>4-_rG9z-e)sJ&#pv^s$y5dRY4^(U+q)_UHG#4?2MUIC@>}mv!3-eF6F$uH)6d`4YXv z3kXt=oQ^zq!Y-_xgVFb*ht+cm`oWO=GH=&Wk1BL$-lq0QoQFf^?PmO4_-v&bLTZ{_Gc(Cg|K zX=fGvmV^EP*YS3~c3$Dc*@+UdWxnpk&r{gZEs62>eQzhNGw%tL=-KG+qKCCJAAKEq zzTbb;ykL>?3(@zWH}&h6Ce9Nj=%1m7wR1D|--hnAvuk)eEAi9gAK~phfIc9Jo_;3x zJLqBU?1VlLJ*=Jm(TmZq@V7JC&uOUiLlOEq^t#$9dMWyGD973ef0F^<0HZ@#O&e8%gq~ccGt?*_yQ57NFi=u^0k_wvn?+r91ESr66tnT%c7IA;(5N27g6% zfPSoB@1M}C(EFnEdLWTse?Lyz8P75Pzw+yY`QGXq#)r_-j%@52ZVmrExqS2tbRKIZ z%F*u&Nd7|fEcCE;mY}ysm;K%Ahv;ml5|V#8`V#bXzkW%gotx3;qqD3N`EN?-d(odq z=W%gD_q~@$JBRxS^t$><%Fjk$h2G1bpL4N1U==+deFu8jd@e-agg)M%-}if*CFspR zs(U@jI7$1`(8tL0kYT?0=$r>*J>BOamH6qy-==KhFUQ>eJL7l&JvWJ--i`YQ^ydEj zzW3Fg(6f`|?~mRxN&X^q`J0?!^(#ehfKD|N<1{HTjw{jICh=d1-Wok@9vndLn#6zl zxy1J*{yU-fLk}D0{^-)bVe_O2eH40F{Yug0Z;XbvAAJ#eUE?G3q!N8T`T&3b$@kE6 zO&Yve_aYhfTe-8Rk^sxP8FnU1} zeG2+m^sxPG5&97Hu>EKq`Y`mc{@Z~*13j#L)#%0OVeQN4!QYNT51Z#X=+n?MEk5pZ zYTtW@!K#Pt_fybI$RBpTT7*6yy|v%J@Atabp)WwMtN&yj>`?#m{Mf6X{GONXe05a3 zI_n_blkX++H+M6IsG}WOsyFlNmnGJT{8t;3$zS8wqd$A=qyT*oe|tAOJgn0EVe=%O$MYKUhs~2L^g{Hod6I{IYm)K{(5Iq@m0yf5 zf3rBOedXw7=wa);0(~`lSpBQeSE7g2KYpHNy^bE%e_7}o(8KDNhc16>xz_WlXyW&& z3edkn54&G1MsK++w)oT@?}g`VkO2j*G-K{JcZI!Gg64f!-Y z?qs7+3DKpTeDsCr>;2^nWxXv*tT(YM!mh*Tziqb&yG=Wj+sT+$U^n8+y7vLmtI!9a zhwUTr^NIK9Vf$PbdM|X`B=!g2xi1gB5It;u6rhhn4~s*^=#$Y;^!xXnOUu!xq1Uy~ zIqgR;La(cR(%*6PiRhoo^)%nPagg(T=vA2mVwa6w_E&0G7H-!cyDwe4b#>cGy#}-3 z7gUAMrzz;G(1&B|?Yq&${oNw;L+D}mck9r=+fQ{^bP3KxsGr1wIgtU zmvsU6ExYROUukC^dK>i6@kh@@?~bk4&M9W)Nj-|ud!Tchme8HQwV)4Yp{1PV*bPWh z&Svz!=q>$zeBZ;{i{1zQ6u&;w)ILhUb(2LiE3K9pB^YFY|7CM(};! zVEla;;!nz(g1!;`BCfrDiS}|TB>E!sf1`)3n|0`^yTjMb4)liTm)G*2_G(9`}|_r4(Y zor3>{=*zi|=lphkOYk=f`>;5)9DPy}eKYzf^t$>_+PfG1I`q@H_ST#4yQ{n3BT4?{=#!J^o6!rC=zGzJ zpojHO+9lktp@*Hrv(bm4pWv^*?>St)=Fjx&dOsxdLE0z&{}p9E4D`*1LGJIz#x}d( z1d{$(gul#h!uRWS=%=7J^q1%RKEn?5X6Rw_yBa;3B!5O<*3Z}B{gs3MBYN0;8jPOI z|CHbGzX<&x{=@3O4t*zj*!tXoegy3ct6w#`^iNp-Wn9Yh=_LJ^gD(Bk!QcP-{6ymV zV03B!Z^iXu?3!X17Dvj_8==>AzLR-Uf!-uZJ*&{GlhiZbkA3QYP|s}aS|_O|e_+wd zNK(&2^p@z2{Qc$o`!yw6kCXkn@B4kr(Pg~C`e`$|^h21w7d;KVtKUE8_~Gn7vOcrX z+n_JzI$r8qpU%C~ZT|4$#H*akEbC$HYuy(NO#D5Q!RW7`_wbj;b9E_C#%&7v=jf;V zb>I8=Md65>QixZA6JCGudolB7p3T*p@;R?O7zX> zVePF%m+=hCe*j(PZCL*Ff&3k~Bzh=l8XzT=lxzBmG^0{tEf8_veqAgT3fg=ncLN@9+2^ zp0kiYEG}fBw-%Zv`3HJF`WX=n+~@Da(O9$E z&kdJjH|V>=H4pjyxW8Mc?+3+SC3b(q?n;?puD@t695!rdR;^iw)z}@X4j;FStGH)E zU*@k@tlX)Tl#_!#@o@6`NdFXI_Z4 z=zEgnUy1%f61@_AT@w8O`con0%e+n>Vp-3kvrQ(}kMpefR(JWB^DlOvg!suI>tOVq z=wbI?Q_#Of59_Bz=pQBVzYcu|dR^lr?bw073H`U)5g%&CGi*Gv&};A$){Z=MneSok zC_q1$q#ecR|4q`4a`dnN2kqF5-LcdotQ~vNW!;9gBW)P}*9>}H{VC&_jov&-JM+=w zN%TVW??T!s{!7qhJX><@?c2WR*UQmAMi1-f&FB^AVe5J?`i3Osrw!+vo5X)M`s3)_ zHYDm7HGy90pN}r%QOfDMhbFZ|>K9 z-#=Q3o@_l;YW_d?^P8{VI^%Ev{Q&;k`Smf0`lWNwiPAs3HcyQ6)P&v%{Y3O!zwYbb z{^;k0=rWE)=p)e&M|}R}_W-xoKJP5T?rb}`os35Xc1`Nlgq}aE&{NRE`ZHdD6ZA~L zTX(+mXV!1%c}a9>Z-MH`&TY>6$L@OSQP;c@Kg-dtLjS0qub$FxFV-`I11)xy*flt+ zCh2)n%B#k%S)=fN%NWVNjvls7a?n%J58}(~x9AT}UF2Lh1^=I+JLkIIzkRMN!QZ1t z^MAJZ{rSE>xg7lo^sxTfj6M(jxAunv*u9>_Px>g!`t$$5PY!lFu?yRe2cvIFqEA6z ziQdWIUf=h;7ol%NuWOx3|L&k2ThW(u9WVCvZ^-+gz4(*=i}*NydA|1>Y1i_5P3U3I zi?Y#&q1RO(nNRuX<4Ll)o8$L6Y+KqCbTmHeP9?xi3c# zyN}IAFGdgRzkKvN(d+6zS(k2$vygjVCf~=Jl-T#AA4{?O`IwqI?-xa1iT-c& zy4Hc{mFQn2(GQ?+K@V$Z`WW_9^sxQ16T1B0)tQv#t$W{o+5b26q9nTXQ>p5|wO_8o zF1u;?eA|J37J9C~p1wF$jXnrHY=6rb%l8e?+xYVjPsG6-^ubB|4@RGY-qoMq_j`U* z(C4GeTK4);zxOWvun2t#da~yNGTs%~t@uOucvhj8qldLKejVR0Ll4`>^T_-?}S8--jMHA4}2yl_dX4^t6odbybPp20hzf zzHeO}K<|M5Tk9%g9M7eW3m>N(^iJqu?HG(M|Hpk@>&jW*)FY)O@hD3C-r-wU=I=Xv zFHu3(Lpgr-93MWPD$uv0ht1b2^yZo2`QtZmjzbUI=d#cnCeicI)6q}!_qXqR6$R+6 z&~yE|Z$1>G_dpNp$8z*@lH{*IAA%mX&sL#NLa%E+NdLyi6W7tt@Ym1xdumze3(>>Y zYaaR>^mF|A`QE48x{Ln;^yTO$`*q)Y-D31r=$-w#@AnzY(Kn-?<=6RraQE+xRiN)i zKiaSNNyMot^zG=a{JQVHJbok36_V&#=sSYt>-!&RUmp5F^!0xK(Z4zsaN3VPzg6A) zv8;n)^iuTA{`^<*`x?tl8-x}=%dzXyx~BI3-@_q8oR7Eb^DS2&fo=6OY~fSJ@~$o zJgN{q2fZ8mAN~5+L_Z8h?}HxJjw$H5=$ZcfzBsn%H}rL?hxNk_^se~tc_an6=WXgA zYj>onB($_6USwI9cMP<{_r0tv^aAv{%8~qe=tGj|1?U6O8)NI$L*K_q{$lhCl9XSb zB)^Pz745ulRdr1h#yg&Ip8tIw-!qIl-*K06_Tr~C<%I2%X*V;b=wWdn8@&g5*glqz zo{wH@pYrV!h3KQu!{$Q?`iHdR80zZvll~q5bm90!COiL&X`}@sDECpqOWQK>E6d*f zNWXOAUo-fbLS9;8Pfr=zF!%0y_ebZ%X2+ug8>R}+r=}*dKXSZHnfdRhTZgIEIv}0I~&>+4Xsxi z3iEA4Vct2)p4-Tp*+`f*je7EPZe#l&jjhd%g{f|wD>hB+dylrJ9WBgrM+GcHH^aMY>p5U6E;HTFUT(4;)%p;BM9gVFI z8{1sp(?pnEP3)ydTZ@kt=KZ6Ep$`twm+8Vhc8oB;9AmFy??AQcQzO1i{^HD3+u5K!o1T$nCCL=eHqr*8NxhroG?EfXRm8% zz0^{eT`ha^bKUVa|AXA2-R zIwIkeYX+O2-e7ahVDr-(Y_1t>etLt=HG|DhZ?L&$u=(i?HrEU`KfS@`n!)C$H`rV= z*!=Vcn`;J}pWa||&0zD>8*Hu_Y<_x!%{7C~Pj9ffX0Z9`4K~*dHb1?==9f((nbw_|HrFp?3Nx>jUD?Wdr0HD}t@XIej=Da?~ygt_M|d*fNw>t_k`!&$<--_s&tPk^qx#v7#cAaN0?PV?QCCvN1gn8k7`@s3u zx91D20sSz*=*GFkfFF%-a{*B^O!uTqMj(7YXxFzP&BqdOu&7J1-XIi;L~@ zKGtJ>gn6frFwb3L@4LkM`VwIt=_|}neeHFZS}$EH%&tp?d8?m2<1*{c%Y=F1GGXTR zw=4Tw@AMbum;S-9~vUeTSI#CbJ0-y^P$$Zp~B1< zmMb>H><5QiCBubTGhCQiBkT&sZiFyDk1!j}3rCraX4%7$#7-j#wi*F%uaN|sjexh? zNP_J~z}s&m!GmISx-ebaPx*a+z-R-mBX#)hCAG+ z!yS&@ZQ3=~Pa_;|*)(gr; zZuV%0`*yUwVvMzHjKggo<8W)n+SOyNAICb}lh--iJ%#qhLhJQHhx?(>;oiUAE*)ph z9_MhcjB~ihZm@UWU~Rv_;bx9^xUa|CJVAN#Mu+?GMu&T8f_-R$^}_^*TYQtl-C1N; z6j`qnIo!8J4)@N@_S}iq%!v-SW}?GAa*Ms=7VE=X9PXY;4!3KPz4TUV@vRQ`{;dx8 z!eslvWb50>4)@q?4)@D#_WCK-nkf$V^%RGD`*yozs&&s)hkI$N!##9|z3mR`{W~1) z&S?>c{9;K2blMu*w1?~(o=BHgAx1L(uh@FYWT|1NUrctJ`}M(e<)&Y10{XW ze8X>@AF=0>p82rhH-P5$@T^;T106Z>`-oK%4@AeRJzT)+$Dk|2-^c!69J z1abi{kV}F4@AeRJzT)+$Dk|2-^ zc!69J1abi{kV}F4@AeRJzT)+$D zk|2-^c!69J1abi{kV}FtrcB~g1>wEo|sHhgs~{egJwaoc{n%jVHxyqC5V{yGd+T#6~^{<#Iqeb>;s@2En)Kh~%f|K0nmjUM6M#utrS@n2^@-ein?t+5sV>-D=w&!v=I$NX`A zQ)@-j15|BA^S*bruoks=&s4K}ZXx|(m+n!g?8e#8GVelr5vrR28ui&1N{x^3c){8am%i1jC#!}RWD+1TaSFEz08ZAM_Q z{ondlq5WBXYl{7PeT&6ZUSBGCPkpK6?o_KHV*f4G`XOR3O||Zh+A~wF`=d3HZ|Ygk z#qCXT>ph)jCohcHi`i8;%}1h` zMT||A3QW~^*R#6Xf2&8mme#X|*fZ-{}* ze$TdcMC=u|^6|?>7v}MzcF+_#=6h4t@ZI% zU&XDvZJX<-?QWL!z1_XIp0zfm)u$=eFDW+Hi|g^FoL%)ki0~rmm-=iiQuR(*e`mt| z6z@JK#j3Dd{nNJYO|iLtHU%I5PU$`))q1sFt1s$Vcc$80KbgusgXHV!4o28A+!VFn zk6J%P?P)Pt*?*2%AI0p?V%GGyJv(ka9ha_(?Tkj=iOOPrK4QPbo)@)CqkO&H{&&>+ zd(8eIW<3+PSrGq>H(7JC^`cF)U$@(F`EZK;*vVE!N{2g7wrW!B>GiA?^)BXmerl^- zZLQZ+?YG-nTT<=k+FGBd+Vk34-=#MB@g!?jefuxm&Ps!|l<`NHcF!Pqy1z7wUCKyQ|gTTsO?caKwoV zBi2gY7Jkj7`t1GJ$u0jkYHD_eVb)}=t?#;*S$#jpS$(|5%D30WS$&ViS$&6Nvid%c z$?97llhwC4CadqRn5@39qO$rbqE@L)G@0YM_W9OL_GB@9juTnL-YGY;_JdLDwWz%z zDlzP*sP$ybULLcy#l-P_ar=R|^=jOHD{g)6%<-DY?-lyJhkl6}b3ATq4`bDL zwOjnfiC~quSF(9wz=6;Q(Wro7%&^z`CZ6>pc4+YmDLRcd>7= zcoyhvaJ3Tt+_iSCX3T`6C+;T&*W z`v0TVMA9T? zx;2q{94$xHeEYH(w}nqctW{bJ_d8P0V)ukc}P+(+@q z?)b0`wzXZtk~Z1tv!kW*m)RpDJe%fLXi@EQY0Ljc=iDIEW+X+(8A3wgaJh~J>%2UA z&AeFT=~#moVpfIJ`J>pl?eWN-_^^$(^-1kI|8Me2AJdO@_VNG5?>UhU+5P54B2Pye zyb$5`pc%ht8yU4V8rd6da4>4klqRi;*>A@ppT`<}9kZ&1aEC$q=E&0^M%mY!DIpW( z_s{P=@OuyZ-UGk)!0$cqdk_5H1Hbpc?>+GUa1Yez=k^bCYqi4VYmp?}!*LMnE8+4z z&Nn&T^hJU6<$?6@KziTs+WCJ8q<4*~t$!a#r(IiHpRDPl3~epZbeg7TJeBKQ$*%;- zXIsCX4*qz!h8HpXeS>H&KP`*f0q1k5U9N*ECTZ@7is&CN!{g!&l^H$6GG4wJZyBO|F1*)zNY=bf>!CcY*5^)xLfg{V#?E|zD*U|D0Wut zr8q!wl;T9i>5B6epHf_!*iYZIAe8o13ofUg24p1DWI8kxB;(W!Y6jv#3 zP~57xTk)V`$}%lqv5jJ9#a@a76h|peRGh9jU-2o$Rf-!Fw<_*dJgAuRjFzw1MzOPE zFU0|hqZB79PFI|-_>|%*#SMyE6?ZEhR7`nR%U5ip*jcfc;sC`_iW3#5E6!JZN^zCq z2F0z4yA=;ArYzU;727CwR_vuXKyj4fM8)Zf^A(>`T&1`{ajW8P#e<3#pYwb6?3&s3 z{63eToY|>er*>y%c4&WkhxQ#$@0i)P-^hZ@-ouLwf7x+hu z0E;FV9PM6>8CNuN!g#CQxEqQ_w(H*Gg42qIU#qEW$KBj+#LZ(03r-tTV6~If=;1ew zw%QfkIu3sZ`K4D!nK*L7O=E5tS1U0TZNkXH;gUhG#upY@?Z%87!_T6TllVD`1lkP+ z!;6Mn?M99sI%>l3>qib9T|izph0|-U89H*(H6zCt4W;^pBdvDV6x}f4CaPdy>@}EE z%JA#QT!ZxuIOaz?r!?bv#7$UVbHnx5j~rJdo&CT3$nUhv7VYl$Ry3CsA0^~>7yTdI z&OPb`u4M0b^JheJN%1?6N@O~z#E*F5(z!aFpZ@$g(Oiem(fnCXD)A$jKM(03vBE8X zSTq+#;-mvsaeaff0V`F}g+5#y!9O>@8$b65$)}MtkdMSyX}g=>jiUqLBzC&_-FSSc z9V8z&{+d+c+~TH(a3QhJ&F{v$4G$ZOy(+l%ckNuf4l{|RZrY8fs~4L5a}7B4m%elB zue3Fp3*p`TZv5{3sIhS4w_CoO-)(Rt=Z ziod(Sg+IT0Ufb5soTwVQhKkbH{!bYR$?uhNSx+NhX7Zom{4%tmGx_5aeVMs*$IoTgbK%dQaeSU5WgKrxYTU-P zG#D)Z1I=$rBjKLE`WnmN_y^119?0KJ^EcD{!SM>_-xGIocjHhOnTjsdBfr$Yy-O&%`3D7f zv6YXDyma--b_D&=W`L<_BiB&*K(f}{_2)k{MDv#zwk2>2|J;6a=cR-fx9!H#{7n6q z$^XL{-pY1_VEO($!RwgRE}9#pDKAQVt&5LYZv6CTiZN=#>a@4L`^DP!DV7_@YV-9h zH$K(oQ!O{{)aL73Zak^YH?Z6|QJX))a`*q*d>Z?CuAg$QV-|PG?tbl4V^%}&zS&39 zZ%6Siv!|a@KaDJR-}H+ytFh(ohqd`8mb=f@=8sP7Up^tmUx9Gtmas&KdmG2$kzg50(fIpsXPTE_g{k)TU z%craI70>57>G#MlpE1fmxFXj{zpni4@Y1e<>R)MVq4HM-_?ML*6yW9S&f@2)0RMyX zg9Cg+HgU1PI>4W*{Ez_OTlt{@ex&ll0z6;;bNmkv@cdZ}haVB(|DpUf0scSA7XQQ36yWoepB&%^D?cT`Pf&hpfWJ@qX#swT@^=OJmy|CK@PAW&dVv30 z`56JeJ_k8z*DU4T`Po|el7M|j<>v(WeC6i`{ESzAf%5J?Hdpzw0KZK6r2+m80 zj^j?{Ukvd7QGRv6PYZ6&rM>F|{MpKH4DeSeza_xmru?=5zd-q&0sgPb?+NgqDZekk zA6EX5@=Rmra~vHg^{)=_-ITYcntATp4_7`O;HN8}s=V8uPb=R@d6LfO1Ld0q_+OOI z4Dcs&kd%714e*yK-#)<0a}BZYqP$!G70TxX_|KKk4ftu%!0ZF=dl&b;z~%7bzjwfX zy7I%6FVptUhqvm8`%j1P{K5(Te|>J*;_$yd|7?eE&3^Un!R}6ptF_$Ac}^qzn!CfUon2h=!UXb`I09MKVR)P!na~v8u7h*`MCFy z->Q947sH>X_VRl)Qf|g|#?LtAhbZ5Bqv3liKUew8O{Sj5un)>-vGNVK<~r%-&QJc1 zs`BkynsVKK%VZ)s<1*6tcgLlR@@F+P_HKVJQGV8U#vZrM=L_Xmtuy?I%Kr@Cgm&Hf zTCT(F*MjAbvpIjiP3>Ih*3{Hz)h6S|t^Ww+M-4K3re?TJ`EK(KKSTMs%9p)ic(>m^ zP=3~8!*^2qI4{biAEIv>Ue3GnIam3^{1G7e$o-{!3YG8kma%VbXsZJi7C&tsHGHP> zS1CWKz3Iuv_mp2= z-^?Gk+{;=S``~)NQ~90SO}pIn_=58N0`*Kkq3&^M2QT$$vflV{*Tt2}PrJhKZhdZ4 zzIeFd-FY}y`4$Uy|)xJLu0HvNUewgbp?UbLY{D=jnJ~NbmQ2FH=N8EbWJKgwMvdq}eSNm+`kNDc~ zB%RNEwf6^AHoJD{W<4}+Vw0^{`=jA@1?#zRlaLrKW}h``q6f| z{d}YHX&X#E-T5$A`HD9T?~dat<#RtX<+}527ra|%U$d-gwcoHa*P-2Vn|3z!X&+b@ z9h5J7xpsT|DL>;Y!@K*{2<6uX?3XFOMbCTgdVfdxsd^rB>mNJQ)Mt=o{PSmgoX@e! zk6Kx~K4&R^Sl3r?V{Toi{M5sy-w1Qg=Pu|BRlO2(Qj3+RfOnY+&|1cU%U-%lg{;a;{_dx2UndP3?1ZzjE!% zln<`=&C0jaa}m{WKGn*9u+OyXSmno`E9L(B`SV10X;*MRpX1nTW*;n8`!BSg-Fdr4 z`LY*l_wx@Seo}HxKUn%4QoF%w3NQ6(tM?0SwCo9Vqwr-KH{JffPx(CE$J~C~qx|yK zrar^f&-nyC@iSTPk6b^uz`JuyO&xeZ?fdBY$354*rhL%|LJ>?YGC3pB|XcFDoCsuc=bLFmN8|)KB{@ za84ej{MJCZQ?C$fC%Z&e$PPO@=%3rwN_;L52*~+H`?q{D? zK1wmuT8#Rt}QvVZ` zFReE9IY#*hln>r-mMPzITkZO+Q9c;ow=3U3&p+-w+ymc4%ksm2)qclQ#{Ya3+h1wg z6+F-MRlc>_w^#e|@bX+p{w9Nbnkhe1?f2;O3b#My|E!jMAWPSsTkhNNb=C7zwIA2k z_#Pj}DZdzBBK zd*ip5`fU8x)aNYqbDi?Lb^Z2Nezo%X&l-Dop43b>ewyp~%AIdxZ!>&@Ki9Tjp!~aE znE9|@$K`qD%SP9>e~=p@8LvJXuQRni`L`Q>%eA%b=S($xY2dlaQ_7DGJdfI-{NTWS z!Dq^!5_m2Yxx@Hx7&`cKm?cfY#)Ze!m- z@6+A&d%N<@bsf3=|B&*}2c9#phOeuh?}hNY)lcwzZWWvQRO|Bxrib&%RlYFL{{xlZ z`EN7s$E*F#%D;NE;XmQNQ9kpOpQ6u2-Sc7UJ*M2|+l>7c#@uSD{F^8BbQrgP<|;pD zyy?$Jq9()B%6}4g-}H;}>E{{y&g%bIZscVi4mjTU|5p9%oN4$KTaCRN?@r+0C-&KkE#^2-D3be8h%1O2%S-noyE2R?k<`-u7v82?QI^Rt!mh1Z+< zj5EbrU6l{+W22Sd{fx11sP@a0uhw%W!|HrqResiW#@_A!Pn6%Je%yUK<3Ur;{d)h^ zM*Z|q{^d7~pA(fIt$geKhJQ%;?hhM3Z#-dmwoT_VT>000g~<^S}JsgKK#SYYaTzdrwT+w~vi=R9ZZ-F`mx z5o7%%pYp-?l~2LTIb^-|gL|&qruM=2o`;qHW`U`vJMKp> zH1)h*p93_}dfuXZY2ZD@eC6Bd^QBAGekHt{S1AWJs{OFQdFH-HO}S6)GWBuKQJa+S zyv*?Kxc^J}ZMqLIEuGKRi;SP%8V92>!{4fWqrh{dXO$nj$@q8AY2Pc~p{JQ4&i@sN zs}7GD|7Cg~*W9?bhAE$ay0LfTX2Zwp?uQdY_>19XAD;fYsm}oQ|C;j6J~cd#6P?e0 zUHgTGclUwxKN&w)1;+7KV3VtZ(RC>ssE-sdN}s(Iix`OX(yO@-cHMXLiv76jlJ9dyWwSj&Ky|aSn}B1`FyYT z4Rt=d^RQL9DL3N=&?nsoyIYulClHrrhuJ zexa-K=Pfn-ExImFSN<=`FV*`mci%XmeDM9?3CoP1bM?MHSN&8ef7ce%UiZH5l4p#4 z!Ci)T&qX7Y&kM9`vhuB;nvRS6`#N3WWxX78j2T~d9G_6W z@581(GqnDzm48E@54-*UALWa6e{QSxCp>5Tw>!o7&sM(4^M>E3?-|cf{xs#cjWOlA z_7h$(_FeQ`*IVt&m0va4*t_%gW#xn4o7$>;@OumYRlb?lr-S;>deM|y_L1@5UHQ4n z7ydifVcdE9qVnIpZ0yIVebc`fKh3q@+kX$%c2wz4^KfCQ+ulxc%XP&C|yOsYeV*FpA z9Z{`(w<^=#TaGdrnyxecmjv27P5Gufj34)0H&6NCbK_Uwn`j;Uutn|5G#J8)nSNChmuhsdVspWp{^15DJKk+w>pZ@xM&z+xLl%M#uDR;5@c}V%C zR~Y`Wh!J)uzgC|ExN{)4!uT&$|E<-}jmme{eWO_Udz3HI_V!c$Y1e+ODfd|AzgE7T zKHqTHMf@#OZt%V@OZh+O{g?YZVS@4(>i*nS{m)W9_sa2Q6XI>x&)eM{ zo^8tc{G@!w_on{ty6d>X)H6ljbGh^CQspn!=cVVWpUKJ()cZttJ$|hGSbd-C?vqpg zX8a!teD7%ob zzpl^sT>Dm=>#k2WyzFDacs)e*{`pz?A^Kd-U8il{ue%=# z;iVrQ545*f`PKUT!JTjKDIfg4dbRSKb)CBPO#i_65AJ(cC_g8#-`=2n@I7O(^6j;M znrQ#@_|W*j@I2EGZhI#x-$U;U-1@wz{E&XezI)U-+MxXQu00*1mHIz#tMQ+r&j(!p z4{SI5em(ymqxP>Vzw%P!=Pc#V{MgtBpOasreDItw65eg2x^UngwU6ubz~(9*{>1oS z5_q1_dWYdZQQp0ux?B0S1*RX?sGk+^az8jspZg6~zR{<~Pw>9-IOQkAYWIIf_`2$U zzS;+$KVPkUw)Vff4?L!Pf%az`x4p`b)%Qp4{5exmw!&-pWzPrcgMZ;P6O z|DpUiegD`=>(gYH@qe|(L6gg}u2%jO?a!`i|EltfzBQKadi+xPogd~pmhIF&ZMX4% zS)iWn;p>`LH;3@E)X!(drd;>j_?Ys~JZgBie^x2~@%4r;)%tuI;=kiRO+AC}i$^LS z{JpT-l@H!8JfVCe9k1K9+&7i4e7SZ#zgK>d#!WXKrSCEIsnYwMJoS^S{Pe)SaqZW} z{>8w0nXY_}o>!-F?Pcr~EE>*-y$!%)D)+eCBt?{?YG@ zpPQ7=Rlb8h$LOg1&B|wPGWHiLzt-i|PebLuQhu1O3%4JR{oa(@NY9z)sQvlMx7YJk zj`HQoFZ|e)>(1Ma%8w50xAA?({{(%%>7K7fD*t@odHY=DTlO^mTWYz>ln>sgtb&*M z-+o!HS{nFB?RV&Y*jm;4Kh(WmTEk1+?{l#!m+9nuIx4@Y!tieW=Q=!p)*?{ua<%WT z?@!%wcPO8~()e-LSIYls?@iz&%c?rzqNfE!WV2aB9Gj+9)+Qq&S48Zrtf;E!%*qNf zvZ{;rlSgDkWL8u~MkEoD*_A!$*UTV%EFvNbvIz)?+A@5IEixhqvgj}f3WCr;3kV{s z&&7y1>VSGUDZIU{sG?)p_i z|Koe|KEGPVxyv_s{2OIGA0+g{LihR76NLU4u`5*%`3<38BKutT$%lo0ix+oyo6z4P zct~CDd+OhKJ}>h2?bAR{;;S!6p?^Zg@$*LS`7IvbkBit6y1x#83_9_LTSec{=lz&m z@7o=p7y3VYc*vc<&G)@daJ&h5UmyA3O!xifw+a1T;vZLi`|;mRUWYp9v`=33Zr;zA z%X&_IkLh3W_~%KX-+C$Uhc92kUwHVP?qtTfQughFj8hi+WgqA9=Y{^OLcfpTw0a&t zaVd}Uw0H6KKQ7Ok{{g1^_FzTm4>-Wr&&v3}4tmmi{}Z|XZZaR`dmk72C7@5bYN;In-F6+-U{{pGSg`o3NSdeS<)L9RdS z@#lNqoyWgY_M6W0TSEVryYhW6m;3(25A*f+5IZy@^lL!ZYlLKeJW;NHz1V9v$%nUq zPV;=bCwK024<7$n@8tXHxo8Xhk>33O=AL}LpO^GKp?_D_Ei3oE1`Y^%FMoYAk3TN- zZJ|$pl(ihot@GFA`fuEu`NQ|+{J!|!eBbIvc>F8mz8@0$dj)TQ zuF$_Pbl;A?9}2l7-FF&vdakPAu}{8)2l{oPKkzerU)?8vE%XP>@jO+|c7KG&xmo1M zPs)7mep&K;|1;=x-*%T*M#q^Hx*wPRc%lEpdwD)OeqHE(9^97DUoUut@~hVh-OuBG zx6pk&`5%PdmiU>UlIQw{&{sU1`Gl&uQkL_;13;(eeepy2c|RfyeN5=D z7JX9r{1b)#e8Cg+d~FN;LEe3TP3S(Z`xip@)Aj!~q5JvZx80w|f3Dbry5D~00Ze~|#!;GXG4I}`|{)VUoP}5?|E+) zdeifleNyN@C-YIh^fUjN$M^Ho%R=|#v2PN(Zx_5v>4$m#TF2nhpWyNDm*aE#NO`U= z2z~rd`1%Q<|I$PF`ZvpY*L`@C(0#w>dxY-C%UyCMkMkrC_xMSnKW>KS^BB2r>!$blT)t$MY-P3AAE_>KYEbY?Q$9C`$GSnM>Ac| z#feAoeV>$Jy7JXmUX?u0H-k>|e4Jdb>+>z4`}uMAdNf~u+2{DV^gTX9=)V2+KB0eI z&V|00ZwTGTC+|PT<8R4%Q9gf@(BJTOzVBgKhab%F^@qR7d|+AV>q7sa7r%O|&`*hf zXHu?zM3%={{Sc4y?|0%4W`*v@^REcq$CFj z*h_?d55XUFoDT~9=6~XGbpQX*IFGX-dZzN*hY0<35-$xi&HQ=x6kqS>MgES^kBS|X zlj|Ql&DS52dOm6&{h`pGBlwc?nST?y@8`YG43Ben@e3T0@e4wKl_xK@h5pztMEBd5 zh5iyRUghvJ`a@7rJNLigk9p9ebG(U%L(c5fNy zHFEuy$UEg5&z@zys}=EMZrbOGM{e=-M2$8JI3RDTlR_W+n*P@AHTgJ^ktd9 z%7xbny;(jY^5}7o=lQ(pt^6MUtIU5%=srI7WT8L*E_`2= z3(ph!C8CF`JpCh~zhC?>SIGFkyTtePZ?C;g2(smmq!TQw@2oL zext}WUALmpe_!PCkIHksL+DSJ_#c(;KXH=p>&Kft8gzpb3V(ZmjB`}3f8Y!FdDRd8 z3qtqz)l-C?6+Sj5=szR)r{W|J|9|-U7_KPvO9X$uOy>D3LjSGb=XFy)|1HpU zFUh6m#}EDjkN-HaroF@w1uZPnW`sIQLDqnpW=wwH~&XY&4*KuCW^VEIy z0nn4?`7d()#{{SS4|#~64wA1w4m!!ZS9<*X&QD6d{>MP4>$4x``Fujge{+TDUlDuf zXLa$`nEqYaZ~DCBLVumu7y2yE5c;78kKdGWULo|ie}?(nwL-sH=-(86@_jk)zi>Kv z{$0>%{_hpOr+%(q75dGhr`=b^|1+Wgly@#ZBy_+2*p&?)|D!8B|A)#rj}f|`zjH0< z_d(|szux;V$o1!BJyp+~UQd3mRnY0VKK35Iude4qHspD4V)}DsKF5UqI^la)3H_Nu zf8bB?d3>I%=f4Ww&x5<`lauH3Akb+(ex0;qLjME7y;VQ_MWHXfmFKx3^ZBlf|AF7X zS}6SEaGS^X>vVO5{x54hj-Hpl>+tn{9_2%>PoDo{K&Sb?N#cv1C3im#y2teFO8Q2VBSap6bb0fKKc40Kwr^er*W-mRCjB|K&pW>&xBpUwE8b z1HNA8dC#XX-OnF2;JvDfzbVU?B@ynqwnN5uKeVWg#Hwd@BP42`M$4~^FAT_?a@zTx?lI^7li(% z*YZ4d9bPGPzi#atg?`ij;Omv2-1nDx{42%(qI%#j3f<33`aPlhamzP@t~^JkZhm}L zuD@0EACIl8BBkU*r78*|G=}D?&rIG6?Bu&BKuR%UJ?33|Nd%oN8JzC3;mO#=PN(?d(e}f_iJ*!pC^0ibNIe~zWL!_VfvWZ zrz$Vzp3C&7e~b5zu3KH`r#-#pmqAaO&j;lC*MElJyXq~s3Ei*DS_H$VbA8!6_`YRX z|I?r+jsHx!{yPt1c`YT&^Gg4ZhyjpJ#Cv?Bg=bs4u77xe%ywI~^m$4K$aNx=RKd;Y|{@`jEnSVSFblT4y z@rNq^e67$IBrZbv_Lqe2*XR6!H}W`hg72w3ofi5@iAz-ed4tfu^d5dMiu1o&=nr}q zuY>9X|0HxjpYhv5_xaBc{SnW{&(rw{q5ru&ugc{^Ligiu&kEhI3wNW?U*N@il;6aB z%W<_J!&d_k1hUU;P*SURLF~9wl_2@707pCb*6Ay%z}G$GhGj z^cR1V$Isn~Z}4HE`~ImP`g5L-Z$~^#=>C2?D|EjO`HezJ|7jibGfX~KMOrppZ4v1{V&UXbsxT0=zd<$Cxq_fd*2kgUl-+v|ANQ&_3A4? zPkOGbT<_;`cZBZ8Gyk5@e@Wtgr{#J7Ug$oK^i`qz^;+-o4xVT8oxIPLKLkSe<>NV_ zf9N*eC(1WoF7yw0eB-S`f7-`+{5#7$FMTK9*RPNID51Yf{J*+y&kFrfa=ui5d$Z8r z;mNN{|B}b|>yAE9=zg9^LFj&-$XTJcMIY94eeAv9GnZU;;Bv1|+;yNEf1Jd%Dj#lv zPUrgQ_j%ov&-|v)eL3}7p+8pQtaKf|E_A;x+};1`P6sYes9Sh{(CNN@9kxdc-LH%O zb3%WM#9gR7x=!ftmi5>3^4mi9>wLaR=r?$H`1?R7|JU*xuQog3ML)nB;(yEazyDoc zAJtbM_}4uDmwJ5lh|v8y#?Sv>e7;`c$=SDnPV3MR|BmVd9}&7=f96XfJ^?sePe-gT%uW|Pe@c2*rOP#6=ZXe=#`t`IQE_C0I^YcPq6+2XMr^OHRIFoo6wgG!XhN?__?i z=jeK&U;a9#>->L5=sqs}pFYCl`|e!S&Lq2I$>hkM;3>md5=kH~z!{K@3;FZ~o>@Ar*50(#Ouf1+GJ zeS)9&zB2x^Qm%icT<_x&e5ql(>%)I1bicmt7lq!D^QCt5 z>Ob=Met)!Q3f+$n{Qjr;`pdn#Vej}1)9)&Hvg%O>KFf4JUgC(*{r#{FdeS;SBZdAV z8RsuOoc7&9zpKQ*={fyO$~f77;(5mEi3$DJ9hY=q5FB7F9BVzku73={El4j$8WqFbkfHT{0j32-JhS5>z6!x@Owh{ z^EmGJd7i(Iqn;4D-=FI%|IF9FWtq=~%8_GVVEU&8k5ajLlh9u;_N=b+UkSbF`AzQk zFFcN)A9_&eeqG8NgzndOeZJ7Y{!E_dZ(YKx`Wm78@9Psn|NhN^bhlCiKV3`PF@X z%fBa|)31U~^6Mty1NyvIe~0OQU5gV!zfJsTI{qua$JhIPrrslTU$6T|&`liCvzQO) z{O|nzq&m;^+Dq*>6Yg#Pj$2c0E_uq zhxopJeB(_*|EqtFKG(N|{!qayl>a>Vhj|=7j`ZUQ3y00hviO`=VxY={$zW4hP9{+PvIKJNa zSfRf|;^-bA_x*^_{kn@^61v~N=E3*n@ryNHpS#OAYeM(qL!Kq{8zrt%=lNBkFG-$} z?$0alcM16U0}p&aaDJU<9(3Zve!a?5LVuma+v_+l6#8|q=6R}o`BR}Es4%@L^Z$_0 z{k(&(fKKrk2c+Jt#tR*||0PCWefv#U%Lx4A{-D!5eY|v1=pX$w-}mA2t(zXm*MIJB znXdkzj|<(eQ+k`w{ryw=F&@W{$9}fZ{dzBdEp#78`nJ&hJdTGxh{u1f*l~(eEh}C4 zp|1Z+gnr`}`MH$Oe+_iq1Mb4z>&JQgb7JqP9DLY=nSMb0u$q_gQlb0(x!xr7TZO;r ze7-AmKTqMZD|r0Zdh?$a`p5o-=YNGv_O#Gn_XeixJpWec{=WLM(C_mlzFyz^iHGog zWBtvA{;!W_dH3UT-wz7iukZ0`p-&25)p+bHujKLH=jDO^7op!K{%f88uRN5mzuy~q zp1N-D2i@S_o}Kl1x!&)0`J)fxas2r3XA9lWBYUIJZ~8Xty*MW3&+&)zIDQ;>Rp`Gd zeD5K$J~s;8_ji0y=u5H=SIPB1{0JWZCQna(gwR)Izo~uwLZSQpN&iUbexH$l75WWc zJlHEA$@lg9WZf)uzb?(kgzm?YKH*V3&auz%`%>KFLqdPP@Z0|(&-ZcFGNl{z!`mivBE=)OPVdqRJo>?@TQOA~xw-;S;c zy)FDu?fs8{u4^T?*>Nm|H%+6f6`<%RzvD z9g6(xnmOmAYAaZ4v{uTEpxSMAndaK^7 zck$1K+~lGB;n@=l%fX@i$--Pdm|b38DjYnqoCjf{aICO6i-$5-=7L~j`&>}os0XXT zWN~{A1A`J&R)Xu><&BM6+gyg>(=MxY+YR^H@v-!4PnVn3MlEvnWZ$dtmg?2WcgFjE zXRX#9@*5kQk#A)1#6>JjVSS_3?jCDZHygF$JT3M@77rMHba=B_>DF7#;#AODIa8~2 zaaFN+cxx+P%3}Lmw~)!z%^3I&E$$X*ixVrYR;QcEZZyi3+UZuKT5ER}vOy-_%-|@AI>-*&Qw~>Zn@s9wXssIHddlm4cg`AS}pma?3iA( z*{nZ#v)1d{OtxBEEpIlu0iBHG@iJpuBw7T_*nRC6|sNaBpftBHK1ywMG_NLj9!C1X+HsDmjOudAepC|-sd9GxLlTqT~Wka2gQfGtX#RPhOX^FW?Mn*YYSO812)EOBizhszF_<>At zp|E)3lyiMfu0Jt1moM@3vP@b$zI1GMfu@k1o?Vz-Iu?}jC-X}Mynzxp-Qtm8A-{NJ z`KY;KQm){~kA0q*nLTtU$e)_a7tNc)K#Tm;nc~SsV#=k$b-ZFT#gj*tj-Mz7#Zvyn zq2u<0+?ev)QhwoZaO61VvPiR7E*#4rKVe48TAnP#phyh9a6Gv7uvyC)pAI&i^12bcz~zR^HNPI_1NsGkQ`1`KQ1iJE#;5lnayl@#gab@WJcM^w9jQ?$&YFm zHk;Fldyi~xKI4B_I>Jj8et%~1SpL|-{1WI(c=K~X{F2xd^pe7HbC(HPmBsu*{#bAr z(td7vX(2dx;_%_T5sTTW=*Oky((K&4dx4#0>KM6p>f@!;6;#R6n<$vo2B z(b+|O2@@4b;W9~V*J99Y;h+bQ&cRBfRXLl&+RUZv<#WMmyH?{XJIR-3$7s~nR;_)y zRtC$fwJWt|8poVA*ESp50eH_^b3OIS?8GAGIorS#d(3#UT7v*+WG02HHCk)g05Y?& zFxd=lsI^G}Au`joEj)F=`b;}0x7Rv&TVSeC8`ip~+q8&faN#W| zQ(Jk`7<_7%6szmT*CG1y6LVKhPfbE2q-Vfj?eca|YgVHKR#bI*#}6Ma<#A+Z4}!%W z2o5~~oT@NKJ0>$VhiNryjpG}&X0g?%SGH#$S@^g7;uOh(#S_PJ({kChr)$mS*5Srx z=X41-JqRth*5<3{>&a#j7u4!3w2L z{!lhg%1^1AfznxNLCIXlh6~Dtg_W^<@eFR0U(N)}V*wN=h(Q`pBynaPGQ5t}sn*Wv z4wzOoz);QhDlFn_nVIG$bo=t=8tuzq!z=(EA{!J+xgh+BE2mDEJEyTJ{1GNXLa9%Vj#ZO-JUX#;lZ zH`L4uEn1Jid`rP%K;w9yzvaZQ_K;^w_C6ay*Qs8 zlh?LXgQnDxJ&?&jJHEDD@0!=^=%c!{6P*pbpUozW81wv7a$B9;bg;A%biq;z^-_0y zqg-zn=IeODm^NNstpO!C(}60J4L}-i)H48<>yt|*pf z%~P30IEk@fK$*8t>d+XSe10yIUtgNXe!;^p7i5#9P2O+=Rp|!UNW^%sk;a0__1gMM ztsTDn&Z%;B0h_Wk9!za)%{J;~%msh+88J257c7Y^G##a~W<9S?7qh-d-rlJ+y zHp6Gebp!MMF~l4;QDJ6fTNumYI3^Qho8^27TFCH!X`|+_@5h5P;oK*gY4Oydp5Yoy z&mN~H6iGXygFzva#dIpnQ3{84FbV!jIF({%5(bZK%*9r>zPcSwZpPlponIlq>R>Jt zn99c19?YTSyvr;YH2uM_G)cWzX3X5oyyjipu{1$1P8K;Q3`f=%Dv2H0+~5AI?=QF< zXJH%zW6D7e+hlSpsCR4Ygj!%1W`e0Lb9BZE=JpHqF>`4q$Yyolg>O0_-j&Wg^V5ym zYIhwLt8#!z9=tGp=wR{Kp>nrOvjP8B9?u-iJ-k(1QO)PU*Mv&vY%ZJEbG$fRJbBa@ z!Z_WACzZOn_3{Q-Oh*qGGZB~L;D&Pb;F2QsfDg4Xg|Cq~h#mUuULAVukKzA@CoS#J zAJP4oeCT16c!z%YN$|X}OQ+}&XiD>RhB369;hhhuEG_X2NADFm!+U$js06Sp>YwmJ z_y(~U!%U&a319F}INg4CCw!(+Z=QuBwA#|+#|J70&DMyqJkF}4DrAx*X_DqOPKsWk zNM|H#;T=c6GN%z@AMBw*T-c~J(=m-{Du9B}UWa-QCf7C^CG-by2IWLnImlO8i7Iuc z15u$0MTllnm!MRVzHM}->`|l9AFVZD>}1BE5;38ZUkXP(gK3?~gE9sws_F-Q9rVTV zYdWpwC=p$`CuwN#8WQt^(LNQo_H?i zB0P8Za|n5EF0gu2^j;C3ySI0Y@?850e4Yz9Nbd_Ks=p5M3-jC@-fbqkT5p2e5E@cz zt3smZIpvt>`NpvVMr$oxW8abmSL$Xbaq_FJbzlP(m_?SE83hc`0e^>BPH{N^gUbbY zeNgiZ*GRXm$)b+hQBfr+%DdAnrKvVdH<-Kfw8qvFn_UfY7s!qu_vmdh?!~h~)p7%} zrki9Vj<6_t%AL;=JN+O+Vy64_3EpSEEEpT1=*{z zS526wBtRfRoerPd`#fcb#s$GxkjBo_Tpn{7c2Z!6($qu{&?*?Yj7<&AJ~Kg%8~{nR zW~EkMY1F`of@Gy(rCzPKjrnhn11`=vCTXZH@CQkH2H4~T*yJQsBmIdX5)mHIV+cI9dVIR<9mnEP>7H6(8!G+OT{-rRQ>D5;I`f?j6u9@ux z;x*@OC-33ToX5_*hWU-Y5)!&t@Qw(eQ>TL5RpY$`5ELEXGRQ>G=(?572^Pa_5ZXVz zd7Uz}gx#uIS0-xFO<0Sr1ZR1zzgcIDJc9Uvt(!+CzzRGT>tO_4R(&8IGgcL;myu(E z78Yfx5R^4H#-rwjpiO6RE)toXc+WKBw7z zUDjGw;5flql)J!ZS&`K=E@U^EU4V=6oT~$8*UqAlwds%-{x}0cRyKn3slN{LOONAR z?0uYf;xTgYl!2nd8^`|F=WhmvEeFem3WnDFX^m!;R;% zY*<6#D3h+uEY9(-vvL-RjBqiQP&X1Z!P=1{UPey)2!K1{Wqae_R+-_-x+qR-SK7yE zZ!f$oGiID)8wjuO8tZ5YTxU86SzNx9nKUK>*o4I&nY|FBA>c7sM`+jj<~leMgSnv# zD727zSP(fIEfRuZ2E0Mka7V&)48u$ge*!~+cP%pptcQZ4fXr=JU%toLgm-|~*ccmN zSJ{AqLO8+>VMXeFa#Vc?Qb4*yzBW5FDv>7m<9!LN%Pl4!i^iX$UAF#yAJ; zNa1rQ`eaX9gDa_u==Y+i_ zvcQx%%?6>0#V0=v5e?^x73>)q2`@?*8Cf!3q`1vDNdc3Dq%Uu8)aKym(eb0!;4E^P zDpre%DS-kODO!(ZJwq2OVC1gr4z`&dYKOymF|}Q*S5hctR6(^CF>v8D6*Y>O*~jpQ z62{%{^Kb&RwK03Fg9*{pgqm?u<*`JSMxM=gg4%RcVf@KE);^5A91pCvzf8}u{8fq! zV7rr(uZP?W!-dah_;5Zy(XOwZwi4R%n4R&={@f~A>So82999a}+XV&ekSIcW~w{6z_2b3;Jm9s&~ zdl4xEC2aV=>{GLmGEnI>h&LNGw5Fk-^oTHqqzumw zfr-X(ETGZu=MdUM*)UQjdanqYw6}MRT444S_!ii~@XbRlA7%=SCQ&?p4)6zOMZhe& zHek;>!58CQ$X3BZ;GM+&N5&#zh!NqihX2>f>xBxP4@7*o)x%h!GXYD5l+>8ij>$NY zzfr-X`mK#8hRd>3pv;luo89B9OD3~a;A4Cfh8g^Zd^-E-UrELc<*wwB&$5z7>;crA z%ovB)w~L$5gc7raI5;|hF{L*~Jf1TS3r#Ep9=La0k1~$f%2D`K zl?Py$NMjq8j6)4~k&R_eM)~(LI$Xh{9-)onF^0|ayXHKGlk2@A40}f_EQ`xIIiZN~ zy?OQ(_zc^;9)4eVS;I_$8Md1+5+;c7?NTz@CO4Z5rAMIlhz^Et#saFyTZwau+X5RC zhq_hS6=M?EVz;nBmVyung{N%O7!JQX$id;j?01+9469aFI#|q0j+~YV=?cm~>)PF5 z75T0nFG@_@%uKIF^D+@F$s$!4m1{4h1?+KU0V|24cB05om6|f_#TqbnUaSD4t@^=Y zN7I7Ej`j!^8#)AV0bnQrdi+Oi$_jXCM1RS5WcU!eyQZEd=<1`$yINzg^lgoX+jT^a+6%7cYy+#<&#d=~=<377$+)pJ zgB+n$_x9}}@-FmYtFDo50PjnfPG-u4;uzmL(2&)3i(KRrMn>{fBm;FK%!)`r>mDAmY9At0BShyh`V$m~golq^Ye$ibeQo|?!u8K@;QWx-zDCIF;ybFU zr)w6Y$i7uEqj*=C0~fxtluRv!_IfCa*$jnWLLzp$0oN*tX3>UR(k5%d^#;Y6tH$in z$S%}O!^`Ng{V(dU2T0191y+}`fZ;+ZXkZ+y90WIr-640FDqxw)&2Ay|IGZUBga0Ne z_YQ8$F+g(WT)&NAtNX)1Gv!snk*Us7!(*LE!In~oCc0CM#k>9FO zq*1=LSr}Rs&iPI_!j#cW7ieyGMA6Z8wF^ApFUfawkG9?xrGk7=axe0&Cpo-7Z-R9b z&_pCcUyH{!E`)6HB!zBBwHUz=Gg%h#T+cxnHuwr;Y6vq%JqJ;iqyB;(0TY&qpvIPR zu9RqrSf=e6lV>}x>5G|6y@QlfHf98ygTn%;%sMdnf1KdozIW8eoRlSyaZI!^JDgMJ zoFaoT71C5vs!M3}OSrmbz7|BAUOp8W|ossc_MB#+6<@$-Icfnh01Q1XF~mFy>0{eRk^A8pSSf_(DH?+kgB} zJ%^Ye32NL68ymb5cKu-Z$OA@X8bnqoUr63L-ZtK6?z;>T0J@QWg8Fb_D63m!GYOs_ zZ2DLbf)ykCBO+$pYEKkw$_eU2+Y?Eyjl5$}uy=;0p*2nFk;ldj(`uT8^)~ecnAy1{ zMC{3-)uh^eF_i^WqqI1O$7Dns%r!P%ax@OT_DVU}*u)W`JsB8IBXEe0N<$HT`jK&Gt!|N|@pJ>)A$Y}vl#Oxgg(Q0(^D}G23Hs7v}l4{uLOnPALG9^?9$J><49l0BJ zp+2e$;C!f$dapfFAN8rzjgQ;4yCITEccw=g-R_R5K?u1djU3ex0uJVA62`y+hly^t z2)LjLJwW4ud7rzvt@o~nQ9UY)a8Vi6p^3Z4w(~BS-@aJZ`%o5PT(cMbNa(PHVS)i{ z$|QLQaFD=1YEESAm<$?b*>aRYIcq9X_BHjA+#SVL?a{Dv%@-QKRqCzwkNPoQB)vO7 z&)a6LAfxr!_5?-idqPb&3L;7Yc-<01LO5%OXg z;Mz=0{WJ+ibkvKMhKv#Sp!^#^#cuI&^jg};7m2O1Lo9&>XcBl2PBq0$EQYvRd4iQg zfV6>%Oa~oTnj|5E_@av!QD|_quq3+BV5JDR=rQAzx19Qt&u3OKkOkB%Q0#7~6sjIB z(J0RcPA)ia2;!{Qss4VV$fr6U2`>X}t$;_Ogm9f&QBeiqz~mA_(114{)cC5%BczCW zDnJnyzBe@*5G28o<5r6xNrtM%b#(4Tt$&nzMEWAlfL^wGQ{}O2u?fEjq=>roy)o4; zUvFATay_a@Hkn(BitAcIH$codv<}RJrV%b@(t@FRmer^PCY8#SZm}pQl1`q6XRF6; zx)Zj2qBz-Lqgp5?w!OrA%OY>HhIn1n)idqNs;C`~I21nebaUupOA^TEOg^T_^-(XT z!>$9xd9!zWsW#s68wL9g;#-Vgvn%JVB4Q)-Z7>IK57+J_By{RB6ls3kpMoKOLPZs%s_WJ*qK9+RqetI8=1!>xn9twUc^0QB`F3R2t-4{_Q<~$V%N9h@GK{3NA!3In=l4I1SwcjwN4@L zI~4HX{wXaWVs;rYN)Wjl zC&v>DVg_ogRdFP=h+1!>T+L>M>ixl{(e#O^;k#`)FAOGtLTJA{hY~m4nj{{{O*saZ zlZ8rx*?KHHA#q^Oi?WnUA^c4GRv1pLT38QNBnhv|WZEt2vS8{W?yTFNjTQ4=_ilS> zp&no{)=SH6(KG`g#?qC+ksgokX<-8iC(F=!$fc2o^P-YVp_CYTIH`?S75J1kg*I@p zv1yX{0NQ&CI4+qS-idL8hi3@i-j6V14kX?Y=)_TEHe}KXGc}*+2f`wv+VyEG0(x+e z2<$g1B1Qfah)VPo-+h&Xp%M*7MWoDv1AH20;p14G9yV ze34@X2A@vR5r?PfVD? zEnL%u-<)7oGkvfs+ZAECAP(1ka8sEL6*c6-n%Xg!T6mg6%h7}s7C{VAVEqJ! z4NBaivPnMp%0#jqlzBFNV>X*zqbnUdv7A5E7c_J-1QYrki~9sqK?!Cj!qo)07FQ{) z4V`7kONj_5fgX3<%O)uv7ULo!HnEotCWY#P=NE(R?~ILiiVy+PBgUuH?HNz2#Z41p znj>B+57rG!9VEP1(WaMAqMJJ2?74I0mHJkOVqYo^M0J^XAgCp)t-Rk5zIPv4^|v`f zwQh5Jcd06cePL46B**m?g$}~>V(T+ouCLcxn_9Pu;p1w#7_W*xxO@%mtVHN0ZV2q3 z^VsijA^WRuDB(C-@2qT6R9HZnjSSdgwN)7s7BpQcZ0?uBU44 ztxf7aYWR)Xag1qElsL3t@neL==QBW;XA%8IRqt61cC<6kN0Mgi;dW|(8b%v62?vX_ z?6FNGmQn(_%pDe1;7fL*!A+>gaJpPw(ryFZXL7j+4eITZG(4T9P?zdu=jQ zGbo^3t{ysAJa&9_wNvY&m9*>WA3_R|L1`6<7 zj0H%NgR3$kJ&o0pzKeWSJRU+9o)@kDEbnZW2L-{I0XMEmGZcG^`^o(T$7&n(O6M4Qg`J}+=dH?F%TSV4n^YNz^4|1lwz^M3WCT0?j-bFP z2X>^TaHxdBvDR{ckbh+@YmQ*^Ffx1Y)T!Bng&=cPj_wXN5mm@EBR@TnWS1{|9Bmz{ zDEUU3Rj{@WCjlJJC~r<7tF{pa9yz@c#-0~oPE4yuy1poBs8uEL!?e7L+4akJPYz$M zvizZN`AinFI%us1h=g0K9e}^Mvav1BXl*u;Sm0fqzs_+^0tu3yisNz^bcu^Vr}Pq< zYZPhEVVXP214}5toiA2Zv9@_&77s;JFX1PBo+^1+Hx___Qr=p8Lwl@^B%diUx9PO%dZg_GDV7WFw{qElPnexLF4Dkb_SwGZsd&LkG!l0!0+Q3YA$K zIp#&G>r;&4sKfZs(7g$l94ha59jSVvFY)kcOBn$(cSv9+OyY&Pz0=0H$-IwTR7gfi z1{6#{7UHHTY0IXmrkPAOca?Enx1w@H(+s(sWoDLr@1Y96|MAE()mo)pTSt52{8F(r zCrLu8K59j2g~281`a%>IK)3IR zx{zaa0V|f|f{uhduCKF=(&IsgHR1LA>(Bi%>B-33sb|@(M@2n>S;01pWbl<3IkBwz zGt@65UFi;~D>-Ip+?-RPY*7n3Jgl#9x``F4p|3zrViZ4j{o)=5BKN?kVbcX3BhfQ8 z-nky>=?dfS5*~4KTMb)4Qm-j;0y@Q1pwdRUVNvX?!5W>K9;gmoHN`kopKxab2`06n zDKHUCJ*^Prs_imNsnDhfX&Qdr+Zr_uHZ*{Lk<#3#cC}jin1OwZ20^x1o;A|#=d>2` zOkpFesd}?pTWgma+|Yn3^{*Hdy0W!2zc`Ms1oYY(0XOG@n9Pq;?G~E!UYN2&MGtBy zH?rhNu18vUBJ+8id&TXtp#Cs{c{YkKWTR<86Sn1(72y%^RUosIGC{N@zAs9a=aas zzIBC9)EMI&6UzKh&s@gf@xh_l<=N#Y6!Xb-4~W_HPz6W9-J`~RE8D@w*8gRV`y#zN zb`jf6tstOCq?P!Uf@2Z?vMOQ=MdyIp!$b1EZ6olBjmN^5-sVOSJo-tluK5o;4w zjQ6k}Ouxu&tBd$W3X%X7$T@`(^yhxU2~L!N_3viJAUaNTxY(ER=c+z#iU=7Srf!vG zylR9M^S;IYw(;1gOeBycMU;eO3WzWbn*3K3793R9u-!){{MYQGbbzSG*@|p0+M8hs z0^Sr7wmlt|Ea=r|FLFi`+feQHjh~M<4=BmLAp({20xEl^j^{w6gKfN$Nd`|3cVCaU z!<Wo{ zzH871SMcuzzGKM+{G41us7|fzHfRXVXYajPhet?vOw;)M`>%iKQ5=wu?HAv2i?f99 z!9H+kwdYWcuYm0Z_GJpsbKeNX7I@!jln1vB42KhaeTN}A>RO40@Ak zp3|5vA2Ly99|m5=QUTmDR@A=UU<>x^ZW*hXx23lXQr$O%Y-PGp(PA`XR;(y8Gp4Ne zGQ&O9!a%P{Ex$*QAJxcSER7()5U2aU1@ep45F)6}mgEV+dnmG`eo-y-asigCIlhXw zM~`eG!_8Am?T9zo{Zh!$Y-hK=mV;MEHK%ZAsBxL3V(e=uSBd5$o`jN#xxOk~?Frrm z)3ORdy+OUjA~ab}hE!rQ>@Su=X%R&R5s{J!qkfa@7z&#T%~eY+N+nAr*Q0 z0upKkWg_f%RAFLNVZ!<#hWaIRB<;ZQF%dGsp%ZLBWdMU&07kZqfeht>Gi!B#SqL4|oQ6sJrHbIA`2QWrM^@0itWUaN@+kNY; zCh5~qz*5SwO~r0N@Lnu}$Rb8Ar%&_JASGqlfE}Cwli6t32sfl07&yn{dgu}mkAkS} zrtmZVDYgXhd|j7_-fp^D>ad*i^KZl0h;hVv9Rm4zmv^9g$z?g%;)a3+%KC}`Pa zSmeNA>c*39blV<#Z`7x~ck6QEPuwHDhZ>&?W-R}wqp3~IwRgJIsNUPI>9*k89kEaQ z1Tucgnlsm(K)O%mtYUB6WE{aLlFbRNk+4wm_SzGle!|iLJk@&Kq&vk9(rw*r=5)Dp z8X4z~Vpwjh8NIL%PMU7)Qkq!3c@}UB2UPbuz#}ts+!c#dX^IXlvKj5lj3Q4oJ|wQ2 z?MeZ=y+oe4CFx1Q=>>Hf7nRykeD2lzyN8}i)6W}@In&L86shhE^&T;`21u3R8;g9W zg4-hZJx8-pO))U$i?|S3zB4Dwjm_FJMs(dOUMfH)S8s}Au)NYBh$cw%p{3Nj$~h-2 zWPTV0A0!&Yi{NGj1SiIS;v1@L`y=&)3`z9iah`D6G2tIrXt1jD4w5sl0Ptd-CWJpKOVZ^K9G})xyOVUuUN|k6B0-w8cJ@|4H^qgB znP3N+6wl?-K6~dOs>3oA(K_!UY^#lg@)OZ=Un-V+$;BRBowDUFcb?m~<1MwT7JFG9 zo%}GiMTo`g!>32`>h4R|T0C?sdiZ?jYy`(bCDnM8Y{;<^8A!xP9$`h+R)|aE0V$!- z?qQXT$E*_8jIKG4L9%+U3m+tV0kEQR*5M;qQbfD~IgW`pIPWO#7B(b+Bh=;?Ab5h$ zrvgp83}#hD!%6kGtjDW&lP=uSjVv!)Y@D;jgi*Pe{VbFS>ON{iWrGuoh2x8P&73gK z?xETXCBa=ov=_pHaO?uY=?Hs6Xd8>n#nk?cbeVcMd*S=en%n3s;943UF>vZdHiO&? zI6{I&itLh>X00~+MWSF7$2?@FY-sXflu6AuH`nuL&LjsV7iY7RL4_V8H%1%`{V0Wz ziJRJ19x>{K@5JU$@%2)7YS4yINpB1}gWM1*lsWsLo~w*a-{K*f2YbT4HAa9*fKsLm zdQhILuVYP%5_(Bt7y%M;sKgVlDHP8*-H44xr_^n9C^!{u@5<-|*)G?+9daW94b9~6 zoq8o`q3lPkyk4lFb`LaabQ6rm?-jS_${U@{MlCo}Lt!sUcxlsO*(@g{d5YZ-LYGp* zCH$agDK=dmOll^a6iQF&)Z$OT-Y|?$4-ynwo#6OJt%)k`wdm|I(SZv<;S4gk9^KpM zk{m%vb$`Tycf|>a8ASs_1jn_}GXq4-+G|tB!h?rFCgHMM){4f^k~S5Ty8&E+*fX7Q zi)TF3Ez33;GNaH%8Ocm)rv#^KjSaL%yaStZz-y`e@C>Z2YXUW*G)^NbLELuP_J|@3 zO&Kde>UjBSIc*%IM!2GRJJlL?cWc`m@m_&Y30n84+4QK{bk7wag`Qh%hi=dd(`>q@ zaHocAx9gtM1pY-uup23zR1zzxz`sctMJ3pkJj)+jJ3O1xtu|SeC1}pDA0)YgwV?G= z0rCL7rr{K|9eJ&rBh81Zz7IDG4WkZH$#D`g$K`4rZkR1XHC^|y2_;;{J5~RM&|8{M zFUsagT`ePLWw8Xi7#C(ZnI_bxc^}9MUBwyW4C3lnD@f@r^=SQ^m-;Q?;C_!Tgb#`; zk$z3Ou_NEb+t^7YCK(vvb9LxFcL-aAV&EqGkdk0GiOfY^Wa1Wcw}#^&_BvphWDKJc z1#9Qd1yCb8q+6i8X|Ofsm%mM44$RIo@;Y4BlL9Q!TsfxhO&>uuJE*H28xFj)bnMwC-BoZX&-ev*%~Zj584wb^r8I+;T=0%2?FIl89H*Op#=`w?u(us@|2pKhd95s6+buo{8QZg^kS1014UpRzrzstfQHs}@yYCJGL5&ztnBqM3` zNCA6@@fhCm(!VQ-dRbu6CA8laX3)bez4KUKZU}5@bVG}6UGHn;gR_`0A1ftHLzABU zpZk?YYPM;9l0tt`R?{dm@-$Hi8#c`v{9#l1=}?|i<+GzoOg%i*U^SykOd4s2#n4{| z`30B5SdbLRAO|I2KPxeLeKKvJq+|0513gczo*2Xc%oqB8Ae$?9TkEt{&PmV<67T|)+Rhj2b$Rms(d72|G!Qph07Jdk9y~mX&)&cI zY_-%v4~y(rFUBqQIiorZ0~!!H><4MOK~g{u6_|%lql(7U4fna-SS#~T6;(q zs4Fj(KH}PKkV~d=hwGB`R2si^o9Ahfa5@9aMdFNBy*Q&2&Fi7-1xvNg<~jx7%*_S4 ztHvB?)8C5ItF89+99e_mC0tuO=s>y^$t4J zQ6=YE^{7c*7KSz?AEn<2MaSttvPEZI*O`w1p#Jb zt6amm*V@=NM=`%6KVq^prE1H1PHihHN)SOH8wtGe0%kypfv-v633ufD_0Z&y55Xg% zE`Ra`+qygl14NMYIKh+k<_4OFjn1zgE#lJV$i<`Rz@^Dai2yVI{2G?eMykJ7gq~@}IqhhTo)EE`l}Ra|k_Zso zhYN`HRHqSA8d0Z<+lBRw7JBjV4`=@+6b;$AQIN^DTV2#O(7unb3y2@(#uLi2Q1Q_= zgf4P&%`)M!=foq5%F%6>gsDeR%dun|LYUk?O z<0p(b@q5AOzQI271b}WS+86Tf3h0hVRg**+rRuM$W~A?Jd-yre)mkRrjuuC*dW^0A zJ#=zMGxFR(gs6FUj%Qw7K{$KuTo;|n4SVvRy#LIr32#sf!^YP5lB#+D1v-%@_y$z5}lNMu`1JF12$jpax*vvHmkwxRM(7i z4Z|cPD20>7wpC_IoR^e>!B|>0i+H2Mjm^&K5|R%Nn%?Io>73k*%gyEG0sr?5v*$wHF=$Tan2tJz-BPDJPL=3`D2w zO}myI!PD?ASz;JLyEHWdE(FlJ_sREIfCfh$+gOC^G&dqa?F)PW#sP3pB-Bu;bWwf60 zWD3@UMH{6H+-N7peNs+AXvjm87m&AN*Ax7|=jwW&vbZ3pLndd6tOdxyt*>qe zg`T*NoB6c^L>i_QLh^DXkCJ{HhVkRjU5nWpCZTmp9QkE9zWE;=%5+WqOoBC;V3UH= z8&GvHz0>NZjsY1l*ugIWd>flRsnT%*X6AE98o6(La5U;bgV#D{(IRT;_ytx=)kl%0 zP}_hB>jH_?a=S=WR*fUsb!dt%hpRx^Snp^U%pS$8MC<~;u^?P!k@ZA1HGL#QV7$nH{q<~kqnKXRRq#9AOEiPRxF1NYN9 ziko(89D0&2p&)X4V?~~GVgj{vD&=66KpZJ3pBy)(FjWt=90@wB<;_MnfTy*-)~vNF z4e2c(spSg26>_}c(MnB*$q<~%cP)?nL z`z}ZF5?(1p8Kqm%`A9j`%vf!sUg;d$gm-4V(W;zfzT{ReOv0LzGB(G_-^yQ)iB(}b z;I>r+aZvts-}>|^a5kQ7IL92ZUtfRk>xoyC+0o>wU!fm>HJ5>119Jo%4~Z%H~! zx7`jgonc&*N$~j4%h1O^8L^hu>xE*{O?#G8$iy6@Mh?KXr#Fz~bQp)z;o8%+=5ot( zD&#}AgMwg**F~KV8b_IAMkS>>MWYHtz@@`ICh&$^x{wK{5>E9;iRqkVk=b{5YhyYZ ziltiAqlyD_hSn`>Iz}I9v{uTE*+#j&UaD=?+NjE)%4qs_ORr3!Du9vCJwpL}H?*-{ zIUoSK^RDuoGt{)lchBs4Oz7Q}Mysj8GvqPy)hNVF(aNSTod3`al9~d!G(YQqPvs)G z1HIRAxCX<1Myzj1Fi0-cKzrz6*6bZ3Ie4VZ45-7{%SOt~`AQDn2jf38MrBq5({h%? zaAygc&vX!W9y66xjRcA`%L*e|($C*O@nz|X7JCQWz_W5mD!Qgi8ID#n4628j(=U&B z2qc~2`Jl_w3hk2lhQT))WyEc&sSK3Urn);wH&}$LQt%qR(SAYkdNZh`h~g2kh({S% z(M-~GhE}g={nB@m591D;gT0TAu1KQQ94l#)#Wo6t<|!|Vbt{NItu7OVyhPp6&j)|> zfe>tK#q|KMM-?svpS?KbR|q959==Byb&{1IRdTGG;JhH%`%vLx5=k}ah|a zv4`=QjR&Rv!4e?@lkz+>wt}?Ah!-^04lrL)qAH9DaS}1iEh%bjV*;Y_l&nMdD~Gc` zp~O@5PJpD5ZqQl{RyHeV(JNF_OJma)z6PTq8dbl_CEv=0G^Jl94`U6nv@oiCJYZT_ z74eD43#E!5s9V-o{-K|SFlk}J(W)67${}KLxkL}_w#TN|-b2y21EeKY36m;r=g(CF z(-DV+Te#U1J5~&8ccu9)M}dIGakwkNbd>s3z{7h!ysCPy3oo&54}pM_95OOU#0VQl zLuEFKq?@xvoRWUqbLq!%BPLKV0`VZzJ07p$^HAl#yR@Hl7-r)F6lKG>@~Crr+s2!h zIWOM}-hY=J@#pu-``M zhS(2UnSYQDVotiDL$@atkejb}n1?gPUi4Ez|w7NTY>6 z*lBPPZ>~E=s!B}#wc0x~qo7e=sRWhICXxy3UE&4lsCl}(K^a^6cP)lva#Gc`5oLI> z9HvA+&rq@^9lKMbGyZd@`+tZmdP$AnNhZyFQgC^gP4DKe+p;jgzlN=~;`meyo&!6@ zl$cPd5c+>5F%KU=LTTNM&~LPZd)wW#j3OJIjTRc|gc1F~Th{uGi z(>9#2Jpqv^)3DA%bGb=fHgh8@j(b^CgBlh+@Y{G_H^s%;LF1HO4Oo2Ns}s86oMWNl=^@QgkOSTvQJFN*E;9jTm(|;&rYVx**y^vhN$$il z++zLdQfhdBAEA>;kq21Dao9Ih#lZhLOt7WGar6Y!{C1qLCq~74jSTSiIUPIV8>`qv z@{lchK5=K!z($R0yvOS7i6d>M(rN%?MEwRfcewXgx@NmSSmHFW#MOE`0ZcSy9gsbX z_7dI7X}_RD`aJh!agZmzDlyP{0#u7~!kFv!m;j7StDJ*&(|ecJMofdtTUpg3mS&;G zPGk={UFyn^?|QuVc^Sh!26j{Q3aL<3RFZnNi>N4lSMqqv1va&TRn|7Bw_DIcindX^ zLuIFva5_V!#Uzlko)r&ncRRsEmFoyfyx%8z!klDf$e}V=kEm`?xCUs=Mm;YHX&{XZ zsD4~YlV~5_I0C9ng`i4=KE0<=IU^jr9j zx#}o@jXpds0LS|-*JhBbU`+JUyvIf)Kp z)q!v$X93TuqQQe6L-0~#x4x&*mpcSbO-%)kY5-8f+n5U))Bp(zvNK7eK(5j1>#0>AQO}EEr*O2h=QRwe!AQ_ zO+|Fz8>~Hf6TQ2;E&P)hRU|WiVy`muRa>-b;~>9adI&@~V)k!p!Kl4d>($ND<1EK< zZ=T;Z6eohYNSw%yo>v|<-oL@dp+@f&Im>%{$LLwMufUING_QwWC0^DrQ{c1gg1J*$ zCVX$KAj{xLMi)bzwr#jf2d-@77{pV7&lvQC@^7Llm9_>*&ye3`7zOTkj0?rCw>pA} zg*c|9`71aU^{}g6nXYE+qK0ioYS&*zr9j#CaNr!!@N1}2d)ThRS zC`Y{A$9jjENdo$okPuUELJ6Qkb#SGKHzmfhID(p>U5&*U{2*SqsGij}+F%eL7$oy4 zET=ZFzAg6SIZ;sgr6|u%F{QM}>=>s`no{68rl~c;A5fL>ZKK0wY%y^bdWM)oDt%!F z*d^P!Y`tci<>88M*&1A=zB{ILE;OZc5mOpp;7db>8Yz4<8ADWusR3rEBexk9Uqf6I zWNeht*jM1IUVBk|ZNk)EQxAxzA;mn?s;oG`RuV{;;G5c509R@BJ|a6;X`)aEh(8=|L#)z9HWPLCN&s;ppi$!O3ckXfuswT4@?wyB|x8}+zbMKVkrj|MqO zk!BM=ggJ$maaa)9$+YB&O=8h>T-v%bblIM3*Qgp$HYXiY$m_@4rX7^qYo^bMFnSlc z4#h(q>sSZ6p}Ryb_9Jp9oNi&MjJ#S&Su)tD9QgsmXMjblWXPcBm7oXWX# z<(2wYhC*06b=3Pn%@xy%1Df$_EANNifIpf567cI-n)?poPaS?A5euMG&y{+&4tJ8c z+!p;{7iH3pDEGWu>G_4xEI-$8pvrDitl1=-5v{G-&dS^L;B~_l0Pp3A;j^q~I{fM2 zP=0yniIBiuepI!mxU_*ItuqK1;eKUKsEl>_Ih7!zu`+0BA|XpLa7)mowDOPDl~wM7 z68aqBG&3E`cIbiigR4?!WI;IEvmVans|q>m!n#0;f)m9UzGxU^pvT_)jw?&PEayLSq% z^*E@bnDeL?Mo{ka;@23(oLk?-uH6(?D_QVM2$Pp&p$=2f_|bM!LO4=I2+1s|MTF#> zxo1AK#H4nBjn5pvrqgOpF4f8~y=F{Nl>+n=WxkHgNeQlwglk4p0Yd=nEIyWNFwT+p47N=HHDF+>7xLtri&*zyI2R^#5I~$Zh(KjYBT0zsST(DYhppH&=d!t4GT)L5EAy&&6!6*?|D0;o`eK>@c z*St#XeF*>E8(IzF`-mC~!zRg6gY=^A7^Y3e5FxOx>C-PbEuSAJ{hxv7!F9$9=00-L zT6)Yj5{Y2^HX5y{YcmSSv3l4bzw8iUiw4Pz0&)fm%ZcM}0|w-bQ{_vk8K$jpd_EI1 zmmz3M=u?B6qDL?luI6B#==aH68jt94c%7^N&IVF}s$zT<4%1CCV*#(&mKzpo$!}~# zSW`!s>%``D^aS#a;(ubiEI{`(TD0C@i*40?1=2346Hqw5~R08 zo&4-6?X6OsvD#De+d_GGG|iUA*>_}IF}=6&&<$&xia-MXL*<_#_11VgYEQ-iAfJZe zNUQByEvRYcsP6>np+1cO!Vy4N?hK+ACSDUNi|J8&sd3D=mwd)B_}SR%MrlfvBt1Ia zrpOCegE4tQT3Y{-t*pd_YMH`%)13{5^Z@OVxfg6y3&lh&3epn+DW_|wiCRUpNxQs_ zSeix+O{y3+%ukUyjuJZ>sx%^peo*e2YhMXuQ|yzCd~x1Zt8Csq)3ZH~UfB0jmfife34C|)MyC0m3sdTO{Z=|RVrpqIM>fVooc4tmC zn)El|>rp1E$_p2C*)oq!OMv1EH`}Sx!CrM7wYBjHbAEgRlYWCWWG6p!O<=3oZHxZBz7H_tOHeu zbZUwk6k#QRBr|$c!)V~jI>f|BHH=8^XT9XxeXU^>>3<&jJi9oD-7r!%n)87@uQ?xO zr0UB*aE7KKdTq`RMbd5{o!pT#Nih)f)$p!z>QFJQ>g964tQ~B$guLH8mHZzIP*1>? z-L)b=Ex}0j0ATdg`pjh18ti@$+#VdGU#F2>pY3IEtyq&~8S!v*TF9#P;?PP%k0KWuQZljx1pI zfG*vtLVz6oqSu);j8eL5oR>L<@G45b^8+Q}s}cyYvDvN#TlIDq<<-0}2-@*dKmc(q z=wfM38?|iADxEx)T$vJF+!hu{W13uUfPE_A=9dT@L2ygmMz>JGJ>Y3Aw}WoGT<>=#$lKtp4BM-2Hid@1wY4@X%~e`W*n-V&VP#+Jf^?TOsQ6bYFo(_&74ztrDmCv zFpQ$U{oTj==jR#5dW)wo4wk-Z_Lj{jt=6g9+HMN`CT}Q6xDL*Vqe|E+zoE^Tz?m{5 z-~7lokFrS{TeFS&g^De@z4_)DuS@OAvEw4-zU$sbc|tiRCTeOy;-u40KIw;o5;uf5 zg3;~n?3GUpWdisFhC=zBFzi&dPUgkjN)7_3-3`{u^``G}R0JxCn|QF=$U$gbj6?kr zM(Pa}-@_&MMh?O~E32}{4#K^NO(gddDuYIx3IpYm3=*Xn#wjMp`zX{I<2L;uQiWvV z>N_-9SA9pp<**rQ6xor^H=-|QrX)D!IF(LqHR_e^%owcm<@$OJ1?uyCdKq}ER=N$a zLhh!9IN9KXg}9`2l7JQn^MS{A^k0k6Vnuh-MKTFdA|DY96bJ~a7(T^L91z{dIGX;rDf~`Ti6A_b{5cMwyTt8_}Q1G+OfnMT?R}xWr=zN+FTry>ujztO_q&Br>Bx0qDUvN zuw93ZZzAkKO+a0C{Wr}Hwm4-<>wF4n*0+ru=5xRm2vJE7_4C${3$cYJ3{qup7M1jj z^CL5D$gvW8xUCIkG{r)#LW68M09cJii&iCXs#=F?kLp9wE$y1kvq2cl?3lZWxUk1Q z!rK51qitz0F@9D?TRrbi=zg6~WMlxEl#%s{7t>e4?^mMAvl&E{BS*Ui{S8RM7Jk-O z8nr@7$s1s=;JISIYr41pe0U^seChrAxw??ary~i%l6O2^;o>$??JC8d1=`ZHU0WW2 zIqTsT*DdS-8lA+JK`TH8$EaRym@!W5G6f(GAJ1++%PiBK+d7~EJ|hLX3MjrwjgBs= z>f0j)`eId}ZyynM!J*~jOF@3|P(U1N`6Nj!w`USDl`vMAk~|~9@odF2?}03V-@<^! zhTBmgk&FmkBmB|?E(sxu73xt?Br|EdS9Z8BmtpTF3CLLgG|#9CZtFWz>W@YZ3maC3 zZ#kl}yTJo8RKsW>z5{Kj=mG2?<$|>_yp$tRYsPK8w`|s{+$+nQrcrP!Pj&{CpmenB z-EG`geMSAtKRE>m1&$xF_7Q7WF%s!PGg!=W94rbEq4eC%)Q$@#ww=d>g+I&`&R_7f zQ*KsNbi?Z!t+je3sI}Xz_W1Ru%SfMyS+JopCdu$_H8#f_3WFqL{#`!%*&JB$oD}^o zwp(j(_jl$2t{7enn+S?xBgsEV3Hg~E_%Wu6PBy3$zRrHaJj}y{`3{(y83MG#LR%eE zKy|!;AQs|^v2hbTfwO^A+&%OId9j08cCaBA2oacYKdLnsoHqT~QKx69$_=RfnT!hH zgOth*8aU|x#5Xi>HiB`19?Qg4;X#s*S^~g)cD|k%cZ=OU6Ogc(fv~y85jLK{J~S4w z1d^CLY_HYwW}_>`v1;u~LkjsuAAp2*ykH9qu%%`6UDUi<-^3N;H8gw)dr&YgV*F+H zFr`@GALk570U7w)J1w!yjW&}m_OcmL@r_42;Lem@9pKKXa&-ZF6K_lE&Q%&XP;55u z60M<#mX+FCy~*z{G(6*2S7xkQv)DmVdSW?WNQ42BZCA(Cje!-3Z&JlGyZEp3<6vt*q!qMoj2ge z9cWr3$G3>k=yknQ58U9C7Uhz}NEssb93ocwuTM1W!6E|bhokmnFxMRnpMp7sQc%{>lU^4?xf+#Qj=X zSv?g^6Oj?|#kz{7rtg3uT7Rm*`s}f^=!UQGdFPOx+u-kgrJP^1UhhE06dZym8H0@f z4q})i(vvhU^-j)DG8mMd5a+>ii?X#2t+c6@*&Ma-$eTu0>7q8Q2hd}^lWl|xd2}bK z{U*AByQqJXu0KkW9VN-eR)FkHP7MwLn)8|@s|~*;?L5Y|U{RTLRJ6H2zH$a^fEwM; zcDwD8ZFHZ0qQN~v$9GhDHtKhX(^8KhwM4``A>(dT>EeJwv{7we8(lG0Q_0X!J3 zzgapOq$~bI*QyLNUaiMuh>*@uG3ujYpN|t1k=PFRN&;&Vb|^d6*bsG*rX3U_RtU$L zgojteG&4Glm2!aawJJxzfHNO!RW}?TXb(5Yp7(>t_A6nCbAURk#k`91#t{|-i zy=~6kN)c?@MpJ}Ya!@^&N=Z1jVO8M&%Bt!SRuvHp5dgr~ZlT&z&>s~T zEEf>BmS;|Arvi59@;_gdg_}@kz|7J(K0|pG4b&1QNUT>@nz2^KNvcf46UCmLt??!>S*U>$Zy({2UzvBsFE;Cjm?2KKCD*R;7a z2yHmJb$O8B8{8{N)*Yr~NcPL@J+S6LR1muJTytkcm&9_AUgep+ z70F;QfNMnRp8rx$A{C>t$6@ewx-OCIcG(jT5^%SH0nj)mJ76ZPqk1`Ewpp$=+T*c3 zsL+TUmr*EuJ}NueGq#7$>yF!TYc$iS>}1b1w$WARFLKIN_cULm|@Qg}thJ;1ec)#_FJwd?!ofBa5o{o23rcDS(VM%Dx4b5>S~ug@fb~ zBC?W~>^0|ck~ToX82tVj*~yF@I#@h5U#o4@+LS1n;>N{|1$suUQS!l+Tan`Ig3WpLqqzppbp%fjp+%rw~ zAQlH}w#S#nrRaby_rlU~od!;RELhE9DISLe4-28gBzr#^DTpIzIAtVAQp4cOlDg`cY09{bQnw3mG3J03$ee~hch~A} zSXf?%j9BP{DU(*Kw7-O0$lV`N3*D}?Z=vG^>V0v*^w&XtiJwPXOug83DQI-s2u3+Z_WndAKnQ<4zMlHI)!GofNG|q*?~B{$ z86O;Owb#qtIHGsX<}0N$9jiCmYguv7$?joPcV-4E5OOZ5IbBtoNcD@4Hkr}TsAEB! zg1?3~$bKk1nHlS&3RYWfq=Vp%8|{a<-$2FnDEa}xT5b(J1ev1;HfIsX(zBxoY|lc4 zp;04-f*MYXiBZ;~LPy_kwu6Fmcpa4%UX0z#j^f%s_!zQ4#ZJuPQ47Y}K?I@bZA_jG zqH`&cf1sQ~L=PMbXcHk)LG$g=?!YYBF4buTy3==&AM%+B2Bq`G9>Q~cBs^IRgz{wv z6^K;Q?OJ%MF5$jQi+i(p(|hfaR1L*7`oNqQxw*Xea?=Y1vx=4zlfFMSgdqG%-KlbQ zi%J0Zt*)G$J(FKI$xy(8%xGwX1|em5)8?uvf^XDqVGtLqXZgH@I463QkEVH*_cVrR z0RY{6=v5YAKg{|NA?MZ!@yx7hetNxp&b-im%7@8-C+PyYHWtiLan$x^rRygv5Qs;0 zVwdK5?`ZTvQV6eiBt}By;;X`;jC~|T)IjTDeC>k}8Mav65Dr9W;(eRu+WwbLF=EjU zhY&GIb+ugiG6au63!>`nDqGL>kOD}zc+6BV2@tf}sF{!;tPsZ;qw-!J+!Mh<_-lA5 z{)Z|Y^UG4TE;TJw17A44MJ<(d6+RpFG$*D+PavgLZHn}fd}Cnf;MDUGr0NHH=S?JZ zH0o#D+KlAOrna0@)B#|zbv+BmWOXMq4Qu%NavRMnO_XjO0Ues4MyEPp!=2H`;Dt-57 zGpEa))3$XfZGM>JYlcbn2|G2gv5oj}bJiv|n~i$&EOWY8RRgTq7I~czb3;H^2z_W) z;!b)`jD{09fd12(&4yz`*fXEKQ5glKIQBt+uWR%M)Oc;TY<}xWw zVSDwGr(%G}+Mw#8{DOBCCklKmI9uCBBa;NL3LO4?i~i?G&qyzS%2;``+X^}xWwJc6 zqXv;O6tAwqL+G|frLPpm8YB&8fN2c`PMQd=#B>VG&+GhA+2S7JxoBSvbNG3OFw%+R zM62t#rNZ!l7(SR15rOBU4r2`Z3LhFHo)c`98z`F(mBG}8F{CQGL)RNx2B*2XzEW#< zC_a9ikmkH_K^`S#zv|lWYR^&AA2YpvyUv242K2O1@#z)QmMPXY<5VPy<*3is2o`5Lg>wvoXKk<#Ip%ac2PtHXE+)0Su#gg+aS1lu{Z2pMIj505+#E~;W zWBP3QV%IBzELxhfj$X_-y9dgHldWLX;Q^DWdL|tqH4aRySJF{Tx+T_JQq@1*Cu_}G zljfm36`Bm&%L#swJSVB31oXJko_dY#D0XIF*t?mPk{l5Z_QNehiMXQ}HFDO;u27@8 z)WHf+gE`7#t9S*ath+t48}QU34&xETK^O3hF+w7-E13)Iev5d2EFZWS<5NcA*n1YZ zvd2w6Cb>)bAWh0y?_a4`>upI4)od~IiQRy4zulbe0+RGwir_(xM_lj>0L7~4VVgfe zYt4?e(Tgd4=zU#$Q8)3YgVEQC5yLcwjKh_PKPcjU|FSlEPLbazh zHoKxcrQ7!DixWXeyjAWSG@i5&rcDMC3&ai;@VV z#Hk)gRjdvKd6N=NM+NS!K}kHuSXeNL=^N?XX-}}tuwyXUBW$mh3-Mwp+*8L`D^hdA zFFU~{^=6RT!@uRxO&f*l7Ec_@O-rw^#OBR>wW;$>FhEZIG}og0FJgL^YMl*)oYcI_ z(B_3xNu>0W^D(WOgS&?PamkP~r7wbR3*f1-7SG^SnlFUz)kK)khiGks9l*1+A-Lm^ zsTa)tCP(%r4VWOAHWpx4o6>$MDO0B+&d3DQa8Gtbq^M6+^@~eTgrX7762#)G^cq*$+d~f&ujM4PblQH2I+OT! z_P*L!HPmed+(GO@HKE#Ah@0%>$;YAQqCy)2{#nz-qw--*=ZXH_8EI^Z3Rz#`NMqBo z_~XHVSv|LhE+2zOCeK)eBk8w&K{z0WOWj5%slx|Y9A(lIn}fG7-sS_5AoHaa>d*`b z5m8ga;Hi5eG$-2iwbNX*$nfHLef{|=IHZ)<$23_vsk>*vI9P}^#j5R8&gK59k^zWK4n3n*tw#y*$h6a%XaG3-UP;IRTJs|ni z2+&snNP`i=NtsAMxv**b==go&h%!?qdT*lzH#0!8)pm=r(%JiAo#Ay0sP%~7=vNmk Z!QG-9G8fF)v~I#G-BMxZ;Kn`M{|DBqTLu6C literal 0 HcmV?d00001 diff --git a/examples/cafeTest/cafeTest.cc b/examples/cafeTest/cafeTest.cc new file mode 100644 index 0000000..f3d50e5 --- /dev/null +++ b/examples/cafeTest/cafeTest.cc @@ -0,0 +1,1699 @@ +// +// A simple example +// +#include + +#include "callbacks.h" + +#define PV_X1 "ARIDI-BPM-01LE:X-AVG" +#define PV_Y1 "ARIDI-BPM-01LE:Y-AVG" +#define PV_WF "ARIDI-BPM-01LE:WF-INT-1" //256 elements +//define PV_WF "SINSB04-ROPT-LOG:MON-MSG" +#define PV_MBBI "ARIDI-BPM-01LE:GET-ENABLE" //mmbi +#define PV_X1_DESC "ARIDI-BPM-01LE:X-AVG.DESC" //dbr_string_t + +#define PV_JOKE "PV:JOKE" + + + +#define NHANDLES 6 // should match number of pvs above that we are to open. + + +template +std::pair flip_pair(const std::pair &p) +{ + return std::pair(p.second, p.first); +} + + +template +std::multimap flip_map(const std::map & src) { + + std::multimap dst; + + std::transform(src.begin(), src.end(), std::inserter(dst, dst.begin()), + flip_pair); + + return dst; +} + + + +int main( int argc, char *argv[] ) +{ + using namespace std; + + // Test with 6 PVS + // PV_X1,PV_Y1 are scalar numerics + // PV_WF is a vecror numeric + // PV_MBBI is anmbbi record witha number of enum vakues + // PV_X!_DESC is of data type dbr_string_t + // PV_JOKE is a non-existant channel (used to show CAFE response is such cases) + + string pvArray[NHANDLES]={PV_X1,PV_Y1,PV_WF,PV_MBBI,PV_X1_DESC,PV_JOKE}; + unsigned int hArray[NHANDLES]; + + //------------------------------------------------------------ + //(1) Preliminaries + //------------------------------------------------------------ + + cout << "------------------------------------------------------------" << endl; + cout << "START: (1) Preliminaries " << endl; + cout << "------------------------------------------------------------" << endl; + + //Instantaite CAFE + + ChannelRequestPolicy channelRequestPolicyPutNew; + channelRequestPolicyPutNew.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::NO_WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //W + + ChannelRequestPolicy channelRequestPolicyGetNew; + channelRequestPolicyGetNew.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::WAIT, CAFENUM::WITHOUT_CALLBACK); + + ChannelGetActionWhenMonitorPolicy cgawmp; + cgawmp.setActionKind(CAFENUM::GET_FROM_CACHE); + + + CAFE * cafe = new CAFE(); //channelRequestPolicyPutNew); + + + // cafe->channelRequestPolicyMasterPut.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + // CAFENUM::NO_WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITHOUT_CALLBACK) + + cout << "---1------------------------------------------------------ " << endl; + ChannelRequestPolicy * channelRequestPolicySet = new ChannelRequestPolicy(); + cout << "---2------------------------------------------------------ " << endl; + ChannelRequestPolicy channelRequestPolicySet2; + cout << "---3------------------------------------------------------ " << endl; + unsigned int handle; + int status; + //Class with methods to report on the value and meaning of status codes + CAFEStatus cstat; + //Classes defining value/name pairs of alarm status and and severity + CAFEGlobalAlarmSeverity alarmSev; + CAFEGlobalAlarmCondition alarmStat; + + HandleHelper handleHelper; + + + // This is optional + //Initialize ca (otherwise first cafe method call will initialize ca) + cout << "---4------------------------------------------------------ " << endl; + try { + status=cafe->init( ); // ca_disable_preemptive_callback + } + catch (CAFEException_init &e) { + cout << e.what() << endl; + exit(1); + } + + + // This too is optional + // The first Cafe method invoked on this channel will otherwise enable the virtual circuit + // An open operation will pend the ioc for a default amount of time fiven by: + // cafe->channelOpenPolicy.getDefaultTimeout() + // else otherwise specified. + cout << "---5------------------------------------------------------ " << endl; + cafe->channelOpenPolicy.setTimeout(0.1); //pend 0.1 seconds + cout << "---6------------------------------------------------------ " << endl; + // It is not an error if the channel is not connected! + cout << "open " << endl; + try { + cafe->open(pvArray[0].c_str(), handle); + } + catch(CAFEException_open & e) { + cout << e.what() << endl; + exit(1); + } + + cout << "------------------------------------------------------------" << endl; + cout << " END: (1) Preliminaries " << endl; + cout << "------------------------------------------------------------" << endl; + sleep(1); + + cout << "when /" << channelRequestPolicySet->getWhenToFlushSendBuffer() << endl; + cout << "wait /" << channelRequestPolicySet->getWaitKind() << endl; + cout << "method /" << channelRequestPolicySet->getMethodKind() << endl; + + cout << cafe->getPolicyHelper().getChannelRequestPolicyPut(1, *channelRequestPolicySet ) << endl; + + cout << "when /" << channelRequestPolicySet->getWhenToFlushSendBuffer() << endl; + cout << "wait /" << channelRequestPolicySet->getWaitKind() << endl; + cout << "method /" << channelRequestPolicySet->getMethodKind() << endl; + + + cout << cafe->getPolicyHelper().getChannelRequestPolicyGet(1, *channelRequestPolicySet ) << endl; + + cout << "when /" << channelRequestPolicySet->getWhenToFlushSendBuffer() << endl; + cout << "wait /" << channelRequestPolicySet->getWaitKind() << endl; + cout << "method /" << channelRequestPolicySet->getMethodKind() << endl; + + + ChannelGetActionWhenMonitorPolicy cm; + cout << cafe->getPolicyHelper().getChannelGetActionWhenMonitorPolicy(1, cm ) << endl; + cout << cm.getActionKind() << endl; + + + + cout << "when /" << channelRequestPolicySet2.getWhenToFlushSendBuffer() << endl; + cout << "wait /" << channelRequestPolicySet2.getWaitKind() << endl; + cout << "method /" << channelRequestPolicySet2.getMethodKind() << endl; + + cout << cafe->getPolicyHelper().getChannelRequestPolicyPut(1, channelRequestPolicySet2 ) << endl; + + cout << "when /" << channelRequestPolicySet2.getWhenToFlushSendBuffer() << endl; + cout << "wait /" << channelRequestPolicySet2.getWaitKind() << endl; + cout << "method /" << channelRequestPolicySet2.getMethodKind() << endl; + + + + + cout << "------------------------------------------------------------" << endl; + cout << "START: (1b) Opening and Closing Channels " << endl; + cout << "------------------------------------------------------------" << endl; + + unsigned int hDesc; + + vector hV; + vector pvV; + vector stateV; + + + try{ + + //For multiple invocations of cafe->open it is more efficient and less of a + //time sink to first prepare the messages before flushing the message buffer + //once at the end. + //This can be done by configuring the channelopenPolicy class accordingly. + //See policies.h + //Set open policy so as to create virtual circuits in one step + //cafe->channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + //cafe->channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + //cafe->channelOpenPolicy.setTimeout(1.0); + + //cafe->open(...) + + //cafe->openNow() // Now send messages to IOC + + + //However, for convenience open policy has been conveniently packaged so that + //only the openPrepare method need be called a priori + + cafe->openPrepare(); + cafe->open(pvArray, hArray, NHANDLES); + cafe->open(PV_X1_DESC, hDesc); + + cafe->openNow() ; // and wait for cafe->channelOpenPolicy.getTimeout() + //or + cafe->openNowAndWait(0.5); //wait for specified time, here 3.0 seconds + + + //Is the given channel connected? Returns true/false + bool ifYes= cafe->isChannelConnected(hDesc); + + //Are all channels connected? Returns true/false + ifYes= cafe->allChannelsConnected(); + + + if (!ifYes) { + cafe->printDisconnectedHandles(); + } + + + status=handleHelper.getDisconnectedHandles(hV, pvV); + status=handleHelper.getHandles(hV, pvV); + status=handleHelper.getHandleStates(hV, pvV,stateV); + + + //cafe->channelOpenPolicy.flushSendBufferNow(); //Now send open message + //cafe->channelOpenPolicy.setTimeoutToDefault(); //Reset timeout to default value + + } + catch(CAFEException_open & e) { + cout << e.what() << endl; + } + + + // To close channels within a given ca_client_context + + // To close a single Channel + //cafe->close(hDesc); + + // To close many channels + //cafe->closeChannels(hArray, NHANDLES); + + // To close alls channesl + //cafe->closeChannels(); + + // If you wish to close channels that are in other threads + // (i.e., with other ca_client_context) + // use instead the following methods: + // To close a single Channel irrespective of ca_client_context + // I.e. these will also close handle s in other threads + //cafe->closeHandle(hDesc); + + // To close many handles + //cafe->closeHandles(hArray, NHANDLES); + + // To close all handles + //cafe->closeHandles(); + + /* + cafe->loadCollectionsFromXML("cNodes.xml"); + cafe->loadGroupsFromXML("gDBPM.xml"); + //cafe->loadCollectionsFromXML("cSF_Aramis_bunch1.xml"); + //cafe->loadCollectionsFromXML("testVSUP.xml"); + //cafe->loadGroupsFromXML("bpmDisplaySFEnergyBunch1.xml"); + + vector _glist; + cafe->groupMemberList("gDBPM", _glist); + vector _hVA; + + cafe->openPrepare(); + cafe->open(_glist, _hVA); + + cafe->openNowAndWait(2.0); //wait for specified time, here 3.0 seconds + + */ + + vector _glist; + + vector _hVA; + + typedef std::map floatStringMap2; + floatStringMap2 posDev2; + floatStringMap2::iterator pos2; + + /* + cafe->devicePositionMap("cDBPM", posDev2); + + for (pos2 =posDev2.begin(); pos2 != posDev2.end(); ++pos2) { + cout << "position= " << pos2->first << " Dev " << pos2->second << endl; + //++pos; + } + */ + //cafe->readyDBPM(_hVA); + + + // cafe->prepareDBPM(_glist, _hVA, posDev2); + + + //cafe->devicePositionMap("cDBPM", posDev2); + + // for (pos2 =posDev2.begin(); pos2 != posDev2.end(); ++pos2) { + // cout << "position= " << pos2->first << " Dev " << pos2->second << endl; + + // } + + + //DBPMKeeper dbpm(_glist,_hVA,posDev2); + + + vector posV; vector devS; + cout << " HERE prepareDBPM" << endl; + + + cafe->prepareDBPM(_glist, _hVA, devS, posV); + + cout << " HERE " << endl; + + DBPMKeeper dbpm(_glist,_hVA, devS, posV); + + cafe->readDBPMOffsets(dbpm); + vector ox = dbpm.getOffsetX(); + vector oy = dbpm.getOffsetY(); + vector devis = dbpm.getDevice(); + + cout << "size x " << ox.size() << endl; + cout << "size y " << oy.size() << endl; + cout << "devis " << devis.size() << endl; + + for (int i=0; iterminate(); + exit(0); + + ////dbpm.setBS(true); + + ////vector x,y,q,E; + ////vector vx,vy,vq; + vector ddx, ddy, ddq, dde; + ChannelRequestStatus cre; + vector devices; + + cout << "STATUS GETCTRL = " << cafe->getHandleHelper().getChannelRequestStatusGetCtrl(8, cre) << endl; + cout << "Value 1 is PENDING, while 2 is COMPLETE: " << cre.getCallbackProgressKind() << endl; + + + system("date"); + for (int i=0; i<200; ++i ) { + if (i==0) dbpm.setBS(true); + status=cafe->getDBPM(dbpm); + + if (status > ICAFE_LINUX_ERROR) continue; + + //cout << i << " STATUS GETCTRL = " << cafe->getHandleHelper().getChannelRequestStatusGetCtrl(8, cre) << endl; + + //cout << i << " Value 1 is PENIDING, while 2 is COMPLETE: " << cre.getCallbackProgressKind() << endl; + cout << "STATUS " << status << " " << dbpm.status << endl; + + ddx=dbpm.getX(); + ddy=dbpm.getY(); + ddq=dbpm.getQ(); + dde=dbpm.getEnergy(); + + devices = dbpm.getDevice(); + + cout << " ddx.size " << ddx.size() << endl; + cout << " ddy.size " << ddy.size() << endl; + cout << " ddq.size " << ddq.size() << endl; + cout << " dde.size " << dde.size() << endl; + for (int j=0; jterminate(); + exit(0); + + + + + PVDataHolder * pdh = new PVDataHolder[_glist.size()]; + system("date"); + for (int i=0; i<1; ++i) { + status=cafe->get(_hVA, pdh); + } + system("date"); + cafe->closeHandles(_hVA); + + unsigned int _gh; + + cafe->groupOpen("gDBPM", _gh); + PVGroup _pvg; + system("date"); + status=cafe->groupGet(_gh, _pvg); + system("date"); + cout <<"status + " << status << endl; + + cafe->terminate(); + exit(0); + + + typedef std::map floatStringMap; + floatStringMap posDev; + floatStringMap::iterator pos; + + cafe->devicePositionMap("cDBPM", posDev); + + + for (pos =posDev.begin(); pos != posDev.end(); ++pos) { + cout << "device= " << pos->first << " Pos " << pos->second << endl; + //++pos; + } + + + cafe->devicePositionMap("cDBPM", posDev); + + for (pos =posDev.begin(); pos != posDev.end(); ++pos) { + cout << "device= " << pos->first << " Pos " << pos->second << endl; + //++pos; + } + + posDev.clear(); + cafe->devicePositionMap("cVSUP", posDev); + + for (pos =posDev.begin(); pos != posDev.end(); ++pos) { + cout << "device= " << pos->first << " Pos " << pos->second << endl; + //++pos; + } + + vector deviceListV; + deviceListV.push_back("AB-CD"); + deviceListV.push_back("AB-EF"); + cafe->collectionDefine("cTest", deviceListV); + + posDev.clear(); + cafe->devicePositionMap("cTest", posDev); + + for (pos =posDev.begin(); pos != posDev.end(); ++pos) { + cout << "device= " << pos->first << " Pos " << pos->second << endl; + //++pos; + } + + double dValArray[12]; + int sAy[12]; + cafe->getCache(hArray, NHANDLES, dValArray, sAy); + + + for (int i=0; iterminate(); + //exit(1); + + vector gl; + cafe->collectionList(gl); + for (int i=0; i < gl.size(); ++i) { + cout << gl[i] << endl; + } + PVGroup pvgrp; + unsigned int ghan; + cafe->groupOpen("gDBPM", ghan); + cafe->groupGet(ghan, pvgrp); + //pvgrp.show(); + + + + cout << "------------------------------------------------------------" << endl; + cout << " END: (1b) Opening and Closing Channels " << endl; + cout << "------------------------------------------------------------" << endl; + + sleep(3); + + //------------------------------------------------------------ + //(2) Basic Single Channel Operations + //------------------------------------------------------------ + + cout << "------------------------------------------------------------" << endl; + cout << "START: (2) Basic Single Channel Operations " << endl; + cout << "------------------------------------------------------------" << endl; + + //------------------------------------------------------------ + //Data retrieval methods returning a scalar value + //------------------------------------------------------------ + + double d; + //get by handle + status=cafe->get(handle, d); + + if (status != ICAFE_NORMAL) { + cout << "Status indicates an error at line no." << __LINE__ << endl; + cstat.report(status); + //or + cafe->printStatus(handle,status); + } + else { + cout << "Value d=" << d << endl; + } + + float f; short alarmStatus, alarmSeverity; epicsTimeStamp ets; + status=cafe->get(handle, f, alarmStatus, alarmSeverity, ets); + + if (status != ICAFE_NORMAL) { + cout << "Status indicates an error at line no." << __LINE__ << endl; + cafe->printStatus(handle,status); + } + else { + cout << "Value f=" << f << endl; + cout << "AlarmStatus= " << alarmStat.asString(alarmStatus) << " AlarmSeverity=" << alarmSev.asString(alarmSeverity) + << " TimeStamp= " << ets.secPastEpoch << " sec. " << ets.nsec << " nsec " << endl; + } + + + //get by pvname + status=cafe->get(pvArray[0].c_str(), d); + if (status != ICAFE_NORMAL) { + cout << "Status indicates an error at line no." << __LINE__ << endl; + cstat.report(status); + //or + cafe->printStatus(handle,status); + } + + + //To explicitly check on timeout error + if (cstat.csc.isTimeout(status)) { + cout << "Above is a timeout error" << endl; + } + + //To interchange between handle and array + handle = cafe->getHandleFromPV(pvArray[0].c_str()); + const char * pvName= cafe->getPVFromHandle(handle); + + + + + //------------------------------------------------------------ + //Data retrieval methods returning structured data + //------------------------------------------------------------ + unsigned int hWF; + status=cafe->open(PV_WF,hWF); + //status=cafe->open("XHIPA-STA:STA-ND1",hWF); + + + + double dwff; + cafe->get(hWF, dwff); + + cout << "wfd " << dwff << endl; + string ms; + cafe->getWFAsString(hWF, ms); + cout << "wf asstring 1st " << ms << endl; + + cafe->getWFAsString(hWF, ms); + cout << "wf asstring 2nd" << ms << endl; + + cafe->getWFAsStringCache(hWF, ms); + cout << "wf asstring 3rd" << ms << endl; + + + PVDataHolder pvd; + //pvd.setNelem(cafe->getNelemNative(hWF)); + pvd.setNelem(cafe->getNelemNative(hWF)); + status=cafe->get(hWF, pvd); + + if (status==ICAFE_NORMAL) { + + pvd.print(10); //Show only 10 elements of the waveform + + //The PVDataHolder + cout << "pvd.getAsString()" << endl; + for (int i=0; igetNelemRequest(hWF)); ++i) { + cout << pvd.getAsString(i) << " [" << i << "] "; + } + cout << endl; + //First Element Only + cout << "pvd.getAsDbr_string_t() = " << pvd.getAsDbr_string_t() << endl; + cout << "pvd.getAsDouble() = " << pvd.getAsDouble() << endl; + cout << "pvd.getAsFloat() = " << pvd.getAsFloat() << endl; + cout << "pvd.getAsChar() = " << (unsigned short) pvd.getAsChar() << endl; + cout << "pvd.getAsShort() = " << pvd.getAsShort() << endl; + cout << "pvd.getAsUShort() = " << pvd.getAsUShort() << endl; + cout << "pvd.getAsLong() = " << pvd.getAsLong() << endl; + cout << "pvd.getAsULong() = " << pvd.getAsULong() << endl; + cout << "pvd.getAsLongLong() = " << pvd.getAsLongLong() << endl; + cout << "pvd.getAsULongLong() = " << pvd.getAsULongLong() << endl; + + boost::shared_ptr > spVd = pvd.getAsVDouble(); + cout << "pvd.getAsVDouble() = " << spVd.get()[0][0] << " [0] " << spVd.get()[0][1] << " [1] " << endl; + vector * vd= spVd.get(); + cout << "pvd.getAsVDouble() = " << vd[0][0] << " [0] " << vd[0][1] << " [1] " << endl; + + boost::shared_ptr > spVf = pvd.getAsVFloat(); + cout << "pvd.getAsVFloat() = " << spVf.get()[0][0] << " [0] " << spVf.get()[0][1] << " [1] " << endl; + vector * vf= spVf.get(); + cout << "pvd.getAsVFloat() = " << vf[0][0] << " [0] " << vf[0][1] << " [1] " << endl; + + + cout << "pvd.getPVName() = " << pvd.getPV() << endl; + cout << "pvd.getPVAlias() = " << pvd.getPVAlias() << endl; + cout << "pvd.getDevice() = " << pvd.getDevice() << endl; + cout << "pvd.getAttribute() = " << pvd.getAttribute() << endl; + cout << "pvd.getNelem() = " << pvd.getNelem() << endl; + cout << "pvd.getSize() = " << pvd.getSize() << endl; //Size of PVDataHolder container + cout << "pvd.getVal() = " << pvd.getVal() << endl; //CAFE_DATATYPE_UNION_SEQ type + cout << "pvd.getVal()[0].f = " << pvd.getVal()[0].f << endl; // extract assuming a float + cout << "pvd.getDataType() = " << pvd.getDataType() << endl; // CAFE_DATATYPE + + cout << "pvd.getStatus() = " << pvd.getStatus() << endl; + + cout << "pvd.getHasAlarm = " << pvd.getHasAlarm() << endl; // true if Alarm/Severity data returned + cout << "pvd.getAlarmStatus() = " << pvd.getAlarmStatus() << endl; + cout << "pvd.getAlarmSeverity() = " << pvd.getAlarmSeverity() << endl; + cout << "pvd.getHasTS = " << pvd.getHasTS() << endl; // true if Epics Timestamps data returned + ets= pvd.getEpicsTimeStamp(); + cout << "epicsTimeStamp = " << ets.secPastEpoch << " " << ets.nsec << endl; + + + //cout << "pvd.getEnumIntegerValueAsString() = " << pvd.getEnumIntegerValueAsString() << endl; //for mbbi/o records + cout << "pvd.concatToString() = " << pvd.concatToString() << endl; //for waveforesm with data type dbr_chart_t + cout << "pvd.getWFAsString() = " << pvd.concatToString() << endl; + + + + //------------------------------------------------------------ + //Alarm, status/severity values + //------------------------------------------------------------ + + //Alarm status and severities have value/name (int/string) pairs. + //The string equivalent of a given value may be gotten as shown + + cout << "Alarm Status =" << alarmStat.asString(pvd.getAlarmStatus()) << endl; + cout << "Alarm Severity =" << alarmSev.asString(pvd.getAlarmSeverity()) << endl; + + //Information concerning the meaning of the status of the cafe operation + cout << cstat.severity(pvd.getStatus()) << endl; + cout << cstat.asString(pvd.getStatus()) << endl; + cout << cstat.code(pvd.getStatus()) << endl; + cout << cstat.info(pvd.getStatus()) << endl; + cout << cstat.message(pvd.getStatus()) << endl; + //print summary + cstat.report(pvd.getStatus()); + + + + + } // if status=ICAFE_NORMAL + //------------------------------------------------------------ + //Set data + //The set method is able to intrepret all data types, and can + //cater for scalar values and arrays + //------------------------------------------------------------ + + status=cafe->set(PV_X1, 0.02453); + + if (status!=ICAFE_NORMAL) { + cstat.report(status); + } + //or another way to print an error with pv name + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_X1),status); + + + + //Now perform a get/set operation with a user supplied callback function + + + //Get original policy in case we want to use it again. + //ChannelRequestPolicy channelRequestPolicyGetOriginal; + //status=cafe->getPolicyHelper().getChannelRequestPolicyGet(hArray[0], channelRequestPolicyGetOriginal); + + + ChannelRequestPolicy channelRequestPolicyLocal; + //Supply user defined handle + channelRequestPolicyLocal.setHandler(handlerGet); + //Set policy to use + //ChannelWhenToFlushSendBufferPolicyKind CAFENUM::FLUSH_AFTER_EACH_MESSAGE + //ChannelWaitForResponsePolicyKind CAFENUM::WAIT + //ChannelRequestPolicyKind CAFENUM::WITH_CALLBACK_USER_SUPPLIED + channelRequestPolicyLocal.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_USER_SUPPLIED); + + //Now set this policy for GET operation for handle[0] + status=cafe->getPolicyHelper().setChannelRequestPolicyGet(hArray[0], channelRequestPolicyLocal); + //Modify policy to accept PutHandler + channelRequestPolicyLocal.setHandler(handlerPut); + //Now set this policy for PUT operation for hanlde[0] + status=cafe->getPolicyHelper().setChannelRequestPolicyPut(hArray[0], channelRequestPolicyLocal); + + status=cafe->set(PV_X1, 0.62453); + + + cafe->get(PV_X1, f); + + cout <getCache(PV_X1, f); + + cout <terminate(); + //exit(0); + + //------------------------------------------------------------ + //(3) Waveforms and Arrays + //------------------------------------------------------------ + + cout << "------------------------------------------------------------" << endl; + cout << "START: (3) Waveforms and Arrays " << endl; + cout << "------------------------------------------------------------" << endl; + + + //------------------------------------------------------------ + //Data retrieval methods returning a waveform array + //------------------------------------------------------------ + + PVDataHolder pvd_h; + pvd_h.setNelem(cafe->getNelemNative(hWF)); + status=cafe->get(hWF, pvd_h); + cout << "n elements " << pvd_h.getNelem() << endl; + status=cafe->getCache(hWF, pvd_h); + cout << "n elements " << pvd_h.getNelem() << endl; + + + double * dwf = new double[cafe->getNelemNative(hWF)]; + + double inwf [20] = {1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,10, 11, 12, 13,14,15,16,17,18,19,20}; + + + + //by pvName + status=cafe->set(PV_WF, inwf); + status=cafe->get(PV_WF, dwf); + + if (status != ICAFE_NORMAL) { + cout << "Status indicates an error at line no." << __LINE__ << endl; + cstat.report(status); + } + else { + cout << PV_WF << " successfully read out " << endl; + cout << "First five elements have values: " << endl; + for (int i=0; igetNelemNative(hWF)); ++i) { + cout << dwf[i] << " [" << i << "] "; + } + cout << endl; + } + + + //One may also set the number of elements to retrieve + //int nelem =cafe->getHandleHelper().setNelemToNative(hWF); + int nelem = cafe->getHandleHelper().setNelem(hWF, 10); //returns max(10, cafe->getNelemNative(handle)) + //and offset + int offset = cafe->getHandleHelper().setOffset(hWF, 2); + //by Handle + status=cafe->get(hWF, dwf); + if (status != ICAFE_NORMAL) { + cout << "Status indicates an error at line no." << __LINE__ << endl; + cstat.report(status); + } + else { + cout << PV_WF << " sucessfully read out " << endl; + cout << "Elements 2 to 12 of WF (recall offset=2, nelem=10) have values:" << endl; + for (int i=0; igetHandleHelper().setNelemToNative(hWF) + << " and resetting offset to: " << cafe->getHandleHelper().setOffset(hWF, 0) << endl; + + cafe->get(hWF); + delete dwf; + + + //------------------------------------------------------------ + //Data retrieval methods returning a std::vector + //------------------------------------------------------------ + vector dV; + dbr_short_t alarmSta; dbr_short_t alarmSe; epicsTimeStamp tsta; + + cout << "nELEM n: " << cafe->getHandleHelper().getNelemNative (hWF) << endl; + cout << "nELEM r: " << cafe->getHandleHelper().getNelemRequest(hWF) << endl; + cout << "nELEM c: " << cafe->getHandleHelper().getNelemClient (hWF) << endl; + + cout << "set nelem to 16, get: " << cafe->getHandleHelper().setNelem(hWF,16) << endl;; + + cout << "nELEM n: " << cafe->getHandleHelper().getNelemNative (hWF) << endl; + cout << "nELEM r: " << cafe->getHandleHelper().getNelemRequest(hWF) << endl; + cout << "nELEM c: " << cafe->getHandleHelper().getNelemClient (hWF) << endl; + + + cout << "get nelem cache get: " << cafe->getHandleHelper().getNelemToRetrieveFromCache(hWF) << endl; + cout << "set nelem cache to 18, get: " << cafe->getHandleHelper().setNelemToRetrieveFromCache(hWF,18) << endl; + cout << "get nelem cache get: " << cafe->getHandleHelper().getNelemToRetrieveFromCache(hWF) << endl; + + //status=cafe->get(hWF, dV); + //cout << "dV.size " << dV.size() << endl; + status=cafe->getCache(hWF, dV, alarmSta, alarmSe, tsta); + cout << "status " << status << endl; + cout << "dV.size " << dV.size() << endl; + if (status != ICAFE_NORMAL) { + cout << "Status indicates an error at line no." << __LINE__ << endl; + cstat.report(status); + } + else { + cout << PV_WF << " successfully read out " << endl; + cout << "Elements 1-5 of WF have values:" << endl; + for (int i=0; iget(hWF, dV); + //cout << "dV.size " << dV.size() << endl; + + PVCtrlHolder pvc_h(cafe->getNelemNative(hWF)); + + pvc_h.setNelem(12); + + status=cafe->getCtrl(hWF, pvc_h); + cout << "n elements " << pvc_h.getNelem() << endl; + + + cout << "get nelem ctrl cache get: " << cafe->getHandleHelper().getNelemToRetrieveFromCtrlCache(hWF) << endl; + cout << "set nelem ctrl cache to 18, get: " << cafe->getHandleHelper().setNelemToRetrieveFromCtrlCache(hWF,18) << endl; + cout << "get nelem ctrl cache get: " << cafe->getHandleHelper().getNelemToRetrieveFromCtrlCache(hWF) << endl; + + status=cafe->getCtrlCache(hWF, pvc_h); + cout << "n elements " << pvc_h.setNelem(cafe->getHandleHelper().getNelemToRetrieveFromCtrlCache(hWF) ) << endl; + if (status != ICAFE_NORMAL) { + cout << "Status indicates an error at line no." << __LINE__ << endl; + cstat.report(status); + } + else { + cout << PV_WF << " successfully read out " << endl; + cout << "Elements of WF have values:" << endl; + for (int i=0; i statusV; + cafe->getScalars(hV, dV, statusV); + + for (unsigned int i=0; iset(hV[0], 3.214); + + //or Asynchronous gets + cafe->get(hV, statusV); + cafe->getCache(hV, dV, statusV); + + + for (unsigned int i=0; igetNelemNative(hArray[i])); + } + + + + //input Array of handles + //cout << "---------------------------------------" << endl; + //cout << "status=cafe->get(hArray, NHANDLES, pvdArray)" << endl; + //cout << "---------------------------------------" << endl; + + status=cafe->get(hArray, NHANDLES, pvdArray); + + + //input vector of handles + //cout << "---------------------------------------" << endl; + //cout << "status=cafe->getPVArray(hV, pvdArray);" << endl; + //cout << "---------------------------------------" << endl; + + status=cafe->getPVArray(hV, pvdArray); + + + //synchornous get + cout << "---------------------------------------" << endl; + cout << "status=cafe->get(hArray, NHANDLES, statusArray);" << endl; + cout << "---------------------------------------" << endl; + + + //Asynchronous get + int statusArray[NHANDLES]; + status=cafe->get(hArray, NHANDLES, statusArray); + + if (status != ICAFE_NORMAL) { + //cstat.report(status); + for (size_t i=0; iprintStatusIfError(hArray[i],statusArray[i]); + } + } + + //now send message and get values + status=cafe->getCache(hArray, NHANDLES, pvdArray); + + for (size_t i=0; i pvSeries; + for (size_t i=0; igroupDefine((const char *) "gTest", pvSeries); + + unsigned int gHandle; + try { + cafe->groupOpen("gTest", gHandle); + } + catch(CAFEException_groupOpen &e) { + + cout << e.what() << endl; + cstat.report(e.groupEx.statusCode); + exit(1); + } + + PVGroup pvgroup; + + //fill gvgroup with pv parameters from ghandle + //Tis is optional; will be done by groupGet + cafe->groupAttach(gHandle, pvgroup); //do not use groupFetch which will set nelem to 1 for wfs! + + + PVDataHolder * pvdA = pvgroup.getPVData(); + pvdA[0].setNelem(1); + + cafe->groupGet(gHandle, pvgroup); + + //pvgroup.print(); + pvgroup.print(pvgroup.getNPV(),25); // print all members; if wf, max 25 elements + + + pvdA[0].set(1.111); + double d4[4]= {1,2,3,4}; + pvdA[2].set(d4); + + + status=cafe->groupSet(gHandle, pvgroup); + + cafe->groupGet(gHandle, pvgroup); + + + //Alternatively... + for (size_t i=0; isnapshot2XML(pvgroup); + + //cafe->loadSFGroups("VA"); + + + cout << "---------------------------" << endl; + + + cout << "------------------------------------------------------------" << endl; + cout << " END: (6) Synchronous Group Operations " << endl; + cout << "------------------------------------------------------------" << endl; + + + cout << "------------------------------------------------------------" << endl; + cout << "START: (7) Control System Parameters and Channel Information" << endl; + cout << "------------------------------------------------------------" << endl; + + // An example of a single get that retrieves control display parameters + // Get ctrl limits + PVCtrlHolder pvc; + + status=cafe->getCtrl(hArray[0], pvc); + + if (status==ICAFE_NORMAL) { + pvc.print(); //just print + // Access a members explicitly + cout << "---------------------------------------" << endl; + cout << "Control Parameters " << endl; + cout << "---------------------------------------" << endl; + cout << "pv = " << pvc.getPV() << endl; + cout << "val (asString) = " << pvc.getAsString() << endl; + cout << "units = " << pvc.getUnits() << endl; // as char * + //cout << "units = " << pvc.getUnitsAsString() << endl; // as string + cout << "precision = " << pvc.getPrecision() << endl; + vector strV = pvc.getEnumStrings(); + for (unsigned int i=0; i< strV.size(); ++i) { + cout << strV[0] << " " ; + } + if (strV.size() >0) {cout << endl;} + cout << "AsDouble: " << endl; + cout << "upperDispLimit = " << pvc.getUpperDispLimit_AsDouble() << endl; + cout << "lowerDispLimit = " << pvc.getLowerDispLimit_AsDouble() << endl; + cout << "upperAlarmLimit = " << pvc.getUpperAlarmLimit_AsDouble() << endl; + cout << "upperWarningLimit= " << pvc.getUpperWarningLimit_AsDouble() << endl; + cout << "lowerWarningLimit= " << pvc.getLowerWarningLimit_AsDouble() << endl; + cout << "lowerAlarmLimit = " << pvc.getLowerAlarmLimit_AsDouble() << endl; + cout << "upperCtrlLimit = " << pvc.getUpperCtrlLimit_AsDouble() << endl; + cout << "lowerCtrlLimit = " << pvc.getLowerCtrlLimit_AsDouble() << endl; + cout << "AsString: " << endl; + cout << "upperDispLimit = " << pvc.getUpperDispLimit_AsString() << endl; + cout << "lowerDispLimit = " << pvc.getLowerDispLimit_AsString() << endl; + cout << "upperAlarmLimit = " << pvc.getUpperAlarmLimit_AsString() << endl; + cout << "upperWarningLimit= " << pvc.getUpperWarningLimit_AsString() << endl; + cout << "lowerWarningLimit= " << pvc.getLowerWarningLimit_AsString() << endl; + cout << "lowerAlarmLimit = " << pvc.getLowerAlarmLimit_AsString() << endl; + cout << "upperCtrlLimit = " << pvc.getUpperCtrlLimit_AsString() << endl; + cout << "lowerCtrlLimit = " << pvc.getLowerCtrlLimit_AsString() << endl; + cout << "---------------------------------------\n" << endl; + + } + else { + cafe->printStatusIfError(hArray[0],status); + } + + ChannelRegalia chInfo; + CAFEDataTypeCode cdt; + status=cafe->getChannelInfo(hArray[0], chInfo); + + cout << "---------------------------------------" << endl; + cout << "Channel Information " << endl; + cout << "---------------------------------------" << endl; + cout << "channelID = " << chInfo.getChannelID() << endl; + cout << "channelID = " << cafe->getChannelIDAsString(chInfo.getChannelID()) << endl; + cout << "connectFlag = " << chInfo.getConnectFlag() << endl; //bool + cout << "hostName = " << chInfo.getHostName() << endl; //char * + cout << "hostName = " << chInfo.getHostNameAsString() << endl; //string + cout << "dataType = " << chInfo.getDataType() << endl; + cout << "dataType = " << cdt.asString( chInfo.getDataType() ) << endl; + cout << "className = " << chInfo.getClassName() << endl; //char * + cout << "className = " << chInfo.getClassNameAsString() << endl; //string + cout << "readAccess = " << chInfo.getReadAccess() << endl; + cout << "writeAccess = " << chInfo.getWriteAccess() << endl; + cout << "nElem = " << chInfo.getNelem() << endl; + cout << "connectionState = " << chInfo.getConnectionState() << endl; + cout << "connectionState = " << chInfo.getConnectionStateAsString() << endl; + cout << "cafeConnectionState = " << chInfo.getCafeConnectionState() << endl; + cout << "cafeConnectionState = " << chInfo.getCafeConnectionStateAsString() << endl; + cout << "---------------------------------------\n" << endl; + + + + + cout << "------------------------------------------------------------" << endl; + cout << " END: (7) Control System Parameters and Channel Information" << endl; + cout << "------------------------------------------------------------" << endl; + + + cout << "------------------------------------------------------------" << endl; + cout << "START: (8) Monitors, either with or without user supplied callbacks " << endl; + cout << "------------------------------------------------------------" << endl; + + //Simple Monitor + //cafe->monitorStart(hArray[0]); + //or + //cafe->monitorStart(cafe->getInfo().getHandleFromPV(PV_X1)); + + + //Change Policy so that set is synchronous + ChannelRequestPolicy channelRequestPolicyPut; + channelRequestPolicyPut.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //Wait!! + + ChannelRequestPolicy channelRequestPolicyGet; + channelRequestPolicyGet.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::WAIT, CAFENUM::WITHOUT_CALLBACK); //Wait!! + + ChannelRequestPolicy channelRequestPolicyGetDefault; + channelRequestPolicyGetDefault.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //Wait!! + + status=cafe->getPolicyHelper().setChannelRequestPolicyPut(channelRequestPolicyPut); //for all handles + status=cafe->getPolicyHelper().setChannelRequestPolicyPut(hArray[0], channelRequestPolicyPut); //for single handle + + int NLOOPV =1; + // NLOOPV =100000; //double default) 60 secs 2) withoutcallback 54s + // NLOOPV =100000; float default) 43 secs 2) withoutcallback 43s + // NLOOPV =100000; short default) 51 secs 2) withoutcallback 46s + // NLOOPV =100000; short default) 52 secs 2) withoutcallback 56s //change policy to do conversion at ioc + // NLOOPV =100000; dbr_char_t default) 52 secs 2) withoutcallback 52s //change policy to do conversion at ioc + + //However for Waveforms 4084 elements + // NLOOPV =10000; dbr_char_t default) 80 secs 2) withoutcallback 73s //change policy to CAFENUM::NATIVE_DATATYPE + // NLOOPV =10000; dbr_char_t default) 64 secs 2) withoutcallback 63s //change policy to CAFENUM::LOWEST_DATATYPE + + ChannelRequestDataTypePolicy channelRequestDataTypePolicy; + channelRequestDataTypePolicy.setRequestKind(CAFENUM::LOWEST_DATATYPE); + status=cafe->getPolicyHelper().setChannelRequestDataTypePolicy(hArray[1],channelRequestDataTypePolicy); + + dbr_float_t sl[5000]; + system("date"); + status=cafe->getPolicyHelper().setChannelRequestPolicyGet(hArray[1], channelRequestPolicyGetDefault); + for (int i=0; iget(hArray[1], sl);} + system("date"); + status=cafe->getPolicyHelper().setChannelRequestPolicyGet(hArray[1], channelRequestPolicyGet); + for (int i=0; iget(hArray[1], sl);} + system("date"); + + + MonitorPolicy mp, mp2; + mp.setUserArgs((void *) pvArray[0].c_str()); + mp.setHandler(callbackHandlerMonitor); + mp.setCafeDbrType(CAFENUM::DBR_TIME); + mp.setDataType(DBR_STS_FLOAT); //THis will overwrite DBR_TIME above + mp.setMask(DBE_VALUE | DBE_LOG | DBE_ALARM); + + mp2.setUserArgs((void *) hArray[0]); + mp2.setHandler(callbackHandlerMonitor); + mp2.setCafeDbrType(CAFENUM::DBR_TIME); + mp2.setDataType(DBR_STS_FLOAT); //THis will overwrite DBR_TIME above + mp2.setMask(DBE_VALUE | DBE_LOG | DBE_ALARM); + + + cafe->monitorStart(hArray[0], mp); + + cafe->monitorStart(hArray[0], mp2); + + + cafe->set(hArray[0], 1.1023456); + usleep(100000); // 0.1s just about long enough to trigger an extra monitor + + + cafe->monitorStop(hArray[0], mp); + cafe->monitorStop(hArray[0], mp2.getMonitorID()); //Actually, only the monitorID is required + + + + //start many Monitors + cafe->monitorStart(hArray, NHANDLES); + + //sleep(1); + //get latest value from cache + status=cafe->getCache(hArray[0],d); + + //get latest value from cache + status=cafe->getCache(hArray, NHANDLES, pvdArray); + + for (size_t i=0; imonitorStop(hArray, NHANDLES); + + + cout << "------------------------------------------------------------" << endl; + cout << " END: (8) Monitors, either with or without user supplied callbacks " << endl; + cout << "------------------------------------------------------------" << endl; + + cafe->terminate(); + exit(1); + + cout << "------------------------------------------------------------" << endl; + cout << "START: (9) Asynchronous interactions and retrieving data from cache " << endl; + cout << "------------------------------------------------------------" << endl; + + status=cafe->get(hArray[0]); + //by array + status=cafe->get(hArray, NHANDLES, statusV); + //by vector + status=cafe->get(hV, statusV); + + //cafe->_ca_flush_io(); + cafe->flushNow(); + + status=cafe->getCache(hArray, NHANDLES, pvdArray); + + int NL=10; + system("date"); + for (int i=0; igetCachePVArray(hV, pvdArray); + } + system("date"); + + sleep(1); + for (size_t i=0; iset(hArray[1], 3.333455666); + cafe->get(hArray[1]); + cafe->flushNow(); + system("date"); + for (int i=0; igetCache(hV, pvdArray); + } + system("date"); + + for (size_t i=0; igetCache(hV, dV, statusV); + + //for (size_t i=0; isetAndGet(hWF, 2.2, d); + cafe->printStatusIfError(hWF, status); + + cout << "val should be 2.2 " << d << endl; + + + cout << "------------------------------------------------------------" << endl; + cout << " END: (11) Special methods, match, setAndMatch " << endl; + cout << "------------------------------------------------------------" << endl; + + + cout << "------------------------------------------------------------" << endl; + cout << "START: (12) Gracefully terminate CAFE " << endl; + cout << "------------------------------------------------------------" << endl; + + + cout << "------------------------------------------------------------" << endl; + cout << " END: (12) Gracefully terminate CAFE " << endl; + cout << "------------------------------------------------------------" << endl; + + cafe->printHandles(); + + sleep(1); + cafe->closeHandles(hV); + cafe->printHandles(); + cafe->closeHandles(); + cafe->groupClose(); + //cafe->groupHandleErase(); + cafe->printHandles(); + + cafe->terminate(); + exit(0); + + + + //------------------------------------------------------------ + //(1) Quick Start + //------------------------------------------------------------ + + //status=cafe->get(PV_X1, d); + + + //cafe->terminate(); + //exit(0); + + //2 write/read wf + float fArray[256] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24}; + status=cafe->set(PV_WF, fArray); + if (status!=ICAFE_NORMAL) { + cstat.report(status); + } + //or another way to print an error with pv name + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_WF),status); + + //zero array + std::fill(fArray, fArray+256, 0); + + //ask for 25 elements of the wf + cafe->getHandleHelper().setNelem(cafe->getInfo().getHandleFromPV(PV_WF),25); + + status=cafe->get(PV_WF, fArray); + if (status==ICAFE_NORMAL) { + cout << PV_WF << " is a wf; the first 25 elements have values: " << endl; + for (size_t i=0; i<25; ++i) { + cout << fArray[i] << " [" << i << "] " ; + } + cout << endl; + } + else { + //cstat.report(status); + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_WF),status); + } + + + status=cafe->set(PV_WF, 3.2); + + double valD; + status=cafe->get(PV_WF, valD); + cout << "First Element of WF " << valD << endl; + + cout << "Request=" << cafe->getHandleHelper().getNelemRequest(cafe->getInfo().getHandleFromPV(PV_WF)) << endl; + cout << "Native =" << cafe->getHandleHelper().getNelemNative (cafe->getInfo().getHandleFromPV(PV_WF)) << endl; + cout << "Client =" << cafe->getHandleHelper().getNelemClient (cafe->getInfo().getHandleFromPV(PV_WF)) << endl; + + + status=cafe->get(PV_WF, fArray); + + cout << "Request=" << cafe->getHandleHelper().getNelemRequest(cafe->getInfo().getHandleFromPV(PV_WF)) << endl; + cout << "Native =" << cafe->getHandleHelper().getNelemNative (cafe->getInfo().getHandleFromPV(PV_WF)) << endl; + cout << "Client =" << cafe->getHandleHelper().getNelemClient (cafe->getInfo().getHandleFromPV(PV_WF)) << endl; + + + if (status==ICAFE_NORMAL) { + cout << PV_WF << " is a wf; the first 25 elements have values: " << endl; + for (size_t i=0; igetHandleHelper().getNelemRequest(cafe->getInfo().getHandleFromPV(PV_WF)); ++i) { + cout << fArray[i] << " [" << i << "] " ; + } + cout << endl; + } + else { + //cstat.report(status); + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_WF),status); + } + + //cafe->terminate(); + //exit(0); + + //3 write/read mbbi + + status=cafe->set(PV_MBBI, "on"); + if (status!=ICAFE_NORMAL) { + cstat.report(status); + } + //or another way to print an error with pv name + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_MBBI),status); + + dbr_string_t sData; // i.e. char[40] sData; + status=cafe->get(PV_MBBI, sData); + if (status==ICAFE_NORMAL) { + cout << PV_MBBI << " has value= " << sData << endl; + } + else { + //cstat.report(status); + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_MBBI),status); + } + + unsigned short enumValue; // + status=cafe->get(PV_MBBI, enumValue); + if (status==ICAFE_NORMAL) { + cout << PV_MBBI << " has enumValue= " << enumValue << endl; + } + else { + //cstat.report(status); + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_MBBI),status); + } + + + //Get Enum String from Index + cout << "String State = " << cafe->getInfo().getStringFromEnum(cafe->getInfo().getHandleFromPV(PV_MBBI), enumValue) << endl; + + cout << "String State = " << cafe->getInfo().getStringFromEnum(cafe->getInfo().getHandleFromPV(PV_MBBI), 88) << endl; + + cout << "String State = " << cafe->getInfo().getEnumFromString(cafe->getInfo().getHandleFromPV(PV_MBBI), " on 1") << endl; + //cafe->terminate(); + //exit(0); + + //4 Quick Start, reading alarmStatus, alarmSeverity, ts + + d=0.0; // zero d + status=cafe->get(cafe->getInfo().getHandleFromPV(PV_X1), d, alarmStatus, alarmSeverity, ets); + if (status==ICAFE_NORMAL) { + cout << PV_X1 << " has value= " << d << endl; + cout << "alarmStatus= " << alarmStatus << " alarmSeverity=" << alarmSeverity + << " timeStamp= " << ets.secPastEpoch << " sec. " << ets.nsec << " nsec " << endl; + } + else { + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_X1),status); + } + + //5 Quick start, same as above but reading strutured data + //PVDataHolder pvd; + //Allocate memory + pvd.setNelem(cafe->getInfo().getNelemNative(cafe->getInfo().getHandleFromPV(PV_WF))); //Important, else memory will not be allocated to receive data + status=cafe->get(PV_WF, pvd); + //status=cafe->get(cafe->getInfo().getHandleFromPV(PV_WF), pvd); + if (status==ICAFE_NORMAL) { + pvd.print(25); //just print first 25 elements of the waveform + // Access data explicitly + cout << "Value (string format): " << endl; + for (size_t i=0; i<25; ++i) { + cout << pvd.getAsString(i) << " [" << i << "] " ; + } + cout << endl; + cout << "Value ( float format) " << pvd.getAsFloat() << endl; + for (size_t i=0; i<25; ++i) { + cout << pvd.getAsFloat(i) << " [" << i << "] " ; + } + cout << endl; + cout << "Alarm Status = " << pvd.getAlarmStatus() << endl; + cout << "Alarm Severity= " << pvd.getAlarmSeverity() << endl; + cout << "Timestamp = " << pvd.getEpicsTimeStamp().secPastEpoch + << " sec. " << pvd.getEpicsTimeStamp().nsec << " nsec " << endl; + } + else { + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_WF),status); + } + + + // An example of a single get + // get string by handle + status=cafe->get(hArray[0], sData); //sData declared earlier + if (status==ICAFE_NORMAL) { + cout << PV_MBBI << " has value= " << sData << endl; + } + else { + //cstat.report(status); + cafe->printStatusIfError(cafe->getInfo().getHandleFromPV(PV_MBBI),status); + } + + // Another example of a single get + // get string by handle + dbr_string_t sDesc; //char[40]; + status=cafe->get(hDesc, sDesc); + if (status==ICAFE_NORMAL) { + cout << PV_X1_DESC << " has value= " << sDesc << endl; + } + else { + //cstat.report(status); + cafe->printStatusIfError(hDesc,status); + } + + + + // An example of a single get with data, alarms and timestamp + // Get structured data by handle + PVDataHolder pvd2; + pvd2.setNelem(1); //Important if nelements>1, + //else memory will not be allocated to receive data + + status=cafe->get(hArray[0], pvd2); + if (status==ICAFE_NORMAL) { + pvd2.print(); //just print + // Access data explicitly + cout << "Value (string format): " << pvd2.getAsString() << endl; + cout << "Value ( float format) " << pvd2.getAsFloat() << endl; + cout << "Alarm Status = " << pvd2.getAlarmStatus() << endl; + cout << "Alarm Severity= " << pvd2.getAlarmSeverity() << endl; + cout << "Timestamp = " << pvd2.getEpicsTimeStamp().secPastEpoch + << " sec. " << pvd2.getEpicsTimeStamp().nsec << " nsec " << endl; + } + else { + cafe->printStatusIfError(hArray[0],status); + } + + + + //CA SYNCHRONOUS GROUPS + //Define a Group, and perform synchronous group + + + + for (size_t kl=0; kl<1; ++kl) { + + + //2. ANOTHER WAY TO DO A GET ON A COLLECTIONM OF CHANNELS + //2. Gathers gets and send in one call + status=cafe->get(hArray, NHANDLES, pvdArray); + + if (status != ICAFE_NORMAL) { + cstat.report(status); + } + + for (size_t i=0; iset(hArray[6],3.3) ; // change one value + if (status!=ICAFE_NORMAL) { + cafe->printStatusIfError(hArray[6],status); + } + + cout << "---------------------------" << endl; + + //3. Another way: gets and send in one call + //3. IN ESSENCE THIS IS THE SAME AS 2. but broken down into 2 parts + int statusArray[NHANDLES]; + status=cafe->get(hArray, NHANDLES, statusArray); + + if (status != ICAFE_NORMAL) { + //cstat.report(status); + for (size_t i=0; iprintStatusIfError(hArray[i],statusArray[i]); + } + } + + cout << "---------------------------" << endl; + status=cafe->getCache(hArray, NHANDLES, pvdArray); + + for (size_t i=0; iprintHandles(); + + + + + //Start Monitors on Group + vector statusMonV; + status=cafe->groupMonitorStart(gHandle, statusMonV); // monitorIDV); + + + cout << "MONITOR STARTED " << endl; + + //sleep(1); + + PVDataHolder * pvda=pvgroup.getPVData(); + + for (int ij=0; ij< pvgroup.getNPV(); ++ij) { + //pvda[ij].set(1.1234);//pvda->val[0].d+ij; + pvda[ij].set((string)"1.012"); + } + + + pvgroup.setPVData(pvda); + + status=cafe->groupSet(gHandle, pvgroup); + + cout << "GROUP SET WITH status = " << status << endl; + + //sleep(1); + + status=cafe->groupGetCache(gHandle, pvgroup); + if ( status != ICAFE_NORMAL) { + cout << "STATUS from groupGetCache for group " + << pvgroup.getName() << " is " << pvgroup.getStatusGroup() << "//" << status << endl; + for (int i=0; imonitorStop(hArray, NHANDLES); + + + cout << "STOPPING GROUP MONITORS" << endl; + + status=cafe->groupMonitorStop(gHandle, statusV); + + cout << "status " << status << endl; + + vector glist; + glist.clear(); + glist.reserve(50); + cafe->groupList (glist); + for (int i=0; i< glist.size(); ++i) { + cout << glist[i] << " " << i << endl; + } + + sleep(5); + + cafe->groupClose(); + glist.clear(); + + cafe->groupList (glist); + cout << " size " << glist.size() << endl; + for (int i=0; i< glist.size(); ++i) { + cout << glist[i] << " " << i << endl; + } + + + #if HAVE_PYTHON + + cout << "HAVE PYTHON " << endl; + //dlopen("/opt/gfa/python-3.5/latest/lib/libpython3.5m.so", RTLD_GLOBAL|RTLD_LAZY); + Py_Finalize(); + + #endif + + + sleep(2); + //terminate cafe + + cafe->terminate(); + sleep(2); + return 0; +} diff --git a/examples/cafeTest/callbacks.h b/examples/cafeTest/callbacks.h new file mode 100644 index 0000000..af4eef4 --- /dev/null +++ b/examples/cafeTest/callbacks.h @@ -0,0 +1,186 @@ +// +// callbacks.h +// + + +void callbackHandlerMonitor( struct event_handler_args args) { +#define __METHOD__ "callbackHandlerMonitor" + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) ca_puser(args.chid);// args.usr; // ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int)_handle); + + if (it_handle != handle_index.end()) { + //cout << (*it_handle).getPV() << " " << (*it_handle).getHandle() << endl; + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + + + //**** ADD USER CODE HERE ***// + + if (args.type < DBR_GR_STRING) { + PVDataHolder pvd(args.count); + (*it_handle).getPVDataHolder(pvd); + pvd.print(); + cout << "val/D//= " << pvd.getAsString(0) << endl; + + } + else if (args.type < DBR_PUT_ACKT) { + PVCtrlHolder pvc(args.count); + (*it_handle).getPVCtrlHolder(pvc); + pvc.print(); + cout << "val/C/= " << pvc.getAsString(0) << endl; + } + + + vector mpV = (*it_handle).getMonitorPolicyVector(); + + + cout << args.usr << endl; + cout << (*it_handle).getUsrArgs() << endl; + + for (int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int) _handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX)cafeMutex.lock(); + + ChannelRequestStatus channelRequestStatusPut=(*it_handle).getChannelRequestStatusPut(); + + channelRequestStatusPut.setCallbackKind(false, true); + + handle_index.modify(it_handle, change_channelRequestStatusPut(channelRequestStatusPut)); + + cout << __METHOD__ << " WITH_CALLBACK_USER_SUPLLIED for PUT done " << (*it_handle).getChannelRequestStatusPut().getCallbackProgressKind() << endl; + + if(MUTEX)cafeMutex.unlock(); + + //**** ADD USER CODE HERE ***// + + + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + + + + +return; +#undef __METHOD__ +}; + + + +/** + * Callback function for getCallback method is invoked + * with a pointer to the retrieved value + * \param args input: event handler arguments + */ +void handlerGet( struct event_handler_args args) { +#define __METHOD__ "handlerGet" + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) args.usr; // ca_puser(args.chid); + + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + ChannelRequestStatus channelRequestStatusGet=(*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackKind(false, true); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + //cout << __METHOD__ << " GET CALLBACK DONE " << (*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() << endl; + if(MUTEX){cafeMutex.unlock();} + + + if (args.type < DBR_GR_STRING) { + PVDataHolder pvd(args.count); + (*it_handle).getPVDataHolder(pvd); + pvd.print(); + cout << "val/D//= " << pvd.getAsString(0) << endl; + + } + else if (args.type < DBR_PUT_ACKT) { + PVCtrlHolder pvc(args.count); + (*it_handle).getPVCtrlHolder(pvc); + pvc.print(); + cout << "val/C/= " << pvc.getAsString(0) << endl; + } + + + + } + else { + + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + + +return; +#undef __METHOD__ +}; + + diff --git a/examples/cafeTest/gDBPM.xml b/examples/cafeTest/gDBPM.xml new file mode 100644 index 0000000..85906e1 --- /dev/null +++ b/examples/cafeTest/gDBPM.xml @@ -0,0 +1,39 @@ + + + + + + + DBPM configuration + + cDBPM + X1 + + + + cDBPM + Y1 + + + cDBPM + Q1 + + + cDBPM + X1-VALID + + + cDBPM + Y1-VALID + + + cDBPM + Q1-VALID + + + cDBPM + ENERGY + + + + diff --git a/examples/cafeTest/input.json b/examples/cafeTest/input.json new file mode 100644 index 0000000..a85c82b --- /dev/null +++ b/examples/cafeTest/input.json @@ -0,0 +1,241 @@ +{"channels":[ +{"name":"SINEG01-DBPM340:X1","backend":"sf-databuffer"}, +{"name":"SINEG01-DBPM340:Y1","backend":"sf-databuffer"}, +{"name":"SINSB01-DBPM150:Y1","backend":"sf-databuffer"}, +{"name":"SINSB02-DBPM150:Y1","backend":"sf-databuffer"}, +{"name":"SINLH01-DBPM060:Y1","backend":"sf-databuffer"}, +{"name":"SINLH02-DBPM210:Y1","backend":"sf-databuffer"}, +{"name":"SINLH02-DBPM240:Y1","backend":"sf-databuffer"}, +{"name":"SINLH03-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"SINLH03-DBPM050:Y1","backend":"sf-databuffer"}, +{"name":"SINLH03-DBPM090:Y1","backend":"sf-databuffer"}, +{"name":"SINSB03-DBPM120:Y1","backend":"sf-databuffer"}, +{"name":"SINSB03-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"SINSB04-DBPM120:Y1","backend":"sf-databuffer"}, +{"name":"SINSB04-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"SINSB05-DBPM120:Y1","backend":"sf-databuffer"}, +{"name":"SINSB05-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"SINXB01-DBPM120:Y1","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM030:Y1","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM080:Y1","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM100:Y1","backend":"sf-databuffer"}, +{"name":"SINBC02-DBPM140:Y1","backend":"sf-databuffer"}, +{"name":"SINBC02-DBPM320:Y1","backend":"sf-databuffer"}, +{"name":"SINDI01-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"SINDI01-DBPM060:Y1","backend":"sf-databuffer"}, +{"name":"SINDI02-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"SINDI02-DBPM040:Y1","backend":"sf-databuffer"}, +{"name":"SINDI02-DBPM080:Y1","backend":"sf-databuffer"}, +{"name":"S10CB01-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB01-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10CB02-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB02-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10DI01-DBPM110:Y1","backend":"sf-databuffer"}, +{"name":"S10CB03-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB03-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10CB04-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB04-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10CB05-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB05-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10CB06-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB06-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10CB07-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB07-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10CB08-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10CB08-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S10CB09-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"S10BC01-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"S10BC01-DBPM050:Y1","backend":"sf-databuffer"}, +{"name":"S10BC01-DBPM090:Y1","backend":"sf-databuffer"}, +{"name":"S10BC02-DBPM140:Y1","backend":"sf-databuffer"}, +{"name":"S10BC02-DBPM320:Y1","backend":"sf-databuffer"}, +{"name":"S10MA01-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"S10MA01-DBPM060:Y1","backend":"sf-databuffer"}, +{"name":"S10MA01-DBPM120:Y1","backend":"sf-databuffer"}, +{"name":"S20CB01-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S20CB02-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S20CB03-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S20SY01-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"S20SY01-DBPM040:Y1","backend":"sf-databuffer"}, +{"name":"S20SY01-DBPM060:Y1","backend":"sf-databuffer"}, +{"name":"S20SY02-DBPM080:Y1","backend":"sf-databuffer"}, +{"name":"S20SY02-DBPM120:Y1","backend":"sf-databuffer"}, +{"name":"S20SY02-DBPM150:Y1","backend":"sf-databuffer"}, +{"name":"S20SY03-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"S20SY03-DBPM040:Y1","backend":"sf-databuffer"}, +{"name":"S20SY03-DBPM080:Y1","backend":"sf-databuffer"}, +{"name":"S30CB01-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB02-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB03-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB04-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB05-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB06-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB07-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB08-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB09-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB10-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB11-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB12-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB13-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB14-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"S30CB15-DBPM420:Y1","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM060:Y1","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM120:Y1","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM150:Y1","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM110:Y1","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM220:Y1","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM260:Y1","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM330:Y1","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM470:Y1","backend":"sf-databuffer"}, +{"name":"SARMA01-DBPM040:Y1","backend":"sf-databuffer"}, +{"name":"SARMA01-DBPM100:Y1","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM020:Y1","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM040:Y1","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM110:Y1","backend":"sf-databuffer"}, +{"name":"SARUN01-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN02-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN03-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN04-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN05-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN06-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN07-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN09-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN10-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN11-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN12-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN13-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN14-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN15-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN16-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN17-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN18-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN19-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"SARUN20-DBPM070:Y1","backend":"sf-databuffer"}, +{"name":"S10BD01-DBPM020:Y1","backend":"sf-databuffer"}, +{"name":"SARBD01-DBPM040:Y1","backend":"sf-databuffer"}, +{"name":"SARBD02-DBPM010:Y1","backend":"sf-databuffer"}, +{"name":"SARBD02-DBPM040:Y1","backend":"sf-databuffer"}, +{"name":"SINEG01-DBPM340:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB01-DBPM150:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB02-DBPM150:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINLH01-DBPM060:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINLH02-DBPM210:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINLH02-DBPM240:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINLH03-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINLH03-DBPM050:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINLH03-DBPM090:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB03-DBPM120:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB03-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB04-DBPM120:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB04-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB05-DBPM120:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINSB05-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINXB01-DBPM120:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM030:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM080:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINBC01-DBPM100:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINBC02-DBPM140:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINBC02-DBPM320:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINDI01-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINDI01-DBPM060:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINDI02-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINDI02-DBPM040:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SINDI02-DBPM080:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB01-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB01-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB02-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB02-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10DI01-DBPM110:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB03-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB03-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB04-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB04-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB05-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB05-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB06-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB06-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB07-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB07-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB08-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB08-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10CB09-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10BC01-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10BC01-DBPM050:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10BC01-DBPM090:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10BC02-DBPM140:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10BC02-DBPM320:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10MA01-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10MA01-DBPM060:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10MA01-DBPM120:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20CB01-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20CB02-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20CB03-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY01-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY01-DBPM040:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY01-DBPM060:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY02-DBPM080:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY02-DBPM120:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY02-DBPM150:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY03-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY03-DBPM040:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S20SY03-DBPM080:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB01-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB02-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB03-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB04-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB05-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB06-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB07-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB08-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB09-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB10-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB11-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB12-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB13-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB14-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S30CB15-DBPM420:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM060:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM120:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL01-DBPM150:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM110:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM220:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM260:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM330:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARCL02-DBPM470:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARMA01-DBPM040:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARMA01-DBPM100:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM020:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM040:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARMA02-DBPM110:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN01-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN02-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN03-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN04-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN05-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN06-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN07-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN09-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN10-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN11-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN12-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN13-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN14-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN15-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN16-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN17-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN18-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN19-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARUN20-DBPM070:Y1-VALID","backend":"sf-databuffer"}, +{"name":"S10BD01-DBPM020:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARBD01-DBPM040:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARBD02-DBPM010:Y1-VALID","backend":"sf-databuffer"}, +{"name":"SARBD02-DBPM040:Y1-VALID","backend":"sf-databuffer"}], +"mapping":{"incomplete":"fill-null"}, +"channelValidation":{"inconsistency":"keep-as-is"}, +"sendBehaviour":{"strategy":"complete-latest"}} diff --git a/examples/cafeTest/makePush b/examples/cafeTest/makePush new file mode 100644 index 0000000..32625f7 --- /dev/null +++ b/examples/cafeTest/makePush @@ -0,0 +1,6 @@ +g++ cafePush.cpp -o cafePush -I/opt/gfa/zmq/zeromq-4.1.5/include -I/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include -L/opt/gfa/zmq/zeromq-4.1.5/lib -Wl,-rpath,/opt/gfa/zmq/zeromq-4.1.5/lib -L/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 -Wl,-rpath,/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 -lzmq -ljson_linux-gcc-4.4.7_libmt + + + + +g++ cafePush.cpp -o cafePush -I/opt/gfa/zmq/zeromq-4.1.5/include -L/opt/gfa/zmq/zeromq-4.1.5/lib -Wl,-rpath,/opt/gfa/zmq/zeromq-4.1.5/lib -lzmq diff --git a/examples/cafeTest/makefile b/examples/cafeTest/makefile new file mode 100644 index 0000000..a79146f --- /dev/null +++ b/examples/cafeTest/makefile @@ -0,0 +1,42 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build a simple C++ cafe client +# + + +#CAFE version to link to +CAFE_VERSION=cafe-1.2.0-final-1 + +#PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +#PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/cpp +BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include + +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) + #-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib + +LIBS += -lcafe -lca -lCom + + +cafeTest: cafeTest.cc callbacks.h + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_local_2 b/examples/cafeTest/makefile_local_2 new file mode 100644 index 0000000..33d6e08 --- /dev/null +++ b/examples/cafeTest/makefile_local_2 @@ -0,0 +1,52 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build C++ cafe client +# +# For cafeClient that needs loadSFGroups we need to +# link in python libraries + + +#CAFE version to link to +#CAFE_VERSION=cafe-1.0.0-final-2 + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/afs/psi.ch/project/cafe/gitworkspace/CAFE +#CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5 +CAFE_CPP_BASE=${CAFE_BASE}/cpp +BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include + + + +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) #\ +# -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/src/.libs \ + -Wl,-rpath,$(CAFE_CPP_BASE)/src/.libs #\ +# -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64 +# -L$(CAFE_CPP_BASE)/src/libs/pycafe \ + +#LIBS += -lpython3.5m +LIBS += -lcafe -lca -lCom + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_local_win b/examples/cafeTest/makefile_local_win new file mode 100644 index 0000000..7736128 --- /dev/null +++ b/examples/cafeTest/makefile_local_win @@ -0,0 +1,23 @@ +INCLUDES = -Ic:\CAFE\CAFE\cpp\include -Ic:\CAFE\CAFE\cpp -Ic:\local\boost_1_62_0 \ +-Ic:\local\boost_1_62_0\boost -Ic:\epics\base-3.14.12.5\include -Ic:\epics\base-3.14.12.5\include\os\WIN32 \ +-Ic:\Qt\4.8.4\include +CXX=cl +CXXFLAGS = /W4 /EHsc +OUTPUT_OPTION = /o $@ +LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \ +C:\CAFE\CAFE\cpp\cafe.lib \ +C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_62.lib \ +C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_62.lib \ +C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_date_time-vc100-mt-s-1_62.lib \ +C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_chrono-vc100-mt-s-1_62.lib \ +C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib + +cafeTest: cafeTest.obj + $(CXX) cafeTest.obj $(LIB_LOCAL) + +cafeTest.obj: cafeTest.cpp + $(CXX) $(CXXFLAGS) $(INCLUDES) /c cafeTest.cpp + +#"C:\Program Files (x86)\GnuWin32\bin\make" + + diff --git a/examples/cafeTest/makefile_noqt b/examples/cafeTest/makefile_noqt new file mode 100644 index 0000000..b682db2 --- /dev/null +++ b/examples/cafeTest/makefile_noqt @@ -0,0 +1,51 @@ +# +# Jan Chrin +# November 2015 +# +# Makefile to build C++ cafe client + +#CAFE version to link to +CAFE_VERSION=latest + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/cpp +BOOST_BASE=${CAFE_BASE}/boost/boost_1_57_0 + +#INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + +INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp \ + -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) \ + -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) +# -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ +# -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib + + + +#LIBS += -lpython2.6 +LIBS += -lcafe -lca -lCom -lpython3.5m + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_py b/examples/cafeTest/makefile_py new file mode 100644 index 0000000..bf3f66e --- /dev/null +++ b/examples/cafeTest/makefile_py @@ -0,0 +1,54 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build C++ cafe client +# +# For cafeClient that needs loadSFGroups we need to +# link in python libraries + + +#CAFE version to link to +CAFE_VERSION=pycafe-1.0.0-alpha-4 + + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5 +BOOST_BASE=${CAFE_BASE}/boost/boost_1_57_0 + + +#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) \ + -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) +# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ +# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + + +#LIBS += -lpython2.6 +LIBS += -lcafe -lca -lCom -lpython3.5m + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_py_latest b/examples/cafeTest/makefile_py_latest new file mode 100644 index 0000000..437dd7a --- /dev/null +++ b/examples/cafeTest/makefile_py_latest @@ -0,0 +1,54 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build C++ cafe client +# +# For cafeClient that needs loadSFGroups we need to +# link in python libraries + + +#CAFE version to link to +CAFE_VERSION=latest + + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5 +BOOST_BASE=${CAFE_BASE}/boost/boost_1_57_0 + + +#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) \ + -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) +# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ +# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + + +#LIBS += -lpython2.6 +LIBS += -lcafe -lca -lCom -lpython3.5m + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_py_latest1 b/examples/cafeTest/makefile_py_latest1 new file mode 100644 index 0000000..a5ea72e --- /dev/null +++ b/examples/cafeTest/makefile_py_latest1 @@ -0,0 +1,55 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build C++ cafe client +# +# For cafeClient that needs loadSFGroups we need to +# link in python libraries + + +#CAFE version to link to +CAFE_VERSION=pycafe-1.0.0-beta-1 +CAFE_VERSION_OTHER=pycafe-noqt-1.0.0-beta-1 + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +#python/python-3.5 +CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5 +BOOST_BASE=${CAFE_BASE}/boost/boost_1_57_0 + + +#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) \ + -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) +# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ +# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + + +#LIBS += -lpython2.6 +LIBS += -lcafe -lca -lCom -lpython3.5m + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_py_latest2 b/examples/cafeTest/makefile_py_latest2 new file mode 100644 index 0000000..3f2bfeb --- /dev/null +++ b/examples/cafeTest/makefile_py_latest2 @@ -0,0 +1,55 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build C++ cafe client +# +# For cafeClient that needs loadSFGroups we need to +# link in python libraries + + +#CAFE version to link to +CAFE_VERSION=pycafe-1.0.0-final-1 + + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5 +#CAFE_CPP_BASE=${CAFE_BASE}/cpp/ +BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include + + +#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) \ + -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64 +# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ +# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + + +LIBS += -lpython3.5m +LIBS += -lcafe -lca -lCom + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_py_latest2z b/examples/cafeTest/makefile_py_latest2z new file mode 100644 index 0000000..8c202c8 --- /dev/null +++ b/examples/cafeTest/makefile_py_latest2z @@ -0,0 +1,69 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build C++ cafe client +# +# For cafeClient that needs loadSFGroups we need to +# link in python libraries + + +#CAFE version to link to +CAFE_VERSION=pyzcafe-1.3.0-alpha-1 + + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5 +BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include + +ZEROMQ_BASE=/opt/gfa/zmq/zeromq-4.1.5 + +#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/include +#-I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) -I$(ZEROMQ_BASE)/include \ + -I/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include \ + -I/opt/gfa/zmq/curl-7.54.1/include \ + -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + + +# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ +# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -L$(ZEROMQ_BASE)/lib \ + -Wl,-rpath,$(ZEROMQ_BASE)/lib \ + -L/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 \ + -Wl,-rpath,/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 \ + -L/opt/gfa/zmq/curl-7.54.1/lib/.libs \ + -Wl,-rpath,/opt/gfa/zmq/curl-7.54.1/lib/.libs \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64 +# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ +# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + + +LIBS += -lpython3.5m +LIBS += -lcafe -lca -lCom -lzmq -ljson_linux-gcc-4.4.7_libmt -lcurl + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_py_static2 b/examples/cafeTest/makefile_py_static2 new file mode 100644 index 0000000..dfd4968 --- /dev/null +++ b/examples/cafeTest/makefile_py_static2 @@ -0,0 +1,75 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build C++ cafe client +# +# For cafeClient that needs loadSFGroups we need to +# link in python libraries + + +#CAFE version to link to +CAFE_VERSION=pycafe-1.0.0-beta-4 + + +PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5 +#CAFE_CPP_BASE=${CAFE_BASE}/cpp +BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include + + +#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) \ + -I${PYTHON_INCLUDE} + +#-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64 +# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ +# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \ + + +LIBS += -lpython3.5m +LIBS += -lcafe -lca -lCom + +#cafeTest: cafeTest.cc +# g++ cafeTest.cc -o cafeTest \ +# $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + +#cafeTest: cafeTest.cc +# g++ cafeTest.cc -o cafeTest \ +# $(INCLUDE_PATH) -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ +# -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ +# $(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/libcafe.a -lca -lCom +## -L$(PYTHON_LIB)/libpython3.5m.so + + +cafeTest: cafeTest.cc + g++ cafeTest.cc -o cafeTest \ + -I$(BOOST_BASE) -I${PYTHON_INCLUDE} -I/usr/include/Qt \ + -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + $(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/libcafe.a \ + $(EPICS_BASE)/lib/${EPICS_HOST_ARCH}/libca.a \ + $(EPICS_BASE)/lib/${EPICS_HOST_ARCH}/libCom.a \ + -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) \ + -L/usr/lib64 -ldl -lpthread -lreadline -lrt -lpython3.5m -lQtCore -lQtXml + + + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/makefile_rel b/examples/cafeTest/makefile_rel new file mode 100644 index 0000000..334bf53 --- /dev/null +++ b/examples/cafeTest/makefile_rel @@ -0,0 +1,22 @@ +# +# Jan Chrin +# June 2016 +# + +##### CHANGE AS APPROPRIATE ################# +#Cafe CPP Version to install +CAFE_VERSION=cafe-1.0.0-alpha-1 + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe/cpp + +CAFE_ACTUAL=${CAFE_BASE}/${CAFE_VERSION} + +EXAMPLES_INSTALL_PATH= $(CAFE_ACTUAL)/examples/cafeTest +############################################# + +install: + mkdir -p $(EXAMPLES_INSTALL_PATH) + cp makefile $(EXAMPLES_INSTALL_PATH) + cp cafeTest.cc $(EXAMPLES_INSTALL_PATH) + diff --git a/examples/cafeTest/makefilez b/examples/cafeTest/makefilez new file mode 100644 index 0000000..ce65b95 --- /dev/null +++ b/examples/cafeTest/makefilez @@ -0,0 +1,48 @@ +# +# Jan Chrin +# June 2016 +# +# Makefile to build a simple C++ cafe client +# + + +#CAFE version to link to +CAFE_VERSION=cafez-1.3.0-alpha-1 + +#PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m +#PYTHON_LIB=/opt/gfa/python-3.5/latest/lib + +EPICS_BASE=${EPICS}/base + +#CAFE project base +CAFE_BASE=/opt/gfa/cafe +CAFE_CPP_BASE=${CAFE_BASE}/cpp +BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include + +ZEROMQ_BASE=/opt/gfa/zmq/zeromq-4.1.5 + +INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \ + -I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \ + -I$(BOOST_BASE) -I$(ZEROMQ_BASE)/include -I/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include + #-I$(BOOST_BASE)/boost + +LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \ + -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \ + -L$(ZEROMQ_BASE)/lib \ + -Wl,-rpath,$(ZEROMQ_BASE)/lib \ + -L/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 \ + -Wl,-rpath,/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 + +LIBS += -lcafe -lca -lCom -lzmq -ljson_linux-gcc-4.4.7_libmt + + +cafeTest: cafeTest.cc callbacks.h + g++ cafeTest.cc -o cafeTest \ + $(INCLUDE_PATH) $(LIB_DIR) $(LIBS) + + +clean: + rm -f cafeTest.o cafeTest + diff --git a/examples/cafeTest/outAramis.xml b/examples/cafeTest/outAramis.xml new file mode 100644 index 0000000..70c77c5 --- /dev/null +++ b/examples/cafeTest/outAramis.xml @@ -0,0 +1,2793 @@ + + + Collection of Nodes at SwissFEL + + ENERGY + X1 + Y1 + X2 + Y2 + X1-AVG + Y1-AVG + X1-AVG-RMS + Y1-AVG-RMS + X1-VALID + X2-VALID + Y1-VALID + Y2-VALID + Z-POS + S-POS + Q1 + Q1-VALID + Q2 + Q2-VALID + + + SINEG01-DBPM340 + + + SINSB01-DBPM150 + + + SINSB02-DBPM150 + + + SINLH01-DBPM060 + + + SINLH02-DBPM210 + + + SINLH02-DBPM240 + + + SINLH03-DBPM010 + + + SINLH03-DBPM050 + + + SINLH03-DBPM090 + + + SINSB03-DBPM120 + + + SINSB03-DBPM220 + + + SINSB04-DBPM120 + + + SINSB04-DBPM220 + + + SINSB05-DBPM120 + + + SINSB05-DBPM220 + + + SINXB01-DBPM120 + + + SINBC01-DBPM010 + + + SINBC01-DBPM030 + + + SINBC01-DBPM080 + + + SINBC01-DBPM100 + + + SINBC02-DBPM140 + + + SINBC02-DBPM320 + + + SINDI01-DBPM010 + + + SINDI01-DBPM060 + + + SINDI02-DBPM010 + + + SINDI02-DBPM040 + + + SINDI02-DBPM080 + + + S10CB01-DBPM220 + + + S10CB01-DBPM420 + + + S10CB02-DBPM220 + + + S10CB02-DBPM420 + + + S10BD01-DBPM020 + + + S10DI01-DBPM110 + + + S10CB03-DBPM220 + + + S10CB03-DBPM420 + + + S10CB04-DBPM220 + + + S10CB04-DBPM420 + + + S10CB05-DBPM220 + + + S10CB05-DBPM420 + + + S10CB06-DBPM220 + + + S10CB06-DBPM420 + + + S10CB07-DBPM220 + + + S10CB07-DBPM420 + + + S10CB08-DBPM220 + + + S10CB08-DBPM420 + + + S10CB09-DBPM220 + + + S10BC01-DBPM010 + + + S10BC01-DBPM050 + + + S10BC01-DBPM090 + + + S10BC02-DBPM140 + + + S10BC02-DBPM320 + + + S10MA01-DBPM010 + + + S10MA01-DBPM060 + + + S10MA01-DBPM120 + + + S20CB01-DBPM420 + + + S20CB02-DBPM420 + + + S20CB03-DBPM420 + + + S20SY01-DBPM010 + + + S20SY01-DBPM040 + + + S20SY01-DBPM060 + + + S20SY02-DBPM080 + + + S20SY02-DBPM120 + + + S20SY02-DBPM150 + + + S20SY03-DBPM010 + + + S20SY03-DBPM040 + + + S20SY03-DBPM080 + + + S30CB01-DBPM420 + + + S30CB02-DBPM420 + + + S30CB03-DBPM420 + + + S30CB04-DBPM420 + + + S30CB05-DBPM420 + + + S30CB06-DBPM420 + + + S30CB07-DBPM420 + + + S30CB08-DBPM420 + + + S30CB09-DBPM420 + + + S30CB10-DBPM420 + + + S30CB11-DBPM420 + + + S30CB12-DBPM420 + + + S30CB13-DBPM420 + + + S30CB14-DBPM420 + + + S30CB15-DBPM420 + + + SARCL01-DBPM010 + + + SARCL01-DBPM060 + + + SARCL01-DBPM120 + + + SARCL01-DBPM150 + + + SARCL02-DBPM110 + + + SARCL02-DBPM220 + + + SARCL02-DBPM260 + + + SARCL02-DBPM330 + + + SARCL02-DBPM470 + + + SARMA01-DBPM040 + + + SARMA01-DBPM100 + + + SARMA02-DBPM010 + + + SARMA02-DBPM020 + + + SARMA02-DBPM040 + + + SARMA02-DBPM110 + + + SARUN01-DBPM070 + + + SARUN02-DBPM070 + + + SARUN03-DBPM070 + + + SARUN04-DBPM070 + + + SARUN05-DBPM070 + + + SARUN06-DBPM070 + + + SARUN07-DBPM070 + + + SARUN08-DBPM210 + + + SARUN08-DBPM410 + + + SARUN09-DBPM070 + + + SARUN10-DBPM070 + + + SARUN11-DBPM070 + + + SARUN12-DBPM070 + + + SARUN13-DBPM070 + + + SARUN14-DBPM070 + + + SARUN15-DBPM070 + + + SARUN16-DBPM070 + + + SARUN17-DBPM070 + + + SARUN18-DBPM070 + + + SARUN19-DBPM070 + + + SARUN20-DBPM070 + + + + SARBD01-DBPM040 + + + SARBD02-DBPM010 + + + SARBD02-DBPM040 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + ONOFF + ONOFF-GET + ENERGY + + + SINEG01-MCRX120 + + + SINEG01-MCRX160 + + + SINEG01-MCRX180 + + + SINEG01-MCRX200 + + + SINEG01-MCRX220 + + + SINSB01-MCRX010 + + + SINSB02-MCRX010 + + + SINLH01-MCRX020 + + + SINLH01-MCRX050 + + + SINLH02-MCRX010 + + + SINLH02-MCRX100 + + + SINLH02-MCRX200 + + + SINLH02-MCRX300 + + + SINLH02-MCRX400 + + + SINLH02-MCRX410 + + + SINLH03-MCRX040 + + + SINLH03-MCRX080 + + + SINSB03-MCRX130 + + + SINSB03-MCRX230 + + + SINSB04-MCRX130 + + + SINSB04-MCRX230 + + + SINSB05-MCRX130 + + + SINSB05-MCRX230 + + + SINBC01-MCRX020 + + + SINBC01-MCRX050 + + + SINBC01-MCRX070 + + + SINBC01-MCRX090 + + + SINBC01-MCRX110 + + + SINBC02-MCRX100 + + + SINBC02-MCRX200 + + + SINBC02-MCRX300 + + + SINBC02-MCRX400 + + + SINDI01-MCRX020 + + + SINDI01-MCRX070 + + + SINDI02-MCRX020 + + + SINDI02-MCRX030 + + + SINDI02-MCRX050 + + + SINDI02-MCRX060 + + + SINDI02-MCRX090 + + + S10CB01-MCRX230 + + + S10CB01-MCRX430 + + + S10CB02-MCRX230 + + + S10CB02-MCRX430 + + + S10DI01-MCRX100 + + + S10DI01-MCRX120 + + + S10CB03-MCRX230 + + + S10CB03-MCRX430 + + + S10CB04-MCRX230 + + + S10CB04-MCRX430 + + + S10CB05-MCRX230 + + + S10CB05-MCRX430 + + + S10CB06-MCRX230 + + + S10CB06-MCRX430 + + + S10CB07-MCRX230 + + + S10CB07-MCRX430 + + + S10CB08-MCRX230 + + + S10CB08-MCRX430 + + + S10CB09-MCRX230 + + + S10BC01-MCRX020 + + + S10BC01-MCRX040 + + + S10BC01-MCRX060 + + + S10BC01-MCRX080 + + + S10BC01-MCRX100 + + + S10BC02-MCRX100 + + + S10BC02-MCRX200 + + + S10BC02-MCRX300 + + + S10BC02-MCRX400 + + + S10MA01-MCRX020 + + + S10MA01-MCRX050 + + + S10MA01-MCRX070 + + + S10MA01-MCRX100 + + + S10MA01-MCRX110 + + + S10MA01-MCRX130 + + + S20CB01-MCRX430 + + + S20CB02-MCRX430 + + + S20CB03-MCRX430 + + + S20SY01-MCRX020 + + + S20SY01-MCRX030 + + + S20SY01-MCRX050 + + + S20SY01-MCRX080 + + + S20SY02-MCRX060 + + + S20SY02-MCRX090 + + + S20SY02-MCRX130 + + + S20SY02-MCRX170 + + + S20SY03-MCRX020 + + + S20SY03-MCRX030 + + + S20SY03-MCRX050 + + + S20SY03-MCRX060 + + + S20SY03-MCRX100 + + + S30CB01-MCRX430 + + + S30CB02-MCRX430 + + + S30CB03-MCRX430 + + + S30CB04-MCRX430 + + + S30CB05-MCRX430 + + + S30CB06-MCRX430 + + + S30CB07-MCRX430 + + + S30CB08-MCRX430 + + + S30CB09-MCRX430 + + + S30CB10-MCRX430 + + + S30CB11-MCRX430 + + + S30CB12-MCRX430 + + + S30CB13-MCRX430 + + + S30CB14-MCRX430 + + + S30CB15-MCRX430 + + + SARCL01-MCRX020 + + + SARCL01-MCRX040 + + + SARCL01-MCRX070 + + + SARCL01-MCRX090 + + + SARCL01-MCRX130 + + + SARCL01-MCRX180 + + + SARCL02-MCRX100 + + + SARCL02-MCRX120 + + + SARCL02-MCRX200 + + + SARCL02-MCRX230 + + + SARCL02-MCRX240 + + + SARCL02-MCRX320 + + + SARCL02-MCRX340 + + + SARCL02-MCRX400 + + + SARCL02-MCRX450 + + + SARCL02-MCRX480 + + + SARCL02-MCRX500 + + + SARMA01-MCRX020 + + + SARMA01-MCRX050 + + + SARMA01-MCRX070 + + + SARMA01-MCRX110 + + + SARMA01-MCRX130 + + + SARMA02-MCRX050 + + + SARMA02-MCRX120 + + + SARUN01-MCRX080 + + + SARUN02-MCRX080 + + + SARUN03-MCRX010 + + + SARUN03-MCRX040 + + + SARUN03-MCRX080 + + + SARUN04-MCRX010 + + + SARUN04-MCRX040 + + + SARUN04-MCRX080 + + + SARUN05-MCRX010 + + + SARUN05-MCRX040 + + + SARUN05-MCRX080 + + + SARUN06-MCRX010 + + + SARUN06-MCRX040 + + + SARUN06-MCRX080 + + + SARUN07-MCRX010 + + + SARUN07-MCRX040 + + + SARUN07-MCRX080 + + + SARUN08-MCRX100 + + + SARUN08-MCRX200 + + + SARUN08-MCRX300 + + + SARUN08-MCRX400 + + + SARUN08-MCRX420 + + + SARUN09-MCRX010 + + + SARUN09-MCRX040 + + + SARUN09-MCRX080 + + + SARUN10-MCRX010 + + + SARUN10-MCRX040 + + + SARUN10-MCRX080 + + + SARUN11-MCRX010 + + + SARUN11-MCRX040 + + + SARUN11-MCRX080 + + + SARUN12-MCRX010 + + + SARUN12-MCRX040 + + + SARUN12-MCRX080 + + + SARUN13-MCRX010 + + + SARUN13-MCRX040 + + + SARUN13-MCRX080 + + + SARUN14-MCRX010 + + + SARUN14-MCRX040 + + + SARUN14-MCRX080 + + + SARUN15-MCRX010 + + + SARUN15-MCRX040 + + + SARUN15-MCRX080 + + + SARUN16-MCRX080 + + + SARUN17-MCRX080 + + + SARUN18-MCRX080 + + + SARUN19-MCRX080 + + + SARUN20-MCRX080 + + + SARBD01-MCRX020 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + ONOFF + ONOFF-GET + ENERGY + + + SINEG01-MCRY120 + + + SINEG01-MCRY160 + + + SINEG01-MCRY180 + + + SINEG01-MCRY200 + + + SINEG01-MCRY220 + + + SINSB01-MCRY010 + + + SINSB02-MCRY010 + + + SINLH01-MCRY020 + + + SINLH01-MCRY050 + + + SINLH02-MCRY010 + + + SINLH02-MCRY410 + + + SINLH03-MCRY040 + + + SINLH03-MCRY080 + + + SINSB03-MCRY130 + + + SINSB03-MCRY230 + + + SINSB04-MCRY130 + + + SINSB04-MCRY230 + + + SINSB05-MCRY130 + + + SINSB05-MCRY230 + + + SINBC01-MCRY020 + + + SINBC01-MCRY050 + + + SINBC01-MCRY070 + + + SINBC01-MCRY090 + + + SINBC01-MCRY110 + + + SINDI01-MCRY020 + + + SINDI01-MCRY070 + + + SINDI02-MCRY020 + + + SINDI02-MCRY030 + + + SINDI02-MCRY050 + + + SINDI02-MCRY060 + + + SINDI02-MCRY090 + + + S10CB01-MCRY230 + + + S10CB01-MCRY430 + + + S10CB02-MCRY230 + + + S10CB02-MCRY430 + + + S10DI01-MCRY120 + + + S10CB03-MCRY230 + + + S10CB03-MCRY430 + + + S10CB04-MCRY230 + + + S10CB04-MCRY430 + + + S10CB05-MCRY230 + + + S10CB05-MCRY430 + + + S10CB06-MCRY230 + + + S10CB06-MCRY430 + + + S10CB07-MCRY230 + + + S10CB07-MCRY430 + + + S10CB08-MCRY230 + + + S10CB08-MCRY430 + + + S10CB09-MCRY230 + + + S10BC01-MCRY020 + + + S10BC01-MCRY040 + + + S10BC01-MCRY060 + + + S10BC01-MCRY080 + + + S10BC01-MCRY100 + + + S10MA01-MCRY020 + + + S10MA01-MCRY050 + + + S10MA01-MCRY070 + + + S10MA01-MCRY110 + + + S10MA01-MCRY130 + + + S20CB01-MCRY430 + + + S20CB02-MCRY430 + + + S20CB03-MCRY430 + + + S20SY01-MCRY020 + + + S20SY01-MCRY030 + + + S20SY01-MCRY050 + + + S20SY01-MCRY080 + + + S20SY02-MCRY060 + + + S20SY02-MCRY090 + + + S20SY02-MCRY130 + + + S20SY02-MCRY170 + + + S20SY03-MCRY020 + + + S20SY03-MCRY030 + + + S20SY03-MCRY050 + + + S20SY03-MCRY060 + + + S20SY03-MCRY100 + + + S30CB01-MCRY430 + + + S30CB02-MCRY430 + + + S30CB03-MCRY430 + + + S30CB04-MCRY430 + + + S30CB05-MCRY430 + + + S30CB06-MCRY430 + + + S30CB07-MCRY430 + + + S30CB08-MCRY430 + + + S30CB09-MCRY430 + + + S30CB10-MCRY430 + + + S30CB11-MCRY430 + + + S30CB12-MCRY430 + + + S30CB13-MCRY430 + + + S30CB14-MCRY430 + + + S30CB15-MCRY430 + + + SARCL01-MCRY020 + + + SARCL01-MCRY040 + + + SARCL01-MCRY070 + + + SARCL01-MCRY090 + + + SARCL01-MCRY130 + + + SARCL01-MCRY180 + + + SARCL02-MCRY120 + + + SARCL02-MCRY230 + + + SARCL02-MCRY240 + + + SARCL02-MCRY320 + + + SARCL02-MCRY340 + + + SARCL02-MCRY450 + + + SARCL02-MCRY480 + + + SARMA01-MCRY020 + + + SARMA01-MCRY050 + + + SARMA01-MCRY070 + + + SARMA01-MCRY110 + + + SARMA01-MCRY130 + + + SARMA02-MCRY050 + + + SARMA02-MCRY120 + + + SARUN01-MCRY080 + + + SARUN02-MCRY080 + + + SARUN03-MCRY010 + + + SARUN03-MCRY040 + + + SARUN03-MCRY080 + + + SARUN04-MCRY010 + + + SARUN04-MCRY040 + + + SARUN04-MCRY080 + + + SARUN05-MCRY010 + + + SARUN05-MCRY040 + + + SARUN05-MCRY080 + + + SARUN06-MCRY010 + + + SARUN06-MCRY040 + + + SARUN06-MCRY080 + + + SARUN07-MCRY010 + + + SARUN07-MCRY040 + + + SARUN07-MCRY080 + + + SARUN08-MCRY420 + + + SARUN09-MCRY010 + + + SARUN09-MCRY040 + + + SARUN09-MCRY080 + + + SARUN10-MCRY010 + + + SARUN10-MCRY040 + + + SARUN10-MCRY080 + + + SARUN11-MCRY010 + + + SARUN11-MCRY040 + + + SARUN11-MCRY080 + + + SARUN12-MCRY010 + + + SARUN12-MCRY040 + + + SARUN12-MCRY080 + + + SARUN13-MCRY010 + + + SARUN13-MCRY040 + + + SARUN13-MCRY080 + + + SARUN14-MCRY010 + + + SARUN14-MCRY040 + + + SARUN14-MCRY080 + + + SARUN15-MCRY010 + + + SARUN15-MCRY040 + + + SARUN15-MCRY080 + + + SARUN16-MCRY080 + + + SARUN17-MCRY080 + + + SARUN18-MCRY080 + + + SARUN19-MCRY080 + + + SARUN20-MCRY080 + + + SARBD01-MCRY020 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + ONOFF + ONOFF-GET + ENERGY + + + SINEG01-MSOL010 + + + SINEG01-MSOL130 + + + SINSB01-MSOL110 + + + SINSB01-MSOL120 + + + SINSB01-MSOL130 + + + SINSB01-MSOL140 + + + SINSB02-MSOL110 + + + SINSB02-MSOL120 + + + SINSB02-MSOL130 + + + SINSB02-MSOL140 + + + + Collection of Nodes at SwissFEL + + + SINBC02-MSEX130 + + + SINBC02-MSEX330 + + + S10BC02-MSEX130 + + + S10BC02-MSEX330 + + + SARCL02-MSEX140 + + + SARCL02-MSEX440 + + + + Collection of Nodes at SwissFEL + + + SINEG01-MCOR120 + + + SINEG01-MCOR160 + + + SINEG01-MCOR180 + + + SINEG01-MCOR200 + + + SINEG01-MCOR220 + + + SINSB01-MCOR010 + + + SINSB02-MCOR010 + + + S20SY02-MCOR060 + + + S20SY02-MCOR090 + + + S20SY02-MCOR130 + + + S20SY02-MCOR170 + + + SARCL01-MCOR040 + + + SARCL01-MCOR070 + + + SARCL01-MCOR090 + + + SARCL01-MCOR130 + + + SARCL01-MCOR180 + + + SARCL02-MCOR120 + + + SARCL02-MCOR230 + + + SARCL02-MCOR240 + + + SARCL02-MCOR320 + + + SARCL02-MCOR340 + + + SARCL02-MCOR450 + + + SARCL02-MCOR480 + + + SARMA01-MCOR020 + + + SARMA01-MCOR050 + + + SARMA01-MCOR070 + + + SARMA01-MCOR110 + + + SARMA01-MCOR130 + + + SARUN03-MCOR010 + + + SARUN03-MCOR040 + + + SARUN04-MCOR010 + + + SARUN04-MCOR040 + + + SARUN05-MCOR010 + + + SARUN05-MCOR040 + + + SARUN06-MCOR010 + + + SARUN06-MCOR040 + + + SARUN07-MCOR010 + + + SARUN07-MCOR040 + + + SARUN09-MCOR010 + + + SARUN09-MCOR040 + + + SARUN10-MCOR010 + + + SARUN10-MCOR040 + + + SARUN11-MCOR010 + + + SARUN11-MCOR040 + + + SARUN12-MCOR010 + + + SARUN12-MCOR040 + + + SARUN13-MCOR010 + + + SARUN13-MCOR040 + + + SARUN14-MCOR010 + + + SARUN14-MCOR040 + + + SARUN15-MCOR010 + + + SARUN15-MCOR040 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + DEGAUSS + ONOFF + ONOFF-GET + ENERGY + + + SINEG01-MQUA140 + + + SINEG01-MQUA150 + + + SINEG01-MQUA212 + + + SINEG01-MQUA320 + + + SINLH01-MQUA020 + + + SINLH01-MQUA030 + + + SINLH01-MQUA040 + + + SINLH01-MQUA050 + + + SINLH01-MQUA070 + + + SINLH02-MQUA010 + + + SINLH02-MQUA410 + + + SINLH03-MQUA030 + + + SINLH03-MQUA040 + + + SINLH03-MQUA060 + + + SINLH03-MQUA080 + + + SINSB03-MQUA130 + + + SINSB03-MQUA230 + + + SINSB04-MQUA130 + + + SINSB04-MQUA230 + + + SINSB05-MQUA130 + + + SINSB05-MQUA230 + + + SINBC01-MQUA020 + + + SINBC01-MQUA050 + + + SINBC01-MQUA070 + + + SINBC01-MQUA090 + + + SINBC01-MQUA110 + + + SINBC02-MQUA110 + + + SINBC02-MQUA120 + + + SINBC02-MQUA340 + + + SINBC02-MQUA350 + + + SINDI01-MQUA020 + + + SINDI01-MQUA030 + + + SINDI01-MQUA070 + + + SINDI02-MQUA020 + + + SINDI02-MQUA030 + + + SINDI02-MQUA050 + + + SINDI02-MQUA060 + + + SINDI02-MQUA070 + + + SINDI02-MQUA090 + + + S10CB01-MQUA230 + + + S10CB01-MQUA430 + + + S10CB02-MQUA230 + + + S10CB02-MQUA430 + + + S10DI01-MQUA030 + + + S10DI01-MQUA120 + + + S10CB03-MQUA230 + + + S10CB03-MQUA430 + + + S10CB04-MQUA230 + + + S10CB04-MQUA430 + + + S10CB05-MQUA230 + + + S10CB05-MQUA430 + + + S10CB06-MQUA230 + + + S10CB06-MQUA430 + + + S10CB07-MQUA230 + + + S10CB07-MQUA430 + + + S10CB08-MQUA230 + + + S10CB08-MQUA430 + + + S10CB09-MQUA230 + + + S10BC01-MQUA020 + + + S10BC01-MQUA040 + + + S10BC01-MQUA060 + + + S10BC01-MQUA080 + + + S10BC01-MQUA100 + + + S10BC02-MQUA110 + + + S10BC02-MQUA120 + + + S10BC02-MQUA340 + + + S10BC02-MQUA350 + + + S10MA01-MQUA020 + + + S10MA01-MQUA050 + + + S10MA01-MQUA070 + + + S10MA01-MQUA110 + + + S10MA01-MQUA130 + + + S20CB01-MQUA430 + + + S20CB02-MQUA430 + + + S20CB03-MQUA430 + + + S20SY01-MQUA020 + + + S20SY01-MQUA030 + + + S20SY01-MQUA050 + + + S20SY01-MQUA080 + + + S20SY02-MQUA070 + + + S20SY02-MQUA100 + + + S20SY02-MQUA140 + + + S20SY02-MQUA180 + + + S20SY03-MQUA020 + + + S20SY03-MQUA030 + + + S20SY03-MQUA050 + + + S20SY03-MQUA060 + + + S20SY03-MQUA100 + + + S30CB01-MQUA430 + + + S30CB02-MQUA430 + + + S30CB03-MQUA430 + + + S30CB04-MQUA430 + + + S30CB05-MQUA430 + + + S30CB06-MQUA430 + + + S30CB07-MQUA430 + + + S30CB08-MQUA430 + + + S30CB09-MQUA430 + + + S30CB10-MQUA430 + + + S30CB11-MQUA430 + + + S30CB12-MQUA430 + + + S30CB13-MQUA430 + + + S30CB14-MQUA430 + + + S30CB15-MQUA430 + + + SARCL01-MQUA020 + + + SARCL01-MQUA050 + + + SARCL01-MQUA080 + + + SARCL01-MQUA100 + + + SARCL01-MQUA140 + + + SARCL01-MQUA190 + + + SARCL02-MQUA130 + + + SARCL02-MQUA150 + + + SARCL02-MQUA160 + + + SARCL02-MQUA210 + + + SARCL02-MQUA250 + + + SARCL02-MQUA300 + + + SARCL02-MQUA310 + + + SARCL02-MQUA350 + + + SARCL02-MQUA420 + + + SARCL02-MQUA430 + + + SARCL02-MQUA460 + + + SARMA01-MQUA010 + + + SARMA01-MQUA060 + + + SARMA01-MQUA080 + + + SARMA01-MQUA120 + + + SARMA01-MQUA140 + + + SARMA02-MQUA050 + + + SARMA02-MQUA120 + + + SARUN01-MQUA080 + + + SARUN02-MQUA080 + + + SARUN03-MQUA020 + + + SARUN03-MQUA050 + + + SARUN03-MQUA080 + + + SARUN04-MQUA020 + + + SARUN04-MQUA050 + + + SARUN04-MQUA080 + + + SARUN05-MQUA020 + + + SARUN05-MQUA050 + + + SARUN05-MQUA080 + + + SARUN06-MQUA020 + + + SARUN06-MQUA050 + + + SARUN06-MQUA080 + + + SARUN07-MQUA020 + + + SARUN07-MQUA050 + + + SARUN07-MQUA080 + + + SARUN08-MQUA420 + + + SARUN09-MQUA020 + + + SARUN09-MQUA050 + + + SARUN09-MQUA080 + + + SARUN10-MQUA020 + + + SARUN10-MQUA050 + + + SARUN10-MQUA080 + + + SARUN11-MQUA020 + + + SARUN11-MQUA050 + + + SARUN11-MQUA080 + + + SARUN12-MQUA020 + + + SARUN12-MQUA050 + + + SARUN12-MQUA080 + + + SARUN13-MQUA020 + + + SARUN13-MQUA050 + + + SARUN13-MQUA080 + + + SARUN14-MQUA020 + + + SARUN14-MQUA050 + + + SARUN14-MQUA080 + + + SARUN15-MQUA020 + + + SARUN15-MQUA050 + + + SARUN15-MQUA080 + + + SARUN16-MQUA080 + + + SARUN17-MQUA080 + + + SARUN18-MQUA080 + + + SARUN19-MQUA080 + + + SARUN20-MQUA080 + + + S10BD01-MQUA010 + + + SARBD01-MQUA020 + + + SARBD02-MQUA030 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + DEGAUSS + ONOFF + ONOFF-GET + ENERGY + + + SINEG01-MBND300 + + + SINLH02-MBND100 + + + SINLH02-MBND200 + + + SINLH02-MBND300 + + + SINLH02-MBND400 + + + SINBC02-MBND100 + + + SINBC02-MBND200 + + + SINBC02-MBND300 + + + SINBC02-MBND400 + + + S10DI01-MBND100 + + + S10BC02-MBND100 + + + S10BC02-MBND200 + + + S10BC02-MBND300 + + + S10BC02-MBND400 + + + S10MA01-MBND100 + + + S20SY02-MBND200 + + + SARCL02-MBND100 + + + SARCL02-MBND200 + + + SARCL02-MBND400 + + + SARCL02-MBND500 + + + SARMA02-MBND100 + + + SARUN08-MBND100 + + + SARUN08-MBND200 + + + SARUN08-MBND300 + + + SARUN08-MBND400 + + + SARBD01-MBND100 + + + SARBD01-MBND200 + + + + Collection of Nodes at SwissFEL + + S-POS + X-POS + Y-POS + Z-POS + ENERGY + + + SINEG01-RGUN100 + + + + Collection of Nodes at SwissFEL + + + SINEG01-RSYS + + + + Collection of Nodes at SwissFEL + + S-POS + X-POS + Y-POS + Z-POS + ENERGY + + + SINSB01-RACC100 + + + SINSB02-RACC100 + + + SINSB03-RACC100 + + + SINSB03-RACC200 + + + SINSB04-RACC100 + + + SINSB04-RACC200 + + + SINXB01-RACC100 + + + SINXB01-RACC200 + + + S10CB01-RACC100 + + + S10CB01-RACC200 + + + S10CB01-RACC300 + + + S10CB01-RACC400 + + + S10CB02-RACC100 + + + S10CB02-RACC200 + + + S10CB02-RACC300 + + + S10CB02-RACC400 + + + S10CB03-RACC100 + + + S10CB03-RACC200 + + + S10CB03-RACC300 + + + S10CB03-RACC400 + + + S10CB04-RACC100 + + + S10CB04-RACC200 + + + S10CB04-RACC300 + + + S10CB04-RACC400 + + + S10CB05-RACC100 + + + S10CB05-RACC200 + + + S10CB05-RACC300 + + + S10CB05-RACC400 + + + S10CB06-RACC100 + + + S10CB06-RACC200 + + + S10CB06-RACC300 + + + S10CB06-RACC400 + + + S10CB07-RACC100 + + + S10CB07-RACC200 + + + S10CB07-RACC300 + + + S10CB07-RACC400 + + + S10CB08-RACC100 + + + S10CB08-RACC200 + + + S10CB08-RACC300 + + + S10CB08-RACC400 + + + S10CB09-RACC100 + + + S10CB09-RACC200 + + + S10CB09-RACC300 + + + S10CB09-RACC400 + + + S20CB01-RACC100 + + + S20CB01-RACC200 + + + S20CB01-RACC300 + + + S20CB01-RACC400 + + + S20CB02-RACC100 + + + S20CB02-RACC200 + + + S20CB02-RACC300 + + + S20CB02-RACC400 + + + S20CB03-RACC100 + + + S20CB03-RACC200 + + + S20CB03-RACC300 + + + S20CB03-RACC400 + + + S20CB04-RACC100 + + + S20CB04-RACC200 + + + S20CB04-RACC300 + + + S20CB04-RACC400 + + + S30CB01-RACC100 + + + S30CB01-RACC200 + + + S30CB01-RACC300 + + + S30CB01-RACC400 + + + S30CB02-RACC100 + + + S30CB02-RACC200 + + + S30CB02-RACC300 + + + S30CB02-RACC400 + + + S30CB03-RACC100 + + + S30CB03-RACC200 + + + S30CB03-RACC300 + + + S30CB03-RACC400 + + + S30CB04-RACC100 + + + S30CB04-RACC200 + + + S30CB04-RACC300 + + + S30CB04-RACC400 + + + S30CB05-RACC100 + + + S30CB05-RACC200 + + + S30CB05-RACC300 + + + S30CB05-RACC400 + + + S30CB06-RACC100 + + + S30CB06-RACC200 + + + S30CB06-RACC300 + + + S30CB06-RACC400 + + + S30CB07-RACC100 + + + S30CB07-RACC200 + + + S30CB07-RACC300 + + + S30CB07-RACC400 + + + S30CB08-RACC100 + + + S30CB08-RACC200 + + + S30CB08-RACC300 + + + S30CB08-RACC400 + + + S30CB09-RACC100 + + + S30CB09-RACC200 + + + S30CB09-RACC300 + + + S30CB09-RACC400 + + + S30CB10-RACC100 + + + S30CB10-RACC200 + + + S30CB10-RACC300 + + + S30CB10-RACC400 + + + S30CB11-RACC100 + + + S30CB11-RACC200 + + + S30CB11-RACC300 + + + S30CB11-RACC400 + + + S30CB12-RACC100 + + + S30CB12-RACC200 + + + S30CB12-RACC300 + + + S30CB12-RACC400 + + + S30CB13-RACC100 + + + S30CB13-RACC200 + + + S30CB13-RACC300 + + + S30CB13-RACC400 + + + + Collection of Nodes at SwissFEL + + + SINEG01-RKLY100 + + + SINSB01-RKLY100 + + + SINSB02-RKLY100 + + + SINSB03-RKLY100 + + + SINSB04-RKLY100 + + + SINXB01-RKLY100 + + + SINDI01-RKLY100 + + + S10CB01-RKLY100 + + + S10CB02-RKLY100 + + + S10CB03-RKLY100 + + + S10CB04-RKLY100 + + + S10CB05-RKLY100 + + + S10CB06-RKLY100 + + + S10CB07-RKLY100 + + + S10CB08-RKLY100 + + + S10CB09-RKLY100 + + + S20CB01-RKLY100 + + + S20CB02-RKLY100 + + + S20CB03-RKLY100 + + + S20CB04-RKLY100 + + + S30CB01-RKLY100 + + + S30CB02-RKLY100 + + + S30CB03-RKLY100 + + + S30CB04-RKLY100 + + + S30CB05-RKLY100 + + + S30CB06-RKLY100 + + + S30CB07-RKLY100 + + + S30CB08-RKLY100 + + + S30CB09-RKLY100 + + + S30CB10-RKLY100 + + + S30CB11-RKLY100 + + + S30CB12-RKLY100 + + + S30CB13-RKLY100 + + + + Collection of Nodes at SwissFEL + + + SINDI01-RTDS100 + + + S30CB14-RTDS100 + + + S30CB14-RTDS200 + + + + Collection of Nodes at SwissFEL + + + SINEG01-RSYS + + + + Collection of Nodes at SwissFEL + + GAP-READ + GAP_SP + ID-ONOFF + MOVING + PS-MODE + + + SINLH02-UIND230 + + + SARUN03-UIND030 + + + SARUN04-UIND030 + + + SARUN05-UIND030 + + + SARUN06-UIND030 + + + SARUN07-UIND030 + + + SARUN09-UIND030 + + + SARUN10-UIND030 + + + SARUN11-UIND030 + + + SARUN12-UIND030 + + + SARUN13-UIND030 + + + SARUN14-UIND030 + + + SARUN15-UIND030 + + + diff --git a/examples/cafeTest/request.json b/examples/cafeTest/request.json new file mode 100644 index 0000000..73c6ea1 --- /dev/null +++ b/examples/cafeTest/request.json @@ -0,0 +1,26 @@ +{ + "channels": + [ + { + "name":"S10BC01-DBPM010:X1", + "backend":"sf-databuffer", + "modulo":1, + "offset":0 + }, + { + "name":"S10BC01-DBPM010:X1-VALID", + "backend":"sf-databuffer", + "modulo":1, + "offset":0 + } + ], + "mapping":{ + "incomplete":"fill-null" + }, + "channelValidation":{ + "inconsistency":"keep-as-is" + }, + "sendBehaviour":{ + "strategy":"complete-all" + } +} diff --git a/examples/cafeTest/sf_ar_cNodes.xml b/examples/cafeTest/sf_ar_cNodes.xml new file mode 100644 index 0000000..e49692d --- /dev/null +++ b/examples/cafeTest/sf_ar_cNodes.xml @@ -0,0 +1,2804 @@ + + + Collection of Nodes at SwissFEL + + X + Y + X0 + Y0 + REF-X + REF-Y + REFOFF-X + REFOFF-Y + REFORB-X + REFORB-Y + SET-GAIN + I + FB-STAT + FB-ENABLE + STAT + ENABLE + + + SINEG01-DBPM340 + + + SINSB01-DBPM150 + + + SINSB02-DBPM150 + + + SINLH01-DBPM060 + + + SINLH02-DBPM210 + + + SINLH02-DBPM240 + + + SINLH03-DBPM010 + + + SINLH03-DBPM050 + + + SINLH03-DBPM090 + + + SINSB03-DBPM120 + + + SINSB03-DBPM220 + + + SINSB04-DBPM120 + + + SINSB04-DBPM220 + + + SINSB05-DBPM120 + + + SINSB05-DBPM220 + + + SINXB01-DBPM120 + + + SINBC01-DBPM010 + + + SINBC01-DBPM030 + + + SINBC01-DBPM080 + + + SINBC01-DBPM100 + + + SINBC02-DBPM140 + + + SINBC02-DBPM320 + + + SINDI01-DBPM010 + + + SINDI01-DBPM060 + + + SINDI02-DBPM010 + + + SINDI02-DBPM040 + + + SINDI02-DBPM080 + + + S10CB01-DBPM220 + + + S10CB01-DBPM420 + + + S10CB02-DBPM220 + + + S10CB02-DBPM420 + + + S10DI01-DBPM110 + + + S10CB03-DBPM220 + + + S10CB03-DBPM420 + + + S10CB04-DBPM220 + + + S10CB04-DBPM420 + + + S10CB05-DBPM220 + + + S10CB05-DBPM420 + + + S10CB06-DBPM220 + + + S10CB06-DBPM420 + + + S10CB07-DBPM220 + + + S10CB07-DBPM420 + + + S10CB08-DBPM220 + + + S10CB08-DBPM420 + + + S10CB09-DBPM220 + + + S10BC01-DBPM010 + + + S10BC01-DBPM050 + + + S10BC01-DBPM090 + + + S10BC02-DBPM140 + + + S10BC02-DBPM320 + + + S10MA01-DBPM010 + + + S10MA01-DBPM060 + + + S10MA01-DBPM120 + + + S20CB01-DBPM420 + + + S20CB02-DBPM420 + + + S20CB03-DBPM420 + + + S20SY01-DBPM010 + + + S20SY01-DBPM040 + + + S20SY01-DBPM060 + + + S20SY02-DBPM080 + + + S20SY02-DBPM120 + + + S20SY02-DBPM150 + + + S20SY03-DBPM010 + + + S20SY03-DBPM040 + + + S20SY03-DBPM080 + + + S30CB01-DBPM420 + + + S30CB02-DBPM420 + + + S30CB03-DBPM420 + + + S30CB04-DBPM420 + + + S30CB05-DBPM420 + + + S30CB06-DBPM420 + + + S30CB07-DBPM420 + + + S30CB08-DBPM420 + + + S30CB09-DBPM420 + + + S30CB10-DBPM420 + + + S30CB11-DBPM420 + + + S30CB12-DBPM420 + + + S30CB13-DBPM420 + + + S30CB14-DBPM420 + + + S30CB15-DBPM420 + + + SARCL01-DBPM010 + + + SARCL01-DBPM060 + + + SARCL01-DBPM120 + + + SARCL01-DBPM150 + + + SARCL02-DBPM110 + + + SARCL02-DBPM220 + + + SARCL02-DBPM260 + + + SARCL02-DBPM330 + + + SARCL02-DBPM470 + + + SARMA01-DBPM040 + + + SARMA01-DBPM100 + + + SARMA02-DBPM010 + + + SARMA02-DBPM020 + + + SARMA02-DBPM040 + + + SARMA02-DBPM110 + + + SARUN01-DBPM070 + + + SARUN02-DBPM070 + + + SARUN03-DBPM070 + + + SARUN04-DBPM070 + + + SARUN05-DBPM070 + + + SARUN06-DBPM070 + + + SARUN07-DBPM070 + + + SARUN08-DBPM070 + + + SARUN09-DBPM070 + + + SARUN10-DBPM070 + + + SARUN11-DBPM070 + + + SARUN12-DBPM070 + + + SARUN13-DBPM070 + + + SARUN14-DBPM070 + + + SARUN15-DBPM070 + + + SARUN16-DBPM070 + + + SARUN17-DBPM070 + + + SARUN18-DBPM070 + + + SARUN19-DBPM070 + + + SARUN20-DBPM070 + + + S10BD01-DBPM020 + + + SARBD01-DBPM040 + + + SARBD02-DBPM010 + + + SARBD02-DBPM040 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + + + SINEG01-MCRX120 + + + SINEG01-MCRX160 + + + SINEG01-MCRX180 + + + SINEG01-MCRX200 + + + SINEG01-MCRX220 + + + SINSB01-MCRX010 + + + SINSB02-MCRX010 + + + SINLH01-MCRX020 + + + SINLH01-MCRX050 + + + SINLH02-MCRX010 + + + SINLH02-MCRX100 + + + SINLH02-MCRX200 + + + SINLH02-MCRX300 + + + SINLH02-MCRX400 + + + SINLH02-MCRX410 + + + SINLH03-MCRX040 + + + SINLH03-MCRX080 + + + SINSB03-MCRX130 + + + SINSB03-MCRX230 + + + SINSB04-MCRX130 + + + SINSB04-MCRX230 + + + SINSB05-MCRX130 + + + SINSB05-MCRX230 + + + SINBC01-MCRX020 + + + SINBC01-MCRX050 + + + SINBC01-MCRX070 + + + SINBC01-MCRX090 + + + SINBC01-MCRX110 + + + SINBC02-MCRX100 + + + SINBC02-MCRX200 + + + SINBC02-MCRX300 + + + SINBC02-MCRX400 + + + SINDI01-MCRX020 + + + SINDI01-MCRX070 + + + SINDI02-MCRX020 + + + SINDI02-MCRX030 + + + SINDI02-MCRX050 + + + SINDI02-MCRX060 + + + SINDI02-MCRX090 + + + S10CB01-MCRX230 + + + S10CB01-MCRX430 + + + S10CB02-MCRX230 + + + S10CB02-MCRX430 + + + S10DI01-MCRX100 + + + S10DI01-MCRX120 + + + S10CB03-MCRX230 + + + S10CB03-MCRX430 + + + S10CB04-MCRX230 + + + S10CB04-MCRX430 + + + S10CB05-MCRX230 + + + S10CB05-MCRX430 + + + S10CB06-MCRX230 + + + S10CB06-MCRX430 + + + S10CB07-MCRX230 + + + S10CB07-MCRX430 + + + S10CB08-MCRX230 + + + S10CB08-MCRX430 + + + S10CB09-MCRX230 + + + S10BC01-MCRX020 + + + S10BC01-MCRX040 + + + S10BC01-MCRX060 + + + S10BC01-MCRX080 + + + S10BC01-MCRX100 + + + S10BC02-MCRX100 + + + S10BC02-MCRX200 + + + S10BC02-MCRX300 + + + S10BC02-MCRX400 + + + S10MA01-MCRX020 + + + S10MA01-MCRX050 + + + S10MA01-MCRX070 + + + S10MA01-MCRX100 + + + S10MA01-MCRX110 + + + S10MA01-MCRX130 + + + S20CB01-MCRX430 + + + S20CB02-MCRX430 + + + S20CB03-MCRX430 + + + S20SY01-MCRX020 + + + S20SY01-MCRX030 + + + S20SY01-MCRX050 + + + S20SY01-MCRX080 + + + S20SY02-MCRX060 + + + S20SY02-MCRX090 + + + S20SY02-MCRX130 + + + S20SY02-MCRX170 + + + S20SY03-MCRX020 + + + S20SY03-MCRX030 + + + S20SY03-MCRX050 + + + S20SY03-MCRX060 + + + S20SY03-MCRX100 + + + S30CB01-MCRX430 + + + S30CB02-MCRX430 + + + S30CB03-MCRX430 + + + S30CB04-MCRX430 + + + S30CB05-MCRX430 + + + S30CB06-MCRX430 + + + S30CB07-MCRX430 + + + S30CB08-MCRX430 + + + S30CB09-MCRX430 + + + S30CB10-MCRX430 + + + S30CB11-MCRX430 + + + S30CB12-MCRX430 + + + S30CB13-MCRX430 + + + S30CB14-MCRX430 + + + S30CB15-MCRX430 + + + SARCL01-MCRX020 + + + SARCL01-MCRX040 + + + SARCL01-MCRX070 + + + SARCL01-MCRX090 + + + SARCL01-MCRX130 + + + SARCL01-MCRX180 + + + SARCL02-MCRX100 + + + SARCL02-MCRX120 + + + SARCL02-MCRX200 + + + SARCL02-MCRX230 + + + SARCL02-MCRX240 + + + SARCL02-MCRX320 + + + SARCL02-MCRX340 + + + SARCL02-MCRX400 + + + SARCL02-MCRX450 + + + SARCL02-MCRX480 + + + SARCL02-MCRX500 + + + SARMA01-MCRX020 + + + SARMA01-MCRX050 + + + SARMA01-MCRX070 + + + SARMA01-MCRX110 + + + SARMA01-MCRX130 + + + SARMA02-MCRX050 + + + SARMA02-MCRX120 + + + SARUN01-MCRX080 + + + SARUN02-MCRX080 + + + SARUN03-MCRX010 + + + SARUN03-MCRX040 + + + SARUN03-MCRX080 + + + SARUN04-MCRX010 + + + SARUN04-MCRX040 + + + SARUN04-MCRX080 + + + SARUN05-MCRX010 + + + SARUN05-MCRX040 + + + SARUN05-MCRX080 + + + SARUN06-MCRX010 + + + SARUN06-MCRX040 + + + SARUN06-MCRX080 + + + SARUN07-MCRX010 + + + SARUN07-MCRX040 + + + SARUN07-MCRX080 + + + SARUN08-MCRX010 + + + SARUN08-MCRX040 + + + SARUN08-MCRX080 + + + SARUN09-MCRX010 + + + SARUN09-MCRX040 + + + SARUN09-MCRX080 + + + SARUN10-MCRX010 + + + SARUN10-MCRX040 + + + SARUN10-MCRX080 + + + SARUN11-MCRX010 + + + SARUN11-MCRX040 + + + SARUN11-MCRX080 + + + SARUN12-MCRX010 + + + SARUN12-MCRX040 + + + SARUN12-MCRX080 + + + SARUN13-MCRX010 + + + SARUN13-MCRX040 + + + SARUN13-MCRX080 + + + SARUN14-MCRX010 + + + SARUN14-MCRX040 + + + SARUN14-MCRX080 + + + SARUN15-MCRX010 + + + SARUN15-MCRX040 + + + SARUN15-MCRX080 + + + SARUN16-MCRX080 + + + SARUN17-MCRX080 + + + SARUN18-MCRX080 + + + SARUN19-MCRX080 + + + SARUN20-MCRX080 + + + SARBD01-MCRX020 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + + + SINEG01-MCRY120 + + + SINEG01-MCRY160 + + + SINEG01-MCRY180 + + + SINEG01-MCRY200 + + + SINEG01-MCRY220 + + + SINSB01-MCRY010 + + + SINSB02-MCRY010 + + + SINLH01-MCRY020 + + + SINLH01-MCRY050 + + + SINLH02-MCRY010 + + + SINLH02-MCRY410 + + + SINLH03-MCRY040 + + + SINLH03-MCRY080 + + + SINSB03-MCRY130 + + + SINSB03-MCRY230 + + + SINSB04-MCRY130 + + + SINSB04-MCRY230 + + + SINSB05-MCRY130 + + + SINSB05-MCRY230 + + + SINBC01-MCRY020 + + + SINBC01-MCRY050 + + + SINBC01-MCRY070 + + + SINBC01-MCRY090 + + + SINBC01-MCRY110 + + + SINDI01-MCRY020 + + + SINDI01-MCRY070 + + + SINDI02-MCRY020 + + + SINDI02-MCRY030 + + + SINDI02-MCRY050 + + + SINDI02-MCRY060 + + + SINDI02-MCRY090 + + + S10CB01-MCRY230 + + + S10CB01-MCRY430 + + + S10CB02-MCRY230 + + + S10CB02-MCRY430 + + + S10DI01-MCRY120 + + + S10CB03-MCRY230 + + + S10CB03-MCRY430 + + + S10CB04-MCRY230 + + + S10CB04-MCRY430 + + + S10CB05-MCRY230 + + + S10CB05-MCRY430 + + + S10CB06-MCRY230 + + + S10CB06-MCRY430 + + + S10CB07-MCRY230 + + + S10CB07-MCRY430 + + + S10CB08-MCRY230 + + + S10CB08-MCRY430 + + + S10CB09-MCRY230 + + + S10BC01-MCRY020 + + + S10BC01-MCRY040 + + + S10BC01-MCRY060 + + + S10BC01-MCRY080 + + + S10BC01-MCRY100 + + + S10MA01-MCRY020 + + + S10MA01-MCRY050 + + + S10MA01-MCRY070 + + + S10MA01-MCRY110 + + + S10MA01-MCRY130 + + + S20CB01-MCRY430 + + + S20CB02-MCRY430 + + + S20CB03-MCRY430 + + + S20SY01-MCRY020 + + + S20SY01-MCRY030 + + + S20SY01-MCRY050 + + + S20SY01-MCRY080 + + + S20SY02-MCRY060 + + + S20SY02-MCRY090 + + + S20SY02-MCRY130 + + + S20SY02-MCRY170 + + + S20SY03-MCRY020 + + + S20SY03-MCRY030 + + + S20SY03-MCRY050 + + + S20SY03-MCRY060 + + + S20SY03-MCRY100 + + + S30CB01-MCRY430 + + + S30CB02-MCRY430 + + + S30CB03-MCRY430 + + + S30CB04-MCRY430 + + + S30CB05-MCRY430 + + + S30CB06-MCRY430 + + + S30CB07-MCRY430 + + + S30CB08-MCRY430 + + + S30CB09-MCRY430 + + + S30CB10-MCRY430 + + + S30CB11-MCRY430 + + + S30CB12-MCRY430 + + + S30CB13-MCRY430 + + + S30CB14-MCRY430 + + + S30CB15-MCRY430 + + + SARCL01-MCRY020 + + + SARCL01-MCRY040 + + + SARCL01-MCRY070 + + + SARCL01-MCRY090 + + + SARCL01-MCRY130 + + + SARCL01-MCRY180 + + + SARCL02-MCRY120 + + + SARCL02-MCRY230 + + + SARCL02-MCRY240 + + + SARCL02-MCRY320 + + + SARCL02-MCRY340 + + + SARCL02-MCRY450 + + + SARCL02-MCRY480 + + + SARMA01-MCRY020 + + + SARMA01-MCRY050 + + + SARMA01-MCRY070 + + + SARMA01-MCRY110 + + + SARMA01-MCRY130 + + + SARMA02-MCRY050 + + + SARMA02-MCRY120 + + + SARUN01-MCRY080 + + + SARUN02-MCRY080 + + + SARUN03-MCRY010 + + + SARUN03-MCRY040 + + + SARUN03-MCRY080 + + + SARUN04-MCRY010 + + + SARUN04-MCRY040 + + + SARUN04-MCRY080 + + + SARUN05-MCRY010 + + + SARUN05-MCRY040 + + + SARUN05-MCRY080 + + + SARUN06-MCRY010 + + + SARUN06-MCRY040 + + + SARUN06-MCRY080 + + + SARUN07-MCRY010 + + + SARUN07-MCRY040 + + + SARUN07-MCRY080 + + + SARUN08-MCRY010 + + + SARUN08-MCRY040 + + + SARUN08-MCRY080 + + + SARUN09-MCRY010 + + + SARUN09-MCRY040 + + + SARUN09-MCRY080 + + + SARUN10-MCRY010 + + + SARUN10-MCRY040 + + + SARUN10-MCRY080 + + + SARUN11-MCRY010 + + + SARUN11-MCRY040 + + + SARUN11-MCRY080 + + + SARUN12-MCRY010 + + + SARUN12-MCRY040 + + + SARUN12-MCRY080 + + + SARUN13-MCRY010 + + + SARUN13-MCRY040 + + + SARUN13-MCRY080 + + + SARUN14-MCRY010 + + + SARUN14-MCRY040 + + + SARUN14-MCRY080 + + + SARUN15-MCRY010 + + + SARUN15-MCRY040 + + + SARUN15-MCRY080 + + + SARUN16-MCRY080 + + + SARUN17-MCRY080 + + + SARUN18-MCRY080 + + + SARUN19-MCRY080 + + + SARUN20-MCRY080 + + + SARBD01-MCRY020 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + + + SINEG01-MSOL010 + + + SINEG01-MSOL130 + + + SINSB01-MSOL110 + + + SINSB01-MSOL120 + + + SINSB01-MSOL130 + + + SINSB01-MSOL140 + + + SINSB02-MSOL110 + + + SINSB02-MSOL120 + + + SINSB02-MSOL130 + + + SINSB02-MSOL140 + + + + Collection of Nodes at SwissFEL + + + SINEG01-MCOR120 + + + SINEG01-MCOR160 + + + SINEG01-MCOR180 + + + SINEG01-MCOR200 + + + SINEG01-MCOR220 + + + SINSB01-MCOR010 + + + SINSB02-MCOR010 + + + S20SY02-MCOR060 + + + S20SY02-MCOR090 + + + S20SY02-MCOR130 + + + S20SY02-MCOR170 + + + SARCL01-MCOR040 + + + SARCL01-MCOR070 + + + SARCL01-MCOR090 + + + SARCL01-MCOR130 + + + SARCL01-MCOR180 + + + SARCL02-MCOR120 + + + SARCL02-MCOR230 + + + SARCL02-MCOR240 + + + SARCL02-MCOR320 + + + SARCL02-MCOR340 + + + SARCL02-MCOR450 + + + SARCL02-MCOR480 + + + SARMA01-MCOR020 + + + SARMA01-MCOR050 + + + SARMA01-MCOR070 + + + SARMA01-MCOR110 + + + SARMA01-MCOR130 + + + SARUN03-MCOR010 + + + SARUN03-MCOR040 + + + SARUN04-MCOR010 + + + SARUN04-MCOR040 + + + SARUN05-MCOR010 + + + SARUN05-MCOR040 + + + SARUN06-MCOR010 + + + SARUN06-MCOR040 + + + SARUN07-MCOR010 + + + SARUN07-MCOR040 + + + SARUN08-MCOR010 + + + SARUN08-MCOR040 + + + SARUN09-MCOR010 + + + SARUN09-MCOR040 + + + SARUN10-MCOR010 + + + SARUN10-MCOR040 + + + SARUN11-MCOR010 + + + SARUN11-MCOR040 + + + SARUN12-MCOR010 + + + SARUN12-MCOR040 + + + SARUN13-MCOR010 + + + SARUN13-MCOR040 + + + SARUN14-MCOR010 + + + SARUN14-MCOR040 + + + SARUN15-MCOR010 + + + SARUN15-MCOR040 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + DEGAUSS + + + SINEG01-MQUA140 + + + SINEG01-MQUA150 + + + SINEG01-MQUA310 + + + SINEG01-MQUA320 + + + SINLH01-MQUA020 + + + SINLH01-MQUA030 + + + SINLH01-MQUA040 + + + SINLH01-MQUA050 + + + SINLH01-MQUA070 + + + SINLH02-MQUA010 + + + SINLH02-MQUA410 + + + SINLH03-MQUA030 + + + SINLH03-MQUA040 + + + SINLH03-MQUA060 + + + SINLH03-MQUA080 + + + SINSB03-MQUA130 + + + SINSB03-MQUA230 + + + SINSB04-MQUA130 + + + SINSB04-MQUA230 + + + SINSB05-MQUA130 + + + SINSB05-MQUA230 + + + SINBC01-MQUA020 + + + SINBC01-MQUA050 + + + SINBC01-MQUA070 + + + SINBC01-MQUA090 + + + SINBC01-MQUA110 + + + SINBC02-MQUA110 + + + SINBC02-MQUA120 + + + SINBC02-MQUA340 + + + SINBC02-MQUA350 + + + SINDI01-MQUA020 + + + SINDI01-MQUA030 + + + SINDI01-MQUA070 + + + SINDI02-MQUA020 + + + SINDI02-MQUA030 + + + SINDI02-MQUA050 + + + SINDI02-MQUA060 + + + SINDI02-MQUA070 + + + SINDI02-MQUA090 + + + S10CB01-MQUA230 + + + S10CB01-MQUA430 + + + S10CB02-MQUA230 + + + S10CB02-MQUA430 + + + S10DI01-MQUA030 + + + S10DI01-MQUA120 + + + S10CB03-MQUA230 + + + S10CB03-MQUA430 + + + S10CB04-MQUA230 + + + S10CB04-MQUA430 + + + S10CB05-MQUA230 + + + S10CB05-MQUA430 + + + S10CB06-MQUA230 + + + S10CB06-MQUA430 + + + S10CB07-MQUA230 + + + S10CB07-MQUA430 + + + S10CB08-MQUA230 + + + S10CB08-MQUA430 + + + S10CB09-MQUA230 + + + S10BC01-MQUA020 + + + S10BC01-MQUA040 + + + S10BC01-MQUA060 + + + S10BC01-MQUA080 + + + S10BC01-MQUA100 + + + S10BC02-MQUA110 + + + S10BC02-MQUA120 + + + S10BC02-MQUA340 + + + S10BC02-MQUA350 + + + S10MA01-MQUA020 + + + S10MA01-MQUA050 + + + S10MA01-MQUA070 + + + S10MA01-MQUA110 + + + S10MA01-MQUA130 + + + S20CB01-MQUA430 + + + S20CB02-MQUA430 + + + S20CB03-MQUA430 + + + S20SY01-MQUA020 + + + S20SY01-MQUA030 + + + S20SY01-MQUA050 + + + S20SY01-MQUA080 + + + S20SY02-MQUA070 + + + S20SY02-MQUA100 + + + S20SY02-MQUA140 + + + S20SY02-MQUA180 + + + S20SY03-MQUA020 + + + S20SY03-MQUA030 + + + S20SY03-MQUA050 + + + S20SY03-MQUA060 + + + S20SY03-MQUA100 + + + S30CB01-MQUA430 + + + S30CB02-MQUA430 + + + S30CB03-MQUA430 + + + S30CB04-MQUA430 + + + S30CB05-MQUA430 + + + S30CB06-MQUA430 + + + S30CB07-MQUA430 + + + S30CB08-MQUA430 + + + S30CB09-MQUA430 + + + S30CB10-MQUA430 + + + S30CB11-MQUA430 + + + S30CB12-MQUA430 + + + S30CB13-MQUA430 + + + S30CB14-MQUA430 + + + S30CB15-MQUA430 + + + SARCL01-MQUA020 + + + SARCL01-MQUA050 + + + SARCL01-MQUA080 + + + SARCL01-MQUA100 + + + SARCL01-MQUA140 + + + SARCL01-MQUA190 + + + SARCL02-MQUA130 + + + SARCL02-MQUA150 + + + SARCL02-MQUA160 + + + SARCL02-MQUA210 + + + SARCL02-MQUA250 + + + SARCL02-MQUA300 + + + SARCL02-MQUA310 + + + SARCL02-MQUA350 + + + SARCL02-MQUA420 + + + SARCL02-MQUA430 + + + SARCL02-MQUA460 + + + SARMA01-MQUA010 + + + SARMA01-MQUA060 + + + SARMA01-MQUA080 + + + SARMA01-MQUA120 + + + SARMA01-MQUA140 + + + SARMA02-MQUA050 + + + SARMA02-MQUA120 + + + SARUN01-MQUA080 + + + SARUN02-MQUA080 + + + SARUN03-MQUA020 + + + SARUN03-MQUA050 + + + SARUN03-MQUA080 + + + SARUN04-MQUA020 + + + SARUN04-MQUA050 + + + SARUN04-MQUA080 + + + SARUN05-MQUA020 + + + SARUN05-MQUA050 + + + SARUN05-MQUA080 + + + SARUN06-MQUA020 + + + SARUN06-MQUA050 + + + SARUN06-MQUA080 + + + SARUN07-MQUA020 + + + SARUN07-MQUA050 + + + SARUN07-MQUA080 + + + SARUN08-MQUA020 + + + SARUN08-MQUA050 + + + SARUN08-MQUA080 + + + SARUN09-MQUA020 + + + SARUN09-MQUA050 + + + SARUN09-MQUA080 + + + SARUN10-MQUA020 + + + SARUN10-MQUA050 + + + SARUN10-MQUA080 + + + SARUN11-MQUA020 + + + SARUN11-MQUA050 + + + SARUN11-MQUA080 + + + SARUN12-MQUA020 + + + SARUN12-MQUA050 + + + SARUN12-MQUA080 + + + SARUN13-MQUA020 + + + SARUN13-MQUA050 + + + SARUN13-MQUA080 + + + SARUN14-MQUA020 + + + SARUN14-MQUA050 + + + SARUN14-MQUA080 + + + SARUN15-MQUA020 + + + SARUN15-MQUA050 + + + SARUN15-MQUA080 + + + SARUN16-MQUA080 + + + SARUN17-MQUA080 + + + SARUN18-MQUA080 + + + SARUN19-MQUA080 + + + SARUN20-MQUA080 + + + S10BD01-MQUA010 + + + SARBD01-MQUA020 + + + SARBD02-MQUA030 + + + + Collection of Nodes at SwissFEL + + I-SET + I-READ + PS-MODE + DEGAUSS + + + SINEG01-MBND300 + + + SINLH02-MBND100 + + + SINLH02-MBND200 + + + SINLH02-MBND300 + + + SINLH02-MBND400 + + + SINBC02-MBND100 + + + SINBC02-MBND200 + + + SINBC02-MBND300 + + + SINBC02-MBND400 + + + S10DI01-MBND100 + + + S10BC02-MBND100 + + + S10BC02-MBND200 + + + S10BC02-MBND300 + + + S10BC02-MBND400 + + + S10MA01-MBND100 + + + S20SY02-MBND200 + + + SARCL02-MBND100 + + + SARCL02-MBND200 + + + SARCL02-MBND400 + + + SARCL02-MBND500 + + + SARMA02-MBND100 + + + SARBD01-MBND100 + + + SARBD01-MBND200 + + + + Collection of Nodes at SwissFEL + + CAV-AMPLT-AVG + CAV-POWER-AVG + CAV-PHASE-AVG + + + SINEG01-RGUN100 + + + + Collection of Nodes at SwissFEL + + FOR-AMPLT-AVG + FOR-POWER-AVG + FOR-PHASE-AVG + + + SINEG01-RWVG100 + + + SINSB01-RWVG100 + + + SINSB02-RWVG100 + + + SINSB03-RWVG100 + + + SINSB04-RWVG100 + + + SINXB01-RWVG100 + + + SINDI01-RWVG100 + + + S10CB01-RWVG100 + + + S10CB01-RWVG300 + + + S10CB02-RWVG100 + + + S10CB02-RWVG300 + + + S10CB03-RWVG100 + + + S10CB03-RWVG300 + + + S10CB04-RWVG100 + + + S10CB04-RWVG300 + + + S10CB05-RWVG100 + + + S10CB05-RWVG300 + + + S10CB06-RWVG100 + + + S10CB06-RWVG300 + + + S10CB07-RWVG100 + + + S10CB07-RWVG300 + + + S10CB08-RWVG100 + + + S10CB08-RWVG300 + + + S10CB09-RWVG100 + + + S10CB09-RWVG300 + + + S20CB01-RWVG100 + + + S20CB01-RWVG300 + + + S20CB02-RWVG100 + + + S20CB02-RWVG300 + + + S20CB03-RWVG100 + + + S20CB03-RWVG300 + + + S20CB04-RWVG100 + + + S20CB04-RWVG300 + + + S30CB01-RWVG100 + + + S30CB01-RWVG300 + + + S30CB02-RWVG100 + + + S30CB02-RWVG300 + + + S30CB03-RWVG100 + + + S30CB03-RWVG300 + + + S30CB04-RWVG100 + + + S30CB04-RWVG300 + + + S30CB05-RWVG100 + + + S30CB05-RWVG300 + + + S30CB06-RWVG100 + + + S30CB06-RWVG300 + + + S30CB07-RWVG100 + + + S30CB07-RWVG300 + + + S30CB08-RWVG100 + + + S30CB08-RWVG300 + + + S30CB09-RWVG100 + + + S30CB09-RWVG300 + + + S30CB10-RWVG100 + + + S30CB10-RWVG300 + + + S30CB11-RWVG100 + + + S30CB11-RWVG300 + + + S30CB12-RWVG100 + + + S30CB12-RWVG300 + + + S30CB13-RWVG100 + + + S30CB13-RWVG300 + + + S30CB14-RWVG100 + + + + Collection of Nodes at SwissFEL + + CAV-AMPLT-AVG + CAV-POWER-AVG + CAV-PHASE-AVG + + + SINSB01-RACC100 + + + SINSB02-RACC100 + + + SINSB03-RACC100 + + + SINSB03-RACC200 + + + SINSB04-RACC100 + + + SINSB04-RACC200 + + + SINXB01-RACC100 + + + SINXB01-RACC200 + + + S10CB01-RACC100 + + + S10CB01-RACC200 + + + S10CB01-RACC300 + + + S10CB01-RACC400 + + + S10CB02-RACC100 + + + S10CB02-RACC200 + + + S10CB02-RACC300 + + + S10CB02-RACC400 + + + S10CB03-RACC100 + + + S10CB03-RACC200 + + + S10CB03-RACC300 + + + S10CB03-RACC400 + + + S10CB04-RACC100 + + + S10CB04-RACC200 + + + S10CB04-RACC300 + + + S10CB04-RACC400 + + + S10CB05-RACC100 + + + S10CB05-RACC200 + + + S10CB05-RACC300 + + + S10CB05-RACC400 + + + S10CB06-RACC100 + + + S10CB06-RACC200 + + + S10CB06-RACC300 + + + S10CB06-RACC400 + + + S10CB07-RACC100 + + + S10CB07-RACC200 + + + S10CB07-RACC300 + + + S10CB07-RACC400 + + + S10CB08-RACC100 + + + S10CB08-RACC200 + + + S10CB08-RACC300 + + + S10CB08-RACC400 + + + S10CB09-RACC100 + + + S10CB09-RACC200 + + + S10CB09-RACC300 + + + S10CB09-RACC400 + + + S20CB01-RACC100 + + + S20CB01-RACC200 + + + S20CB01-RACC300 + + + S20CB01-RACC400 + + + S20CB02-RACC100 + + + S20CB02-RACC200 + + + S20CB02-RACC300 + + + S20CB02-RACC400 + + + S20CB03-RACC100 + + + S20CB03-RACC200 + + + S20CB03-RACC300 + + + S20CB03-RACC400 + + + S20CB04-RACC100 + + + S20CB04-RACC200 + + + S20CB04-RACC300 + + + S20CB04-RACC400 + + + S30CB01-RACC100 + + + S30CB01-RACC200 + + + S30CB01-RACC300 + + + S30CB01-RACC400 + + + S30CB02-RACC100 + + + S30CB02-RACC200 + + + S30CB02-RACC300 + + + S30CB02-RACC400 + + + S30CB03-RACC100 + + + S30CB03-RACC200 + + + S30CB03-RACC300 + + + S30CB03-RACC400 + + + S30CB04-RACC100 + + + S30CB04-RACC200 + + + S30CB04-RACC300 + + + S30CB04-RACC400 + + + S30CB05-RACC100 + + + S30CB05-RACC200 + + + S30CB05-RACC300 + + + S30CB05-RACC400 + + + S30CB06-RACC100 + + + S30CB06-RACC200 + + + S30CB06-RACC300 + + + S30CB06-RACC400 + + + S30CB07-RACC100 + + + S30CB07-RACC200 + + + S30CB07-RACC300 + + + S30CB07-RACC400 + + + S30CB08-RACC100 + + + S30CB08-RACC200 + + + S30CB08-RACC300 + + + S30CB08-RACC400 + + + S30CB09-RACC100 + + + S30CB09-RACC200 + + + S30CB09-RACC300 + + + S30CB09-RACC400 + + + S30CB10-RACC100 + + + S30CB10-RACC200 + + + S30CB10-RACC300 + + + S30CB10-RACC400 + + + S30CB11-RACC100 + + + S30CB11-RACC200 + + + S30CB11-RACC300 + + + S30CB11-RACC400 + + + S30CB12-RACC100 + + + S30CB12-RACC200 + + + S30CB12-RACC300 + + + S30CB12-RACC400 + + + S30CB13-RACC100 + + + S30CB13-RACC200 + + + S30CB13-RACC300 + + + S30CB13-RACC400 + + + + Collection of Nodes at SwissFEL + + GAP-READ + GAP_SP + EAB + + + SINLH02-UIND230 + + + SARUN03-UIND030 + + + SARUN04-UIND030 + + + SARUN05-UIND030 + + + SARUN06-UIND030 + + + SARUN07-UIND030 + + + SARUN08-UIND030 + + + SARUN09-UIND030 + + + SARUN10-UIND030 + + + SARUN11-UIND030 + + + SARUN12-UIND030 + + + SARUN13-UIND030 + + + SARUN14-UIND030 + + + SARUN15-UIND030 + + + diff --git a/examples/cafeTest/test.xml b/examples/cafeTest/test.xml new file mode 100644 index 0000000..d3c4777 --- /dev/null +++ b/examples/cafeTest/test.xml @@ -0,0 +1,8061 @@ + + + + VA-SARMA02-DSCR030:ROI-XMAX + VA-SARMA02-DSCR030:ROI-XMIN + VA-SARMA02-DSCR030:ROI-YMAX + VA-SARMA02-DSCR030:ROI-YMIN + VA-SARMA02-DSCR030:pipeline-x_stats_gr-g_stddiv_egu + VA-SARMA02-DSCR030:pipeline-y_stats_gr-g_stddiv_egu + VA-SARMA02-DSCR030:pipeline-slice_h_stats-g_stddiv_egu + VA-SARMA02-DSCR030:pipeline-slice_v_stats-g_stddiv_egu + + + + S30CB09-RSYS:SET-ACC-VOLT + S30CB09-RSYS:SET-BEAM-PHASE + S30CB09-RSYS:SET-KLY-POWER + S30CB09-RSYS:SET-VSUM-PHASE + S30CB09-RSYS:SET-STATION-STATE + S30CB09-RSYS:SET-VSUM-AMPLT-SCALE + S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB09-RSYS:SET-VOLT-POWER-SCALE + S30CB09-RSYS:GET-ACC-VOLT + S30CB09-RSYS:GET-BEAM-PHASE + S30CB09-RSYS:GET-KLY-POWER + S30CB09-RSYS:GET-VSUM-PHASE + S30CB09-RSYS:GET-STATION-MODE + S30CB09-RSYS:GET-STATION-STATE + S30CB09-RSYS:GET-VSUM-AMPLT + S30CB09-RSYS:GET-RF-READY-STATUS + S30CB09-RSYS:GET-BEAM-CALIB-STATUS + S30CB09-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-RSYS:SET-VOLT-POWER-SCALE + VA-SINSB01-RSYS:SET-VOLT-POWER-SCALE + VA-SINSB02-RSYS:SET-VOLT-POWER-SCALE + VA-SINSB03-RSYS:SET-VOLT-POWER-SCALE + VA-SINSB04-RSYS:SET-VOLT-POWER-SCALE + VA-SINXB01-RSYS:SET-VOLT-POWER-SCALE + VA-SINDI01-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB01-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB02-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB03-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB04-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB05-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB06-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB07-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB08-RSYS:SET-VOLT-POWER-SCALE + VA-S10CB09-RSYS:SET-VOLT-POWER-SCALE + VA-S20CB01-RSYS:SET-VOLT-POWER-SCALE + VA-S20CB02-RSYS:SET-VOLT-POWER-SCALE + VA-S20CB03-RSYS:SET-VOLT-POWER-SCALE + VA-S20CB04-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB01-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB02-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB03-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB04-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB05-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB06-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB07-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB08-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB09-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB10-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB11-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB12-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB13-RSYS:SET-VOLT-POWER-SCALE + VA-S30CB14-RSYS:SET-VOLT-POWER-SCALE + + + + VA-SINLH03-EXIT:BETX + VA-SINLH03-EXIT:ALFX + VA-SINLH03-EXIT:BETY + VA-SINLH03-EXIT:ALFY + VA-SINLH03-EXIT:EXN + VA-SINLH03-EXIT:EYN + VA-SINLH03-EXIT:CHARGE + + + + VA-SINLH02-DSCR220:ROI-XMAX + VA-SINLH02-DSCR220:ROI-XMIN + VA-SINLH02-DSCR220:ROI-YMAX + VA-SINLH02-DSCR220:ROI-YMIN + VA-SINLH02-DSCR220:pipeline-x_stats_gr-g_stddiv_egu + VA-SINLH02-DSCR220:pipeline-y_stats_gr-g_stddiv_egu + VA-SINLH02-DSCR220:pipeline-slice_h_stats-g_stddiv_egu + VA-SINLH02-DSCR220:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINLH02-UIND230-MOT:NINTERVX + VA-SARUN03-UIND030-MOT:NINTERVX + VA-SARUN04-UIND030-MOT:NINTERVX + VA-SARUN05-UIND030-MOT:NINTERVX + VA-SARUN06-UIND030-MOT:NINTERVX + VA-SARUN07-UIND030-MOT:NINTERVX + VA-SARUN08-UIND030-MOT:NINTERVX + VA-SARUN09-UIND030-MOT:NINTERVX + VA-SARUN10-UIND030-MOT:NINTERVX + VA-SARUN11-UIND030-MOT:NINTERVX + VA-SARUN12-UIND030-MOT:NINTERVX + VA-SARUN13-UIND030-MOT:NINTERVX + VA-SARUN14-UIND030-MOT:NINTERVX + VA-SARUN15-UIND030-MOT:NINTERVX + + + + VA-SINBC02-MSEX130:PS-MODE + VA-SINBC02-MSEX330:PS-MODE + VA-S10BC02-MSEX130:PS-MODE + VA-S10BC02-MSEX330:PS-MODE + VA-SARCL02-MSEX140:PS-MODE + VA-SARCL02-MSEX440:PS-MODE + VA-SATSY01-MSEX050:PS-MODE + VA-SATSY01-MSEX080:PS-MODE + VA-SATSY01-MSEX220:PS-MODE + VA-SATSY01-MSEX250:PS-MODE + VA-SATCL01-MSEX110:PS-MODE + VA-SATCL01-MSEX160:PS-MODE + VA-SATCL01-MSEX200:PS-MODE + + + + VA-SINEG01-DBPM340:Y1-VALID + VA-SINSB01-DBPM150:Y1-VALID + VA-SINSB02-DBPM150:Y1-VALID + VA-SINLH01-DBPM060:Y1-VALID + VA-SINLH02-DBPM210:Y1-VALID + VA-SINLH02-DBPM240:Y1-VALID + VA-SINLH03-DBPM010:Y1-VALID + VA-SINLH03-DBPM050:Y1-VALID + VA-SINLH03-DBPM090:Y1-VALID + VA-SINSB03-DBPM120:Y1-VALID + VA-SINSB03-DBPM220:Y1-VALID + VA-SINSB04-DBPM120:Y1-VALID + VA-SINSB04-DBPM220:Y1-VALID + VA-SINSB05-DBPM120:Y1-VALID + VA-SINSB05-DBPM220:Y1-VALID + VA-SINXB01-DBPM120:Y1-VALID + VA-SINBC01-DBPM010:Y1-VALID + VA-SINBC01-DBPM030:Y1-VALID + VA-SINBC01-DBPM080:Y1-VALID + VA-SINBC01-DBPM100:Y1-VALID + VA-SINBC02-DBPM140:Y1-VALID + VA-SINBC02-DBPM320:Y1-VALID + VA-SINDI01-DBPM010:Y1-VALID + VA-SINDI01-DBPM060:Y1-VALID + VA-SINDI02-DBPM010:Y1-VALID + VA-SINDI02-DBPM040:Y1-VALID + VA-SINDI02-DBPM080:Y1-VALID + VA-S10CB01-DBPM220:Y1-VALID + VA-S10CB01-DBPM420:Y1-VALID + VA-S10CB02-DBPM220:Y1-VALID + VA-S10CB02-DBPM420:Y1-VALID + VA-S10DI01-DBPM110:Y1-VALID + VA-S10CB03-DBPM220:Y1-VALID + VA-S10CB03-DBPM420:Y1-VALID + VA-S10CB04-DBPM220:Y1-VALID + VA-S10CB04-DBPM420:Y1-VALID + VA-S10CB05-DBPM220:Y1-VALID + VA-S10CB05-DBPM420:Y1-VALID + VA-S10CB06-DBPM220:Y1-VALID + VA-S10CB06-DBPM420:Y1-VALID + VA-S10CB07-DBPM220:Y1-VALID + VA-S10CB07-DBPM420:Y1-VALID + VA-S10CB08-DBPM220:Y1-VALID + VA-S10CB08-DBPM420:Y1-VALID + VA-S10CB09-DBPM220:Y1-VALID + VA-S10BC01-DBPM010:Y1-VALID + VA-S10BC01-DBPM050:Y1-VALID + VA-S10BC01-DBPM090:Y1-VALID + VA-S10BC02-DBPM140:Y1-VALID + VA-S10BC02-DBPM320:Y1-VALID + VA-S10MA01-DBPM010:Y1-VALID + VA-S10MA01-DBPM060:Y1-VALID + VA-S10MA01-DBPM120:Y1-VALID + VA-S20CB01-DBPM420:Y1-VALID + VA-S20CB02-DBPM420:Y1-VALID + VA-S20CB03-DBPM420:Y1-VALID + VA-S20SY01-DBPM010:Y1-VALID + VA-S20SY01-DBPM040:Y1-VALID + VA-S20SY01-DBPM060:Y1-VALID + VA-S20SY02-DBPM080:Y1-VALID + VA-S20SY02-DBPM120:Y1-VALID + VA-S20SY02-DBPM150:Y1-VALID + VA-S20SY03-DBPM010:Y1-VALID + VA-S20SY03-DBPM040:Y1-VALID + VA-S20SY03-DBPM080:Y1-VALID + VA-S30CB01-DBPM420:Y1-VALID + VA-S30CB02-DBPM420:Y1-VALID + VA-S30CB03-DBPM420:Y1-VALID + VA-S30CB04-DBPM420:Y1-VALID + VA-S30CB05-DBPM420:Y1-VALID + VA-S30CB06-DBPM420:Y1-VALID + VA-S30CB07-DBPM420:Y1-VALID + VA-S30CB08-DBPM420:Y1-VALID + VA-S30CB09-DBPM420:Y1-VALID + VA-S30CB10-DBPM420:Y1-VALID + VA-S30CB11-DBPM420:Y1-VALID + VA-S30CB12-DBPM420:Y1-VALID + VA-S30CB13-DBPM420:Y1-VALID + VA-S30CB14-DBPM420:Y1-VALID + VA-S30CB15-DBPM420:Y1-VALID + VA-SARCL01-DBPM010:Y1-VALID + VA-SARCL01-DBPM060:Y1-VALID + VA-SARCL01-DBPM120:Y1-VALID + VA-SARCL01-DBPM150:Y1-VALID + VA-SARCL02-DBPM110:Y1-VALID + VA-SARCL02-DBPM220:Y1-VALID + VA-SARCL02-DBPM260:Y1-VALID + VA-SARCL02-DBPM330:Y1-VALID + VA-SARCL02-DBPM470:Y1-VALID + VA-SARMA01-DBPM040:Y1-VALID + VA-SARMA01-DBPM100:Y1-VALID + VA-SARMA02-DBPM010:Y1-VALID + VA-SARMA02-DBPM020:Y1-VALID + VA-SARMA02-DBPM040:Y1-VALID + VA-SARMA02-DBPM110:Y1-VALID + VA-SARUN01-DBPM070:Y1-VALID + VA-SARUN02-DBPM070:Y1-VALID + VA-SARUN03-DBPM070:Y1-VALID + VA-SARUN04-DBPM070:Y1-VALID + VA-SARUN05-DBPM070:Y1-VALID + VA-SARUN06-DBPM070:Y1-VALID + VA-SARUN07-DBPM070:Y1-VALID + VA-SARUN08-DBPM070:Y1-VALID + VA-SARUN09-DBPM070:Y1-VALID + VA-SARUN10-DBPM070:Y1-VALID + VA-SARUN11-DBPM070:Y1-VALID + VA-SARUN12-DBPM070:Y1-VALID + VA-SARUN13-DBPM070:Y1-VALID + VA-SARUN14-DBPM070:Y1-VALID + VA-SARUN15-DBPM070:Y1-VALID + VA-SARUN16-DBPM070:Y1-VALID + VA-SARUN17-DBPM070:Y1-VALID + VA-SARUN18-DBPM070:Y1-VALID + VA-SARUN19-DBPM070:Y1-VALID + VA-SARUN20-DBPM070:Y1-VALID + VA-SARBD01-DBPM040:Y1-VALID + VA-SATSY01-DBPM010:Y1-VALID + VA-SATSY01-DBPM060:Y1-VALID + VA-SATSY01-DBPM100:Y1-VALID + VA-SATSY01-DBPM240:Y1-VALID + VA-SATSY01-DBPM290:Y1-VALID + VA-SATSY02-DBPM020:Y1-VALID + VA-SATSY02-DBPM210:Y1-VALID + VA-SATSY03-DBPM030:Y1-VALID + VA-SATSY03-DBPM060:Y1-VALID + VA-SATSY03-DBPM090:Y1-VALID + VA-SATSY03-DBPM120:Y1-VALID + VA-SATCL01-DBPM140:Y1-VALID + VA-SATDI01-DBPM030:Y1-VALID + VA-SATDI01-DBPM060:Y1-VALID + VA-SATDI01-DBPM110:Y1-VALID + VA-SATDI01-DBPM240:Y1-VALID + VA-SATDI01-DBPM270:Y1-VALID + VA-SATDI01-DBPM310:Y1-VALID + VA-SATMA01-DBPM010:Y1-VALID + VA-SATMA01-DBPM020:Y1-VALID + VA-SATMA01-DBPM040:Y1-VALID + VA-S10BD01-DBPM020:Y1-VALID + VA-SARBD02-DBPM010:Y1-VALID + VA-SARBD02-DBPM040:Y1-VALID + + + + VA-SINEG01-MSOL010:I-SET + VA-SINEG01-MSOL130:I-SET + VA-SINSB01-MSOL110:I-SET + VA-SINSB01-MSOL120:I-SET + VA-SINSB01-MSOL130:I-SET + VA-SINSB01-MSOL140:I-SET + VA-SINSB02-MSOL110:I-SET + VA-SINSB02-MSOL120:I-SET + VA-SINSB02-MSOL130:I-SET + VA-SINSB02-MSOL140:I-SET + + + + VA-SINLH02-UIND230-MOT:X-SET + VA-SARUN03-UIND030-MOT:X-SET + VA-SARUN04-UIND030-MOT:X-SET + VA-SARUN05-UIND030-MOT:X-SET + VA-SARUN06-UIND030-MOT:X-SET + VA-SARUN07-UIND030-MOT:X-SET + VA-SARUN08-UIND030-MOT:X-SET + VA-SARUN09-UIND030-MOT:X-SET + VA-SARUN10-UIND030-MOT:X-SET + VA-SARUN11-UIND030-MOT:X-SET + VA-SARUN12-UIND030-MOT:X-SET + VA-SARUN13-UIND030-MOT:X-SET + VA-SARUN14-UIND030-MOT:X-SET + VA-SARUN15-UIND030-MOT:X-SET + + + + S20CB01-RSYS:SET-ACC-VOLT + S20CB01-RSYS:SET-BEAM-PHASE + S20CB01-RSYS:SET-KLY-POWER + S20CB01-RSYS:SET-VSUM-PHASE + S20CB01-RSYS:SET-STATION-STATE + S20CB01-RSYS:SET-VSUM-AMPLT-SCALE + S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S20CB01-RSYS:SET-VOLT-POWER-SCALE + S20CB01-RSYS:GET-ACC-VOLT + S20CB01-RSYS:GET-BEAM-PHASE + S20CB01-RSYS:GET-KLY-POWER + S20CB01-RSYS:GET-VSUM-PHASE + S20CB01-RSYS:GET-STATION-MODE + S20CB01-RSYS:GET-STATION-STATE + S20CB01-RSYS:GET-VSUM-AMPLT + S20CB01-RSYS:GET-RF-READY-STATUS + S20CB01-RSYS:GET-BEAM-CALIB-STATUS + S20CB01-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-S10BC02-BC:ANGLE-SET + VA-S10BC02-BC:MOTOR-POS-SET + VA-S10BC02-BC:DL + VA-S10BC02-BC:DL-VALID + + + + VA-SINEG01-DBPM340:SIM-Y2 + VA-SINSB01-DBPM150:SIM-Y2 + VA-SINSB02-DBPM150:SIM-Y2 + VA-SINLH01-DBPM060:SIM-Y2 + VA-SINLH02-DBPM210:SIM-Y2 + VA-SINLH02-DBPM240:SIM-Y2 + VA-SINLH03-DBPM010:SIM-Y2 + VA-SINLH03-DBPM050:SIM-Y2 + VA-SINLH03-DBPM090:SIM-Y2 + VA-SINSB03-DBPM120:SIM-Y2 + VA-SINSB03-DBPM220:SIM-Y2 + VA-SINSB04-DBPM120:SIM-Y2 + VA-SINSB04-DBPM220:SIM-Y2 + VA-SINSB05-DBPM120:SIM-Y2 + VA-SINSB05-DBPM220:SIM-Y2 + VA-SINXB01-DBPM120:SIM-Y2 + VA-SINBC01-DBPM010:SIM-Y2 + VA-SINBC01-DBPM030:SIM-Y2 + VA-SINBC01-DBPM080:SIM-Y2 + VA-SINBC01-DBPM100:SIM-Y2 + VA-SINBC02-DBPM140:SIM-Y2 + VA-SINBC02-DBPM320:SIM-Y2 + VA-SINDI01-DBPM010:SIM-Y2 + VA-SINDI01-DBPM060:SIM-Y2 + VA-SINDI02-DBPM010:SIM-Y2 + VA-SINDI02-DBPM040:SIM-Y2 + VA-SINDI02-DBPM080:SIM-Y2 + VA-S10CB01-DBPM220:SIM-Y2 + VA-S10CB01-DBPM420:SIM-Y2 + VA-S10CB02-DBPM220:SIM-Y2 + VA-S10CB02-DBPM420:SIM-Y2 + VA-S10DI01-DBPM110:SIM-Y2 + VA-S10CB03-DBPM220:SIM-Y2 + VA-S10CB03-DBPM420:SIM-Y2 + VA-S10CB04-DBPM220:SIM-Y2 + VA-S10CB04-DBPM420:SIM-Y2 + VA-S10CB05-DBPM220:SIM-Y2 + VA-S10CB05-DBPM420:SIM-Y2 + VA-S10CB06-DBPM220:SIM-Y2 + VA-S10CB06-DBPM420:SIM-Y2 + VA-S10CB07-DBPM220:SIM-Y2 + VA-S10CB07-DBPM420:SIM-Y2 + VA-S10CB08-DBPM220:SIM-Y2 + VA-S10CB08-DBPM420:SIM-Y2 + VA-S10CB09-DBPM220:SIM-Y2 + VA-S10BC01-DBPM010:SIM-Y2 + VA-S10BC01-DBPM050:SIM-Y2 + VA-S10BC01-DBPM090:SIM-Y2 + VA-S10BC02-DBPM140:SIM-Y2 + VA-S10BC02-DBPM320:SIM-Y2 + VA-S10MA01-DBPM010:SIM-Y2 + VA-S10MA01-DBPM060:SIM-Y2 + VA-S10MA01-DBPM120:SIM-Y2 + VA-S20CB01-DBPM420:SIM-Y2 + VA-S20CB02-DBPM420:SIM-Y2 + VA-S20CB03-DBPM420:SIM-Y2 + VA-S20SY01-DBPM010:SIM-Y2 + VA-S20SY01-DBPM040:SIM-Y2 + VA-S20SY01-DBPM060:SIM-Y2 + VA-S20SY02-DBPM080:SIM-Y2 + VA-S20SY02-DBPM120:SIM-Y2 + VA-S20SY02-DBPM150:SIM-Y2 + VA-S20SY03-DBPM010:SIM-Y2 + VA-S20SY03-DBPM040:SIM-Y2 + VA-S20SY03-DBPM080:SIM-Y2 + VA-S30CB01-DBPM420:SIM-Y2 + VA-S30CB02-DBPM420:SIM-Y2 + VA-S30CB03-DBPM420:SIM-Y2 + VA-S30CB04-DBPM420:SIM-Y2 + VA-S30CB05-DBPM420:SIM-Y2 + VA-S30CB06-DBPM420:SIM-Y2 + VA-S30CB07-DBPM420:SIM-Y2 + VA-S30CB08-DBPM420:SIM-Y2 + VA-S30CB09-DBPM420:SIM-Y2 + VA-S30CB10-DBPM420:SIM-Y2 + VA-S30CB11-DBPM420:SIM-Y2 + VA-S30CB12-DBPM420:SIM-Y2 + VA-S30CB13-DBPM420:SIM-Y2 + VA-S30CB14-DBPM420:SIM-Y2 + VA-S30CB15-DBPM420:SIM-Y2 + VA-SARCL01-DBPM010:SIM-Y2 + VA-SARCL01-DBPM060:SIM-Y2 + VA-SARCL01-DBPM120:SIM-Y2 + VA-SARCL01-DBPM150:SIM-Y2 + VA-SARCL02-DBPM110:SIM-Y2 + VA-SARCL02-DBPM220:SIM-Y2 + VA-SARCL02-DBPM260:SIM-Y2 + VA-SARCL02-DBPM330:SIM-Y2 + VA-SARCL02-DBPM470:SIM-Y2 + VA-SARMA01-DBPM040:SIM-Y2 + VA-SARMA01-DBPM100:SIM-Y2 + VA-SARMA02-DBPM010:SIM-Y2 + VA-SARMA02-DBPM020:SIM-Y2 + VA-SARMA02-DBPM040:SIM-Y2 + VA-SARMA02-DBPM110:SIM-Y2 + VA-SARUN01-DBPM070:SIM-Y2 + VA-SARUN02-DBPM070:SIM-Y2 + VA-SARUN03-DBPM070:SIM-Y2 + VA-SARUN04-DBPM070:SIM-Y2 + VA-SARUN05-DBPM070:SIM-Y2 + VA-SARUN06-DBPM070:SIM-Y2 + VA-SARUN07-DBPM070:SIM-Y2 + VA-SARUN08-DBPM070:SIM-Y2 + VA-SARUN09-DBPM070:SIM-Y2 + VA-SARUN10-DBPM070:SIM-Y2 + VA-SARUN11-DBPM070:SIM-Y2 + VA-SARUN12-DBPM070:SIM-Y2 + VA-SARUN13-DBPM070:SIM-Y2 + VA-SARUN14-DBPM070:SIM-Y2 + VA-SARUN15-DBPM070:SIM-Y2 + VA-SARUN16-DBPM070:SIM-Y2 + VA-SARUN17-DBPM070:SIM-Y2 + VA-SARUN18-DBPM070:SIM-Y2 + VA-SARUN19-DBPM070:SIM-Y2 + VA-SARUN20-DBPM070:SIM-Y2 + VA-SARBD01-DBPM040:SIM-Y2 + VA-SATSY01-DBPM010:SIM-Y2 + VA-SATSY01-DBPM060:SIM-Y2 + VA-SATSY01-DBPM100:SIM-Y2 + VA-SATSY01-DBPM240:SIM-Y2 + VA-SATSY01-DBPM290:SIM-Y2 + VA-SATSY02-DBPM020:SIM-Y2 + VA-SATSY02-DBPM210:SIM-Y2 + VA-SATSY03-DBPM030:SIM-Y2 + VA-SATSY03-DBPM060:SIM-Y2 + VA-SATSY03-DBPM090:SIM-Y2 + VA-SATSY03-DBPM120:SIM-Y2 + VA-SATCL01-DBPM140:SIM-Y2 + VA-SATDI01-DBPM030:SIM-Y2 + VA-SATDI01-DBPM060:SIM-Y2 + VA-SATDI01-DBPM110:SIM-Y2 + VA-SATDI01-DBPM240:SIM-Y2 + VA-SATDI01-DBPM270:SIM-Y2 + VA-SATDI01-DBPM310:SIM-Y2 + VA-SATMA01-DBPM010:SIM-Y2 + VA-SATMA01-DBPM020:SIM-Y2 + VA-SATMA01-DBPM040:SIM-Y2 + VA-S10BD01-DBPM020:SIM-Y2 + VA-SARBD02-DBPM010:SIM-Y2 + VA-SARBD02-DBPM040:SIM-Y2 + + + + S30CB06-RSYS:SET-ACC-VOLT + S30CB06-RSYS:SET-BEAM-PHASE + S30CB06-RSYS:SET-KLY-POWER + S30CB06-RSYS:SET-VSUM-PHASE + S30CB06-RSYS:SET-STATION-STATE + S30CB06-RSYS:SET-VSUM-AMPLT-SCALE + S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB06-RSYS:SET-VOLT-POWER-SCALE + S30CB06-RSYS:GET-ACC-VOLT + S30CB06-RSYS:GET-BEAM-PHASE + S30CB06-RSYS:GET-KLY-POWER + S30CB06-RSYS:GET-VSUM-PHASE + S30CB06-RSYS:GET-STATION-MODE + S30CB06-RSYS:GET-STATION-STATE + S30CB06-RSYS:GET-VSUM-AMPLT + S30CB06-RSYS:GET-RF-READY-STATUS + S30CB06-RSYS:GET-BEAM-CALIB-STATUS + S30CB06-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINLH02-LH:ANGLE-SET + VA-SINLH02-LH:MOTOR-POS-SET + VA-SINLH02-LH:DL + VA-SINLH02-LH:DL-VALID + + + + VA-SINLH02-UIND230-MOT:GAP-READ + VA-SARUN03-UIND030-MOT:GAP-READ + VA-SARUN04-UIND030-MOT:GAP-READ + VA-SARUN05-UIND030-MOT:GAP-READ + VA-SARUN06-UIND030-MOT:GAP-READ + VA-SARUN07-UIND030-MOT:GAP-READ + VA-SARUN08-UIND030-MOT:GAP-READ + VA-SARUN09-UIND030-MOT:GAP-READ + VA-SARUN10-UIND030-MOT:GAP-READ + VA-SARUN11-UIND030-MOT:GAP-READ + VA-SARUN12-UIND030-MOT:GAP-READ + VA-SARUN13-UIND030-MOT:GAP-READ + VA-SARUN14-UIND030-MOT:GAP-READ + VA-SARUN15-UIND030-MOT:GAP-READ + + + + VA-SINDI01-DSCR080:ROI-XMAX + VA-SINDI01-DSCR080:ROI-XMIN + VA-SINDI01-DSCR080:ROI-YMAX + VA-SINDI01-DSCR080:ROI-YMIN + VA-SINDI01-DSCR080:pipeline-x_stats_gr-g_stddiv_egu + VA-SINDI01-DSCR080:pipeline-y_stats_gr-g_stddiv_egu + VA-SINDI01-DSCR080:pipeline-slice_h_stats-g_stddiv_egu + VA-SINDI01-DSCR080:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-MCRX120:KICK + VA-SINEG01-MCRY120:KICK + VA-SINEG01-MCRX160:KICK + VA-SINEG01-MCRY160:KICK + VA-SINEG01-MCRX180:KICK + VA-SINEG01-MCRY180:KICK + VA-SINEG01-MCRX200:KICK + VA-SINEG01-MCRY200:KICK + VA-SINEG01-MCRX220:KICK + VA-SINEG01-MCRY220:KICK + VA-SINSB01-MCRX010:KICK + VA-SINSB01-MCRY010:KICK + VA-SINSB02-MCRX010:KICK + VA-SINSB02-MCRY010:KICK + VA-SINLH01-MCRX020:KICK + VA-SINLH01-MCRY020:KICK + VA-SINLH01-MCRX050:KICK + VA-SINLH01-MCRY050:KICK + VA-SINLH02-MCRX010:KICK + VA-SINLH02-MCRY010:KICK + VA-SINLH02-MCRX100:KICK + VA-SINLH02-MCRX200:KICK + VA-SINLH02-MCRX300:KICK + VA-SINLH02-MCRX400:KICK + VA-SINLH02-MCRX410:KICK + VA-SINLH02-MCRY410:KICK + VA-SINLH03-MCRX040:KICK + VA-SINLH03-MCRY040:KICK + VA-SINLH03-MCRX080:KICK + VA-SINLH03-MCRY080:KICK + VA-SINSB03-MCRX130:KICK + VA-SINSB03-MCRY130:KICK + VA-SINSB03-MCRX230:KICK + VA-SINSB03-MCRY230:KICK + VA-SINSB04-MCRX130:KICK + VA-SINSB04-MCRY130:KICK + VA-SINSB04-MCRX230:KICK + VA-SINSB04-MCRY230:KICK + VA-SINSB05-MCRX130:KICK + VA-SINSB05-MCRY130:KICK + VA-SINSB05-MCRX230:KICK + VA-SINSB05-MCRY230:KICK + VA-SINBC01-MCRX020:KICK + VA-SINBC01-MCRY020:KICK + VA-SINBC01-MCRX050:KICK + VA-SINBC01-MCRY050:KICK + VA-SINBC01-MCRX070:KICK + VA-SINBC01-MCRY070:KICK + VA-SINBC01-MCRX090:KICK + VA-SINBC01-MCRY090:KICK + VA-SINBC01-MCRX110:KICK + VA-SINBC01-MCRY110:KICK + VA-SINBC02-MCRX100:KICK + VA-SINBC02-MCRX200:KICK + VA-SINBC02-MCRX300:KICK + VA-SINBC02-MCRX400:KICK + VA-SINDI01-MCRX020:KICK + VA-SINDI01-MCRY020:KICK + VA-SINDI01-MCRX070:KICK + VA-SINDI01-MCRY070:KICK + VA-SINDI02-MCRX020:KICK + VA-SINDI02-MCRY020:KICK + VA-SINDI02-MCRX030:KICK + VA-SINDI02-MCRY030:KICK + VA-SINDI02-MCRX050:KICK + VA-SINDI02-MCRY050:KICK + VA-SINDI02-MCRX060:KICK + VA-SINDI02-MCRY060:KICK + VA-SINDI02-MCRX090:KICK + VA-SINDI02-MCRY090:KICK + VA-S10CB01-MCRX230:KICK + VA-S10CB01-MCRY230:KICK + VA-S10CB01-MCRX430:KICK + VA-S10CB01-MCRY430:KICK + VA-S10CB02-MCRX230:KICK + VA-S10CB02-MCRY230:KICK + VA-S10CB02-MCRX430:KICK + VA-S10CB02-MCRY430:KICK + VA-S10DI01-MCRX100:KICK + VA-S10DI01-MCRX120:KICK + VA-S10DI01-MCRY120:KICK + VA-S10CB03-MCRX230:KICK + VA-S10CB03-MCRY230:KICK + VA-S10CB03-MCRX430:KICK + VA-S10CB03-MCRY430:KICK + VA-S10CB04-MCRX230:KICK + VA-S10CB04-MCRY230:KICK + VA-S10CB04-MCRX430:KICK + VA-S10CB04-MCRY430:KICK + VA-S10CB05-MCRX230:KICK + VA-S10CB05-MCRY230:KICK + VA-S10CB05-MCRX430:KICK + VA-S10CB05-MCRY430:KICK + VA-S10CB06-MCRX230:KICK + VA-S10CB06-MCRY230:KICK + VA-S10CB06-MCRX430:KICK + VA-S10CB06-MCRY430:KICK + VA-S10CB07-MCRX230:KICK + VA-S10CB07-MCRY230:KICK + VA-S10CB07-MCRX430:KICK + VA-S10CB07-MCRY430:KICK + VA-S10CB08-MCRX230:KICK + VA-S10CB08-MCRY230:KICK + VA-S10CB08-MCRX430:KICK + VA-S10CB08-MCRY430:KICK + VA-S10CB09-MCRX230:KICK + VA-S10CB09-MCRY230:KICK + VA-S10BC01-MCRX020:KICK + VA-S10BC01-MCRY020:KICK + VA-S10BC01-MCRX040:KICK + VA-S10BC01-MCRY040:KICK + VA-S10BC01-MCRX060:KICK + VA-S10BC01-MCRY060:KICK + VA-S10BC01-MCRX080:KICK + VA-S10BC01-MCRY080:KICK + VA-S10BC01-MCRX100:KICK + VA-S10BC01-MCRY100:KICK + VA-S10BC02-MCRX100:KICK + VA-S10BC02-MCRX200:KICK + VA-S10BC02-MCRX300:KICK + VA-S10BC02-MCRX400:KICK + VA-S10MA01-MCRX020:KICK + VA-S10MA01-MCRY020:KICK + VA-S10MA01-MCRX050:KICK + VA-S10MA01-MCRY050:KICK + VA-S10MA01-MCRX070:KICK + VA-S10MA01-MCRY070:KICK + VA-S10MA01-MCRX100:KICK + VA-S10MA01-MCRX110:KICK + VA-S10MA01-MCRY110:KICK + VA-S10MA01-MCRX130:KICK + VA-S10MA01-MCRY130:KICK + VA-S20CB01-MCRX430:KICK + VA-S20CB01-MCRY430:KICK + VA-S20CB02-MCRX430:KICK + VA-S20CB02-MCRY430:KICK + VA-S20CB03-MCRX430:KICK + VA-S20CB03-MCRY430:KICK + VA-S20SY01-MCRX020:KICK + VA-S20SY01-MCRY020:KICK + VA-S20SY01-MCRX030:KICK + VA-S20SY01-MCRY030:KICK + VA-S20SY01-MCRX050:KICK + VA-S20SY01-MCRY050:KICK + VA-S20SY01-MCRX080:KICK + VA-S20SY01-MCRY080:KICK + VA-S20SY02-MKDC010:KICK + VA-S20SY02-MKAC020:KICK + VA-S20SY02-MKDC030:KICK + VA-S20SY02-MKAC040:KICK + VA-S20SY02-MKDC050:KICK + VA-S20SY02-MCRX060:KICK + VA-S20SY02-MCRY060:KICK + VA-S20SY02-MCRX090:KICK + VA-S20SY02-MCRY090:KICK + VA-S20SY02-MCRX130:KICK + VA-S20SY02-MCRY130:KICK + VA-S20SY02-MCRX170:KICK + VA-S20SY02-MCRY170:KICK + VA-S20SY03-MCRX020:KICK + VA-S20SY03-MCRY020:KICK + VA-S20SY03-MCRX030:KICK + VA-S20SY03-MCRY030:KICK + VA-S20SY03-MCRX050:KICK + VA-S20SY03-MCRY050:KICK + VA-S20SY03-MCRX060:KICK + VA-S20SY03-MCRY060:KICK + VA-S20SY03-MCRX100:KICK + VA-S20SY03-MCRY100:KICK + VA-S30CB01-MCRX430:KICK + VA-S30CB01-MCRY430:KICK + VA-S30CB02-MCRX430:KICK + VA-S30CB02-MCRY430:KICK + VA-S30CB03-MCRX430:KICK + VA-S30CB03-MCRY430:KICK + VA-S30CB04-MCRX430:KICK + VA-S30CB04-MCRY430:KICK + VA-S30CB05-MCRX430:KICK + VA-S30CB05-MCRY430:KICK + VA-S30CB06-MCRX430:KICK + VA-S30CB06-MCRY430:KICK + VA-S30CB07-MCRX430:KICK + VA-S30CB07-MCRY430:KICK + VA-S30CB08-MCRX430:KICK + VA-S30CB08-MCRY430:KICK + VA-S30CB09-MCRX430:KICK + VA-S30CB09-MCRY430:KICK + VA-S30CB10-MCRX430:KICK + VA-S30CB10-MCRY430:KICK + VA-S30CB11-MCRX430:KICK + VA-S30CB11-MCRY430:KICK + VA-S30CB12-MCRX430:KICK + VA-S30CB12-MCRY430:KICK + VA-S30CB13-MCRX430:KICK + VA-S30CB13-MCRY430:KICK + VA-S30CB14-MCRX430:KICK + VA-S30CB14-MCRY430:KICK + VA-S30CB15-MCRX430:KICK + VA-S30CB15-MCRY430:KICK + VA-SARCL01-MCRX020:KICK + VA-SARCL01-MCRY020:KICK + VA-SARCL01-MCRX040:KICK + VA-SARCL01-MCRY040:KICK + VA-SARCL01-MCRX070:KICK + VA-SARCL01-MCRY070:KICK + VA-SARCL01-MCRX090:KICK + VA-SARCL01-MCRY090:KICK + VA-SARCL01-MCRX130:KICK + VA-SARCL01-MCRY130:KICK + VA-SARCL01-MCRX180:KICK + VA-SARCL01-MCRY180:KICK + VA-SARCL02-MCRX100:KICK + VA-SARCL02-MCRX120:KICK + VA-SARCL02-MCRY120:KICK + VA-SARCL02-MCRX200:KICK + VA-SARCL02-MCRX230:KICK + VA-SARCL02-MCRY230:KICK + VA-SARCL02-MCRX240:KICK + VA-SARCL02-MCRY240:KICK + VA-SARCL02-MCRX320:KICK + VA-SARCL02-MCRY320:KICK + VA-SARCL02-MCRX340:KICK + VA-SARCL02-MCRY340:KICK + VA-SARCL02-MCRX400:KICK + VA-SARCL02-MCRX450:KICK + VA-SARCL02-MCRY450:KICK + VA-SARCL02-MCRX480:KICK + VA-SARCL02-MCRY480:KICK + VA-SARCL02-MCRX500:KICK + VA-SARMA01-MCRX020:KICK + VA-SARMA01-MCRY020:KICK + VA-SARMA01-MCRX050:KICK + VA-SARMA01-MCRY050:KICK + VA-SARMA01-MCRX070:KICK + VA-SARMA01-MCRY070:KICK + VA-SARMA01-MCRX110:KICK + VA-SARMA01-MCRY110:KICK + VA-SARMA01-MCRX130:KICK + VA-SARMA01-MCRY130:KICK + VA-SARMA02-MCRX050:KICK + VA-SARMA02-MCRY050:KICK + VA-SARMA02-MCRX120:KICK + VA-SARMA02-MCRY120:KICK + VA-SARUN01-MCRX080:KICK + VA-SARUN01-MCRY080:KICK + VA-SARUN02-MCRX080:KICK + VA-SARUN02-MCRY080:KICK + VA-SARUN03-MCRX010:KICK + VA-SARUN03-MCRY010:KICK + VA-SARUN03-MCRX030:KICK + VA-SARUN03-MCRX040:KICK + VA-SARUN03-MCRY040:KICK + VA-SARUN03-MCRX080:KICK + VA-SARUN03-MCRY080:KICK + VA-SARUN04-MCRX010:KICK + VA-SARUN04-MCRY010:KICK + VA-SARUN04-MCRX030:KICK + VA-SARUN04-MCRX040:KICK + VA-SARUN04-MCRY040:KICK + VA-SARUN04-MCRX080:KICK + VA-SARUN04-MCRY080:KICK + VA-SARUN05-MCRX010:KICK + VA-SARUN05-MCRY010:KICK + VA-SARUN05-MCRX030:KICK + VA-SARUN05-MCRX040:KICK + VA-SARUN05-MCRY040:KICK + VA-SARUN05-MCRX080:KICK + VA-SARUN05-MCRY080:KICK + VA-SARUN06-MCRX010:KICK + VA-SARUN06-MCRY010:KICK + VA-SARUN06-MCRX030:KICK + VA-SARUN06-MCRX040:KICK + VA-SARUN06-MCRY040:KICK + VA-SARUN06-MCRX080:KICK + VA-SARUN06-MCRY080:KICK + VA-SARUN07-MCRX010:KICK + VA-SARUN07-MCRY010:KICK + VA-SARUN07-MCRX030:KICK + VA-SARUN07-MCRX040:KICK + VA-SARUN07-MCRY040:KICK + VA-SARUN07-MCRX080:KICK + VA-SARUN07-MCRY080:KICK + VA-SARUN08-MCRX010:KICK + VA-SARUN08-MCRY010:KICK + VA-SARUN08-MCRX030:KICK + VA-SARUN08-MCRX040:KICK + VA-SARUN08-MCRY040:KICK + VA-SARUN08-MCRX080:KICK + VA-SARUN08-MCRY080:KICK + VA-SARUN09-MCRX010:KICK + VA-SARUN09-MCRY010:KICK + VA-SARUN09-MCRX030:KICK + VA-SARUN09-MCRX040:KICK + VA-SARUN09-MCRY040:KICK + VA-SARUN09-MCRX080:KICK + VA-SARUN09-MCRY080:KICK + VA-SARUN10-MCRX010:KICK + VA-SARUN10-MCRY010:KICK + VA-SARUN10-MCRX030:KICK + VA-SARUN10-MCRX040:KICK + VA-SARUN10-MCRY040:KICK + VA-SARUN10-MCRX080:KICK + VA-SARUN10-MCRY080:KICK + VA-SARUN11-MCRX010:KICK + VA-SARUN11-MCRY010:KICK + VA-SARUN11-MCRX030:KICK + VA-SARUN11-MCRX040:KICK + VA-SARUN11-MCRY040:KICK + VA-SARUN11-MCRX080:KICK + VA-SARUN11-MCRY080:KICK + VA-SARUN12-MCRX010:KICK + VA-SARUN12-MCRY010:KICK + VA-SARUN12-MCRX030:KICK + VA-SARUN12-MCRX040:KICK + VA-SARUN12-MCRY040:KICK + VA-SARUN12-MCRX080:KICK + VA-SARUN12-MCRY080:KICK + VA-SARUN13-MCRX010:KICK + VA-SARUN13-MCRY010:KICK + VA-SARUN13-MCRX030:KICK + VA-SARUN13-MCRX040:KICK + VA-SARUN13-MCRY040:KICK + VA-SARUN13-MCRX080:KICK + VA-SARUN13-MCRY080:KICK + VA-SARUN14-MCRX010:KICK + VA-SARUN14-MCRY010:KICK + VA-SARUN14-MCRX030:KICK + VA-SARUN14-MCRX040:KICK + VA-SARUN14-MCRY040:KICK + VA-SARUN14-MCRX080:KICK + VA-SARUN14-MCRY080:KICK + VA-SARUN15-MCRX010:KICK + VA-SARUN15-MCRY010:KICK + VA-SARUN15-MCRX030:KICK + VA-SARUN15-MCRX040:KICK + VA-SARUN15-MCRY040:KICK + VA-SARUN15-MCRX080:KICK + VA-SARUN15-MCRY080:KICK + VA-SARUN16-MCRX080:KICK + VA-SARUN16-MCRY080:KICK + VA-SARUN17-MCRX080:KICK + VA-SARUN17-MCRY080:KICK + VA-SARUN18-MCRX080:KICK + VA-SARUN18-MCRY080:KICK + VA-SARUN19-MCRX080:KICK + VA-SARUN19-MCRY080:KICK + VA-SARUN20-MCRX080:KICK + VA-SARUN20-MCRY080:KICK + VA-SARBD01-MCRX020:KICK + VA-SARBD01-MCRY020:KICK + VA-SATSY01-MCRX020:KICK + VA-SATSY01-MCRY020:KICK + VA-SATSY01-MCRX040:KICK + VA-SATSY01-MCRY040:KICK + VA-SATSY01-MCRX070:KICK + VA-SATSY01-MCRY070:KICK + VA-SATSY01-MCRX090:KICK + VA-SATSY01-MCRY090:KICK + VA-SATSY01-MCRX210:KICK + VA-SATSY01-MCRY210:KICK + VA-SATSY01-MCRX230:KICK + VA-SATSY01-MCRY230:KICK + VA-SATSY01-MCRX260:KICK + VA-SATSY01-MCRY260:KICK + VA-SATSY01-MCRX280:KICK + VA-SATSY01-MCRY280:KICK + VA-SATSY01-MCRX300:KICK + VA-SATSY01-MCRY300:KICK + VA-SATSY02-MCRX010:KICK + VA-SATSY02-MCRY010:KICK + VA-SATSY02-MCRX100:KICK + VA-SATSY02-MCRX110:KICK + VA-SATSY02-MCRY110:KICK + VA-SATSY02-MCRX120:KICK + VA-SATSY02-MCRY120:KICK + VA-SATSY02-MCRX200:KICK + VA-SATSY02-MCRX230:KICK + VA-SATSY02-MCRY230:KICK + VA-SATSY03-MCRX010:KICK + VA-SATSY03-MCRY010:KICK + VA-SATSY03-MCRX040:KICK + VA-SATSY03-MCRY040:KICK + VA-SATSY03-MCRX070:KICK + VA-SATSY03-MCRY070:KICK + VA-SATSY03-MCRX100:KICK + VA-SATSY03-MCRY100:KICK + VA-SATSY03-MCRX130:KICK + VA-SATSY03-MCRY130:KICK + VA-SATCL01-MCRX100:KICK + VA-SATCL01-MCRX120:KICK + VA-SATCL01-MCRY120:KICK + VA-SATCL01-MCRX130:KICK + VA-SATCL01-MCRY130:KICK + VA-SATCL01-MCRX180:KICK + VA-SATCL01-MCRY180:KICK + VA-SATCL01-MCRX190:KICK + VA-SATCL01-MCRY190:KICK + VA-SATCL01-MCRX300:KICK + VA-SATDI01-MCRX040:KICK + VA-SATDI01-MCRY040:KICK + VA-SATDI01-MCRX050:KICK + VA-SATDI01-MCRY050:KICK + VA-SATDI01-MCRX220:KICK + VA-SATDI01-MCRY220:KICK + VA-SATDI01-MCRX230:KICK + VA-SATDI01-MCRY230:KICK + VA-SATDI01-MCRX250:KICK + VA-SATDI01-MCRY250:KICK + VA-SATDI01-MCRX260:KICK + VA-SATDI01-MCRY260:KICK + VA-SATDI01-MCRX280:KICK + VA-SATDI01-MCRY280:KICK + VA-SATDI01-MCRX300:KICK + VA-SATDI01-MCRY300:KICK + VA-SATMA01-MCRX050:KICK + VA-SATMA01-MCRY050:KICK + + + + VA-SINLH02-UIND230-MOT:YAW-READ + VA-SARUN03-UIND030-MOT:YAW-READ + VA-SARUN04-UIND030-MOT:YAW-READ + VA-SARUN05-UIND030-MOT:YAW-READ + VA-SARUN06-UIND030-MOT:YAW-READ + VA-SARUN07-UIND030-MOT:YAW-READ + VA-SARUN08-UIND030-MOT:YAW-READ + VA-SARUN09-UIND030-MOT:YAW-READ + VA-SARUN10-UIND030-MOT:YAW-READ + VA-SARUN11-UIND030-MOT:YAW-READ + VA-SARUN12-UIND030-MOT:YAW-READ + VA-SARUN13-UIND030-MOT:YAW-READ + VA-SARUN14-UIND030-MOT:YAW-READ + VA-SARUN15-UIND030-MOT:YAW-READ + + + + S10CB09-RSYS:SET-ACC-VOLT + S10CB09-RSYS:SET-BEAM-PHASE + S10CB09-RSYS:SET-KLY-POWER + S10CB09-RSYS:SET-VSUM-PHASE + S10CB09-RSYS:SET-STATION-STATE + S10CB09-RSYS:SET-VSUM-AMPLT-SCALE + S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB09-RSYS:SET-VOLT-POWER-SCALE + S10CB09-RSYS:GET-ACC-VOLT + S10CB09-RSYS:GET-BEAM-PHASE + S10CB09-RSYS:GET-KLY-POWER + S10CB09-RSYS:GET-VSUM-PHASE + S10CB09-RSYS:GET-STATION-MODE + S10CB09-RSYS:GET-STATION-STATE + S10CB09-RSYS:GET-VSUM-AMPLT + S10CB09-RSYS:GET-RF-READY-STATUS + S10CB09-RSYS:GET-BEAM-CALIB-STATUS + S10CB09-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + VA-S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + + + + VA-SINEG01-RSYS:SET-KLY-POWER + VA-SINSB01-RSYS:SET-KLY-POWER + VA-SINSB02-RSYS:SET-KLY-POWER + VA-SINSB03-RSYS:SET-KLY-POWER + VA-SINSB04-RSYS:SET-KLY-POWER + VA-SINXB01-RSYS:SET-KLY-POWER + VA-SINDI01-RSYS:SET-KLY-POWER + VA-S10CB01-RSYS:SET-KLY-POWER + VA-S10CB02-RSYS:SET-KLY-POWER + VA-S10CB03-RSYS:SET-KLY-POWER + VA-S10CB04-RSYS:SET-KLY-POWER + VA-S10CB05-RSYS:SET-KLY-POWER + VA-S10CB06-RSYS:SET-KLY-POWER + VA-S10CB07-RSYS:SET-KLY-POWER + VA-S10CB08-RSYS:SET-KLY-POWER + VA-S10CB09-RSYS:SET-KLY-POWER + VA-S20CB01-RSYS:SET-KLY-POWER + VA-S20CB02-RSYS:SET-KLY-POWER + VA-S20CB03-RSYS:SET-KLY-POWER + VA-S20CB04-RSYS:SET-KLY-POWER + VA-S30CB01-RSYS:SET-KLY-POWER + VA-S30CB02-RSYS:SET-KLY-POWER + VA-S30CB03-RSYS:SET-KLY-POWER + VA-S30CB04-RSYS:SET-KLY-POWER + VA-S30CB05-RSYS:SET-KLY-POWER + VA-S30CB06-RSYS:SET-KLY-POWER + VA-S30CB07-RSYS:SET-KLY-POWER + VA-S30CB08-RSYS:SET-KLY-POWER + VA-S30CB09-RSYS:SET-KLY-POWER + VA-S30CB10-RSYS:SET-KLY-POWER + VA-S30CB11-RSYS:SET-KLY-POWER + VA-S30CB12-RSYS:SET-KLY-POWER + VA-S30CB13-RSYS:SET-KLY-POWER + VA-S30CB14-RSYS:SET-KLY-POWER + + + + VA-S10BC02-DSCR220:ROI-XMAX + VA-S10BC02-DSCR220:ROI-XMIN + VA-S10BC02-DSCR220:ROI-YMAX + VA-S10BC02-DSCR220:ROI-YMIN + VA-S10BC02-DSCR220:pipeline-x_stats_gr-g_stddiv_egu + VA-S10BC02-DSCR220:pipeline-y_stats_gr-g_stddiv_egu + VA-S10BC02-DSCR220:pipeline-slice_h_stats-g_stddiv_egu + VA-S10BC02-DSCR220:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-DBPM340:SIM-Y1 + VA-SINSB01-DBPM150:SIM-Y1 + VA-SINSB02-DBPM150:SIM-Y1 + VA-SINLH01-DBPM060:SIM-Y1 + VA-SINLH02-DBPM210:SIM-Y1 + VA-SINLH02-DBPM240:SIM-Y1 + VA-SINLH03-DBPM010:SIM-Y1 + VA-SINLH03-DBPM050:SIM-Y1 + VA-SINLH03-DBPM090:SIM-Y1 + VA-SINSB03-DBPM120:SIM-Y1 + VA-SINSB03-DBPM220:SIM-Y1 + VA-SINSB04-DBPM120:SIM-Y1 + VA-SINSB04-DBPM220:SIM-Y1 + VA-SINSB05-DBPM120:SIM-Y1 + VA-SINSB05-DBPM220:SIM-Y1 + VA-SINXB01-DBPM120:SIM-Y1 + VA-SINBC01-DBPM010:SIM-Y1 + VA-SINBC01-DBPM030:SIM-Y1 + VA-SINBC01-DBPM080:SIM-Y1 + VA-SINBC01-DBPM100:SIM-Y1 + VA-SINBC02-DBPM140:SIM-Y1 + VA-SINBC02-DBPM320:SIM-Y1 + VA-SINDI01-DBPM010:SIM-Y1 + VA-SINDI01-DBPM060:SIM-Y1 + VA-SINDI02-DBPM010:SIM-Y1 + VA-SINDI02-DBPM040:SIM-Y1 + VA-SINDI02-DBPM080:SIM-Y1 + VA-S10CB01-DBPM220:SIM-Y1 + VA-S10CB01-DBPM420:SIM-Y1 + VA-S10CB02-DBPM220:SIM-Y1 + VA-S10CB02-DBPM420:SIM-Y1 + VA-S10DI01-DBPM110:SIM-Y1 + VA-S10CB03-DBPM220:SIM-Y1 + VA-S10CB03-DBPM420:SIM-Y1 + VA-S10CB04-DBPM220:SIM-Y1 + VA-S10CB04-DBPM420:SIM-Y1 + VA-S10CB05-DBPM220:SIM-Y1 + VA-S10CB05-DBPM420:SIM-Y1 + VA-S10CB06-DBPM220:SIM-Y1 + VA-S10CB06-DBPM420:SIM-Y1 + VA-S10CB07-DBPM220:SIM-Y1 + VA-S10CB07-DBPM420:SIM-Y1 + VA-S10CB08-DBPM220:SIM-Y1 + VA-S10CB08-DBPM420:SIM-Y1 + VA-S10CB09-DBPM220:SIM-Y1 + VA-S10BC01-DBPM010:SIM-Y1 + VA-S10BC01-DBPM050:SIM-Y1 + VA-S10BC01-DBPM090:SIM-Y1 + VA-S10BC02-DBPM140:SIM-Y1 + VA-S10BC02-DBPM320:SIM-Y1 + VA-S10MA01-DBPM010:SIM-Y1 + VA-S10MA01-DBPM060:SIM-Y1 + VA-S10MA01-DBPM120:SIM-Y1 + VA-S20CB01-DBPM420:SIM-Y1 + VA-S20CB02-DBPM420:SIM-Y1 + VA-S20CB03-DBPM420:SIM-Y1 + VA-S20SY01-DBPM010:SIM-Y1 + VA-S20SY01-DBPM040:SIM-Y1 + VA-S20SY01-DBPM060:SIM-Y1 + VA-S20SY02-DBPM080:SIM-Y1 + VA-S20SY02-DBPM120:SIM-Y1 + VA-S20SY02-DBPM150:SIM-Y1 + VA-S20SY03-DBPM010:SIM-Y1 + VA-S20SY03-DBPM040:SIM-Y1 + VA-S20SY03-DBPM080:SIM-Y1 + VA-S30CB01-DBPM420:SIM-Y1 + VA-S30CB02-DBPM420:SIM-Y1 + VA-S30CB03-DBPM420:SIM-Y1 + VA-S30CB04-DBPM420:SIM-Y1 + VA-S30CB05-DBPM420:SIM-Y1 + VA-S30CB06-DBPM420:SIM-Y1 + VA-S30CB07-DBPM420:SIM-Y1 + VA-S30CB08-DBPM420:SIM-Y1 + VA-S30CB09-DBPM420:SIM-Y1 + VA-S30CB10-DBPM420:SIM-Y1 + VA-S30CB11-DBPM420:SIM-Y1 + VA-S30CB12-DBPM420:SIM-Y1 + VA-S30CB13-DBPM420:SIM-Y1 + VA-S30CB14-DBPM420:SIM-Y1 + VA-S30CB15-DBPM420:SIM-Y1 + VA-SARCL01-DBPM010:SIM-Y1 + VA-SARCL01-DBPM060:SIM-Y1 + VA-SARCL01-DBPM120:SIM-Y1 + VA-SARCL01-DBPM150:SIM-Y1 + VA-SARCL02-DBPM110:SIM-Y1 + VA-SARCL02-DBPM220:SIM-Y1 + VA-SARCL02-DBPM260:SIM-Y1 + VA-SARCL02-DBPM330:SIM-Y1 + VA-SARCL02-DBPM470:SIM-Y1 + VA-SARMA01-DBPM040:SIM-Y1 + VA-SARMA01-DBPM100:SIM-Y1 + VA-SARMA02-DBPM010:SIM-Y1 + VA-SARMA02-DBPM020:SIM-Y1 + VA-SARMA02-DBPM040:SIM-Y1 + VA-SARMA02-DBPM110:SIM-Y1 + VA-SARUN01-DBPM070:SIM-Y1 + VA-SARUN02-DBPM070:SIM-Y1 + VA-SARUN03-DBPM070:SIM-Y1 + VA-SARUN04-DBPM070:SIM-Y1 + VA-SARUN05-DBPM070:SIM-Y1 + VA-SARUN06-DBPM070:SIM-Y1 + VA-SARUN07-DBPM070:SIM-Y1 + VA-SARUN08-DBPM070:SIM-Y1 + VA-SARUN09-DBPM070:SIM-Y1 + VA-SARUN10-DBPM070:SIM-Y1 + VA-SARUN11-DBPM070:SIM-Y1 + VA-SARUN12-DBPM070:SIM-Y1 + VA-SARUN13-DBPM070:SIM-Y1 + VA-SARUN14-DBPM070:SIM-Y1 + VA-SARUN15-DBPM070:SIM-Y1 + VA-SARUN16-DBPM070:SIM-Y1 + VA-SARUN17-DBPM070:SIM-Y1 + VA-SARUN18-DBPM070:SIM-Y1 + VA-SARUN19-DBPM070:SIM-Y1 + VA-SARUN20-DBPM070:SIM-Y1 + VA-SARBD01-DBPM040:SIM-Y1 + VA-SATSY01-DBPM010:SIM-Y1 + VA-SATSY01-DBPM060:SIM-Y1 + VA-SATSY01-DBPM100:SIM-Y1 + VA-SATSY01-DBPM240:SIM-Y1 + VA-SATSY01-DBPM290:SIM-Y1 + VA-SATSY02-DBPM020:SIM-Y1 + VA-SATSY02-DBPM210:SIM-Y1 + VA-SATSY03-DBPM030:SIM-Y1 + VA-SATSY03-DBPM060:SIM-Y1 + VA-SATSY03-DBPM090:SIM-Y1 + VA-SATSY03-DBPM120:SIM-Y1 + VA-SATCL01-DBPM140:SIM-Y1 + VA-SATDI01-DBPM030:SIM-Y1 + VA-SATDI01-DBPM060:SIM-Y1 + VA-SATDI01-DBPM110:SIM-Y1 + VA-SATDI01-DBPM240:SIM-Y1 + VA-SATDI01-DBPM270:SIM-Y1 + VA-SATDI01-DBPM310:SIM-Y1 + VA-SATMA01-DBPM010:SIM-Y1 + VA-SATMA01-DBPM020:SIM-Y1 + VA-SATMA01-DBPM040:SIM-Y1 + VA-S10BD01-DBPM020:SIM-Y1 + VA-SARBD02-DBPM010:SIM-Y1 + VA-SARBD02-DBPM040:SIM-Y1 + + + + VA-SINEG01-DSCR350:ROI-XMAX + VA-SINEG01-DSCR350:ROI-XMIN + VA-SINEG01-DSCR350:ROI-YMAX + VA-SINEG01-DSCR350:ROI-YMIN + VA-SINEG01-DSCR350:pipeline-x_stats_gr-g_stddiv_egu + VA-SINEG01-DSCR350:pipeline-y_stats_gr-g_stddiv_egu + VA-SINEG01-DSCR350:pipeline-slice_h_stats-g_stddiv_egu + VA-SINEG01-DSCR350:pipeline-slice_v_stats-g_stddiv_egu + + + + S10CB06-RSYS:SET-ACC-VOLT + S10CB06-RSYS:SET-BEAM-PHASE + S10CB06-RSYS:SET-KLY-POWER + S10CB06-RSYS:SET-VSUM-PHASE + S10CB06-RSYS:SET-STATION-STATE + S10CB06-RSYS:SET-VSUM-AMPLT-SCALE + S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB06-RSYS:SET-VOLT-POWER-SCALE + S10CB06-RSYS:GET-ACC-VOLT + S10CB06-RSYS:GET-BEAM-PHASE + S10CB06-RSYS:GET-KLY-POWER + S10CB06-RSYS:GET-VSUM-PHASE + S10CB06-RSYS:GET-STATION-MODE + S10CB06-RSYS:GET-STATION-STATE + S10CB06-RSYS:GET-VSUM-AMPLT + S10CB06-RSYS:GET-RF-READY-STATUS + S10CB06-RSYS:GET-BEAM-CALIB-STATUS + S10CB06-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-RSYS:GET-RF-READY-STATUS + VA-SINSB01-RSYS:GET-RF-READY-STATUS + VA-SINSB02-RSYS:GET-RF-READY-STATUS + VA-SINSB03-RSYS:GET-RF-READY-STATUS + VA-SINSB04-RSYS:GET-RF-READY-STATUS + VA-SINXB01-RSYS:GET-RF-READY-STATUS + VA-SINDI01-RSYS:GET-RF-READY-STATUS + VA-S10CB01-RSYS:GET-RF-READY-STATUS + VA-S10CB02-RSYS:GET-RF-READY-STATUS + VA-S10CB03-RSYS:GET-RF-READY-STATUS + VA-S10CB04-RSYS:GET-RF-READY-STATUS + VA-S10CB05-RSYS:GET-RF-READY-STATUS + VA-S10CB06-RSYS:GET-RF-READY-STATUS + VA-S10CB07-RSYS:GET-RF-READY-STATUS + VA-S10CB08-RSYS:GET-RF-READY-STATUS + VA-S10CB09-RSYS:GET-RF-READY-STATUS + VA-S20CB01-RSYS:GET-RF-READY-STATUS + VA-S20CB02-RSYS:GET-RF-READY-STATUS + VA-S20CB03-RSYS:GET-RF-READY-STATUS + VA-S20CB04-RSYS:GET-RF-READY-STATUS + VA-S30CB01-RSYS:GET-RF-READY-STATUS + VA-S30CB02-RSYS:GET-RF-READY-STATUS + VA-S30CB03-RSYS:GET-RF-READY-STATUS + VA-S30CB04-RSYS:GET-RF-READY-STATUS + VA-S30CB05-RSYS:GET-RF-READY-STATUS + VA-S30CB06-RSYS:GET-RF-READY-STATUS + VA-S30CB07-RSYS:GET-RF-READY-STATUS + VA-S30CB08-RSYS:GET-RF-READY-STATUS + VA-S30CB09-RSYS:GET-RF-READY-STATUS + VA-S30CB10-RSYS:GET-RF-READY-STATUS + VA-S30CB11-RSYS:GET-RF-READY-STATUS + VA-S30CB12-RSYS:GET-RF-READY-STATUS + VA-S30CB13-RSYS:GET-RF-READY-STATUS + VA-S30CB14-RSYS:GET-RF-READY-STATUS + + + + SINSB04-RSYS:SET-ACC-VOLT + SINSB04-RSYS:SET-BEAM-PHASE + SINSB04-RSYS:SET-KLY-POWER + SINSB04-RSYS:SET-VSUM-PHASE + SINSB04-RSYS:SET-STATION-STATE + SINSB04-RSYS:SET-VSUM-AMPLT-SCALE + SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + SINSB04-RSYS:SET-VOLT-POWER-SCALE + SINSB04-RSYS:GET-ACC-VOLT + SINSB04-RSYS:GET-BEAM-PHASE + SINSB04-RSYS:GET-KLY-POWER + SINSB04-RSYS:GET-VSUM-PHASE + SINSB04-RSYS:GET-STATION-MODE + SINSB04-RSYS:GET-STATION-STATE + SINSB04-RSYS:GET-VSUM-AMPLT + SINSB04-RSYS:GET-RF-READY-STATUS + SINSB04-RSYS:GET-BEAM-CALIB-STATUS + SINSB04-RSYS:GET-VSUM-PHASE-OFFSET + + + + S20CB02-RSYS:SET-ACC-VOLT + S20CB02-RSYS:SET-BEAM-PHASE + S20CB02-RSYS:SET-KLY-POWER + S20CB02-RSYS:SET-VSUM-PHASE + S20CB02-RSYS:SET-STATION-STATE + S20CB02-RSYS:SET-VSUM-AMPLT-SCALE + S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S20CB02-RSYS:SET-VOLT-POWER-SCALE + S20CB02-RSYS:GET-ACC-VOLT + S20CB02-RSYS:GET-BEAM-PHASE + S20CB02-RSYS:GET-KLY-POWER + S20CB02-RSYS:GET-VSUM-PHASE + S20CB02-RSYS:GET-STATION-MODE + S20CB02-RSYS:GET-STATION-STATE + S20CB02-RSYS:GET-VSUM-AMPLT + S20CB02-RSYS:GET-RF-READY-STATUS + S20CB02-RSYS:GET-BEAM-CALIB-STATUS + S20CB02-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINLH02-UIND230-MOT:PITCH-SET + VA-SARUN03-UIND030-MOT:PITCH-SET + VA-SARUN04-UIND030-MOT:PITCH-SET + VA-SARUN05-UIND030-MOT:PITCH-SET + VA-SARUN06-UIND030-MOT:PITCH-SET + VA-SARUN07-UIND030-MOT:PITCH-SET + VA-SARUN08-UIND030-MOT:PITCH-SET + VA-SARUN09-UIND030-MOT:PITCH-SET + VA-SARUN10-UIND030-MOT:PITCH-SET + VA-SARUN11-UIND030-MOT:PITCH-SET + VA-SARUN12-UIND030-MOT:PITCH-SET + VA-SARUN13-UIND030-MOT:PITCH-SET + VA-SARUN14-UIND030-MOT:PITCH-SET + VA-SARUN15-UIND030-MOT:PITCH-SET + + + + VA-SARCL02-DSCR280:ROI-XMAX + VA-SARCL02-DSCR280:ROI-XMIN + VA-SARCL02-DSCR280:ROI-YMAX + VA-SARCL02-DSCR280:ROI-YMIN + VA-SARCL02-DSCR280:pipeline-x_stats_gr-g_stddiv_egu + VA-SARCL02-DSCR280:pipeline-y_stats_gr-g_stddiv_egu + VA-SARCL02-DSCR280:pipeline-slice_h_stats-g_stddiv_egu + VA-SARCL02-DSCR280:pipeline-slice_v_stats-g_stddiv_egu + + + + S30CB14-RSYS:SET-ACC-VOLT + S30CB14-RSYS:SET-BEAM-PHASE + S30CB14-RSYS:SET-KLY-POWER + S30CB14-RSYS:SET-VSUM-PHASE + S30CB14-RSYS:SET-STATION-STATE + S30CB14-RSYS:SET-VSUM-AMPLT-SCALE + S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB14-RSYS:SET-VOLT-POWER-SCALE + S30CB14-RSYS:GET-ACC-VOLT + S30CB14-RSYS:GET-BEAM-PHASE + S30CB14-RSYS:GET-KLY-POWER + S30CB14-RSYS:GET-VSUM-PHASE + S30CB14-RSYS:GET-STATION-MODE + S30CB14-RSYS:GET-STATION-STATE + S30CB14-RSYS:GET-VSUM-AMPLT + S30CB14-RSYS:GET-RF-READY-STATUS + S30CB14-RSYS:GET-BEAM-CALIB-STATUS + S30CB14-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SARBD01-DSCR050:ROI-XMAX + VA-SARBD01-DSCR050:ROI-XMIN + VA-SARBD01-DSCR050:ROI-YMAX + VA-SARBD01-DSCR050:ROI-YMIN + VA-SARBD01-DSCR050:pipeline-x_stats_gr-g_stddiv_egu + VA-SARBD01-DSCR050:pipeline-y_stats_gr-g_stddiv_egu + VA-SARBD01-DSCR050:pipeline-slice_h_stats-g_stddiv_egu + VA-SARBD01-DSCR050:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SARUN03-MQUA020-MOT:NINTERVY + VA-SARUN03-MQUA050-MOT:NINTERVY + VA-SARUN04-MQUA020-MOT:NINTERVY + VA-SARUN04-MQUA050-MOT:NINTERVY + VA-SARUN05-MQUA020-MOT:NINTERVY + VA-SARUN05-MQUA050-MOT:NINTERVY + VA-SARUN06-MQUA020-MOT:NINTERVY + VA-SARUN06-MQUA050-MOT:NINTERVY + VA-SARUN07-MQUA020-MOT:NINTERVY + VA-SARUN07-MQUA050-MOT:NINTERVY + VA-SARUN08-MQUA020-MOT:NINTERVY + VA-SARUN08-MQUA050-MOT:NINTERVY + VA-SARUN09-MQUA020-MOT:NINTERVY + VA-SARUN09-MQUA050-MOT:NINTERVY + VA-SARUN10-MQUA020-MOT:NINTERVY + VA-SARUN10-MQUA050-MOT:NINTERVY + VA-SARUN11-MQUA020-MOT:NINTERVY + VA-SARUN11-MQUA050-MOT:NINTERVY + VA-SARUN12-MQUA020-MOT:NINTERVY + VA-SARUN12-MQUA050-MOT:NINTERVY + VA-SARUN13-MQUA020-MOT:NINTERVY + VA-SARUN13-MQUA050-MOT:NINTERVY + VA-SARUN14-MQUA020-MOT:NINTERVY + VA-SARUN14-MQUA050-MOT:NINTERVY + VA-SARUN15-MQUA020-MOT:NINTERVY + VA-SARUN15-MQUA050-MOT:NINTERVY + + + + VA-SINLH02-UIND230-MOT:PITCH-READ + VA-SARUN03-UIND030-MOT:PITCH-READ + VA-SARUN04-UIND030-MOT:PITCH-READ + VA-SARUN05-UIND030-MOT:PITCH-READ + VA-SARUN06-UIND030-MOT:PITCH-READ + VA-SARUN07-UIND030-MOT:PITCH-READ + VA-SARUN08-UIND030-MOT:PITCH-READ + VA-SARUN09-UIND030-MOT:PITCH-READ + VA-SARUN10-UIND030-MOT:PITCH-READ + VA-SARUN11-UIND030-MOT:PITCH-READ + VA-SARUN12-UIND030-MOT:PITCH-READ + VA-SARUN13-UIND030-MOT:PITCH-READ + VA-SARUN14-UIND030-MOT:PITCH-READ + VA-SARUN15-UIND030-MOT:PITCH-READ + + + + VA-SINSB03-DSCR110:ROI-XMAX + VA-SINSB03-DSCR110:ROI-XMIN + VA-SINSB03-DSCR110:ROI-YMAX + VA-SINSB03-DSCR110:ROI-YMIN + VA-SINSB03-DSCR110:pipeline-x_stats_gr-g_stddiv_egu + VA-SINSB03-DSCR110:pipeline-y_stats_gr-g_stddiv_egu + VA-SINSB03-DSCR110:pipeline-slice_h_stats-g_stddiv_egu + VA-SINSB03-DSCR110:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-DSCR190:ROI-XMAX + VA-SINEG01-DSCR190:ROI-XMIN + VA-SINEG01-DSCR190:ROI-YMAX + VA-SINEG01-DSCR190:ROI-YMIN + VA-SINEG01-DSCR190:pipeline-x_stats_gr-g_stddiv_egu + VA-SINEG01-DSCR190:pipeline-y_stats_gr-g_stddiv_egu + VA-SINEG01-DSCR190:pipeline-slice_h_stats-g_stddiv_egu + VA-SINEG01-DSCR190:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-MQUA140:KL + VA-SINEG01-MQUA150:KL + VA-SINEG01-MQUA310:KL + VA-SINEG01-MQUA320:KL + VA-SINLH01-MQUA020:KL + VA-SINLH01-MQUA030:KL + VA-SINLH01-MQUA040:KL + VA-SINLH01-MQUA050:KL + VA-SINLH01-MQUA070:KL + VA-SINLH02-MQUA010:KL + VA-SINLH02-MQUA410:KL + VA-SINLH03-MQUA030:KL + VA-SINLH03-MQUA040:KL + VA-SINLH03-MQUA060:KL + VA-SINLH03-MQUA080:KL + VA-SINSB03-MQUA130:KL + VA-SINSB03-MQUA230:KL + VA-SINSB04-MQUA130:KL + VA-SINSB04-MQUA230:KL + VA-SINSB05-MQUA130:KL + VA-SINSB05-MQUA230:KL + VA-SINBC01-MQUA020:KL + VA-SINBC01-MQUA050:KL + VA-SINBC01-MQUA070:KL + VA-SINBC01-MQUA090:KL + VA-SINBC01-MQUA110:KL + VA-SINBC02-MQUA110:KL + VA-SINBC02-MQUA120:KL + VA-SINBC02-MQUA340:KL + VA-SINBC02-MQUA350:KL + VA-SINDI01-MQUA020:KL + VA-SINDI01-MQUA030:KL + VA-SINDI01-MQUA070:KL + VA-SINDI02-MQUA020:KL + VA-SINDI02-MQUA030:KL + VA-SINDI02-MQUA050:KL + VA-SINDI02-MQUA060:KL + VA-SINDI02-MQUA070:KL + VA-SINDI02-MQUA090:KL + VA-S10CB01-MQUA230:KL + VA-S10CB01-MQUA430:KL + VA-S10CB02-MQUA230:KL + VA-S10CB02-MQUA430:KL + VA-S10DI01-MQUA030:KL + VA-S10DI01-MQUA120:KL + VA-S10CB03-MQUA230:KL + VA-S10CB03-MQUA430:KL + VA-S10CB04-MQUA230:KL + VA-S10CB04-MQUA430:KL + VA-S10CB05-MQUA230:KL + VA-S10CB05-MQUA430:KL + VA-S10CB06-MQUA230:KL + VA-S10CB06-MQUA430:KL + VA-S10CB07-MQUA230:KL + VA-S10CB07-MQUA430:KL + VA-S10CB08-MQUA230:KL + VA-S10CB08-MQUA430:KL + VA-S10CB09-MQUA230:KL + VA-S10BC01-MQUA020:KL + VA-S10BC01-MQUA040:KL + VA-S10BC01-MQUA060:KL + VA-S10BC01-MQUA080:KL + VA-S10BC01-MQUA100:KL + VA-S10BC02-MQUA110:KL + VA-S10BC02-MQUA120:KL + VA-S10BC02-MQUA340:KL + VA-S10BC02-MQUA350:KL + VA-S10MA01-MQUA020:KL + VA-S10MA01-MQUA050:KL + VA-S10MA01-MQUA070:KL + VA-S10MA01-MQUA110:KL + VA-S10MA01-MQUA130:KL + VA-S20CB01-MQUA430:KL + VA-S20CB02-MQUA430:KL + VA-S20CB03-MQUA430:KL + VA-S20SY01-MQUA020:KL + VA-S20SY01-MQUA030:KL + VA-S20SY01-MQUA050:KL + VA-S20SY01-MQUA080:KL + VA-S20SY02-MQUA070:KL + VA-S20SY02-MQUA100:KL + VA-S20SY02-MQUA140:KL + VA-S20SY02-MQUA180:KL + VA-S20SY03-MQUA020:KL + VA-S20SY03-MQUA030:KL + VA-S20SY03-MQUA050:KL + VA-S20SY03-MQUA060:KL + VA-S20SY03-MQUA100:KL + VA-S30CB01-MQUA430:KL + VA-S30CB02-MQUA430:KL + VA-S30CB03-MQUA430:KL + VA-S30CB04-MQUA430:KL + VA-S30CB05-MQUA430:KL + VA-S30CB06-MQUA430:KL + VA-S30CB07-MQUA430:KL + VA-S30CB08-MQUA430:KL + VA-S30CB09-MQUA430:KL + VA-S30CB10-MQUA430:KL + VA-S30CB11-MQUA430:KL + VA-S30CB12-MQUA430:KL + VA-S30CB13-MQUA430:KL + VA-S30CB14-MQUA430:KL + VA-S30CB15-MQUA430:KL + VA-SARCL01-MQUA020:KL + VA-SARCL01-MQUA050:KL + VA-SARCL01-MQUA080:KL + VA-SARCL01-MQUA100:KL + VA-SARCL01-MQUA140:KL + VA-SARCL01-MQUA190:KL + VA-SARCL02-MQUA130:KL + VA-SARCL02-MQUA150:KL + VA-SARCL02-MQUA160:KL + VA-SARCL02-MQUA210:KL + VA-SARCL02-MQUA250:KL + VA-SARCL02-MQUA300:KL + VA-SARCL02-MQUA310:KL + VA-SARCL02-MQUA350:KL + VA-SARCL02-MQUA420:KL + VA-SARCL02-MQUA430:KL + VA-SARCL02-MQUA460:KL + VA-SARMA01-MQUA010:KL + VA-SARMA01-MQUA060:KL + VA-SARMA01-MQUA080:KL + VA-SARMA01-MQUA120:KL + VA-SARMA01-MQUA140:KL + VA-SARMA02-MQUA050:KL + VA-SARMA02-MQUA120:KL + VA-SARUN01-MQUA080:KL + VA-SARUN02-MQUA080:KL + VA-SARUN03-MQUA080:KL + VA-SARUN04-MQUA080:KL + VA-SARUN05-MQUA080:KL + VA-SARUN06-MQUA080:KL + VA-SARUN07-MQUA080:KL + VA-SARUN08-MQUA080:KL + VA-SARUN09-MQUA080:KL + VA-SARUN10-MQUA080:KL + VA-SARUN11-MQUA080:KL + VA-SARUN12-MQUA080:KL + VA-SARUN13-MQUA080:KL + VA-SARUN14-MQUA080:KL + VA-SARUN15-MQUA080:KL + VA-SARUN16-MQUA080:KL + VA-SARUN17-MQUA080:KL + VA-SARUN18-MQUA080:KL + VA-SARUN19-MQUA080:KL + VA-SARUN20-MQUA080:KL + VA-SARBD01-MQUA020:KL + VA-SATSY01-MQUA020:KL + VA-SATSY01-MQUA030:KL + VA-SATSY01-MQUA040:KL + VA-SATSY01-MQUA070:KL + VA-SATSY01-MQUA090:KL + VA-SATSY01-MQUA210:KL + VA-SATSY01-MQUA230:KL + VA-SATSY01-MQUA260:KL + VA-SATSY01-MQUA270:KL + VA-SATSY01-MQUA280:KL + VA-SATSY01-MQUA300:KL + VA-SATSY02-MQUA010:KL + VA-SATSY02-MQUA110:KL + VA-SATSY02-MQUA120:KL + VA-SATSY02-MQUA230:KL + VA-SATSY03-MQUA010:KL + VA-SATSY03-MQUA040:KL + VA-SATSY03-MQUA070:KL + VA-SATSY03-MQUA100:KL + VA-SATSY03-MQUA130:KL + VA-SATCL01-MQUA120:KL + VA-SATCL01-MQUA130:KL + VA-SATCL01-MQUA180:KL + VA-SATCL01-MQUA190:KL + VA-SATDI01-MQUA040:KL + VA-SATDI01-MQUA050:KL + VA-SATDI01-MQUA220:KL + VA-SATDI01-MQUA230:KL + VA-SATDI01-MQUA250:KL + VA-SATDI01-MQUA260:KL + VA-SATDI01-MQUA280:KL + VA-SATDI01-MQUA300:KL + VA-SATMA01-MQUA050:KL + VA-S10BD01-MQUA010:KL + VA-SARBD02-MQUA030:KL + + + + S10CB02-RSYS:SET-ACC-VOLT + S10CB02-RSYS:SET-BEAM-PHASE + S10CB02-RSYS:SET-KLY-POWER + S10CB02-RSYS:SET-VSUM-PHASE + S10CB02-RSYS:SET-STATION-STATE + S10CB02-RSYS:SET-VSUM-AMPLT-SCALE + S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB02-RSYS:SET-VOLT-POWER-SCALE + S10CB02-RSYS:GET-ACC-VOLT + S10CB02-RSYS:GET-BEAM-PHASE + S10CB02-RSYS:GET-KLY-POWER + S10CB02-RSYS:GET-VSUM-PHASE + S10CB02-RSYS:GET-STATION-MODE + S10CB02-RSYS:GET-STATION-STATE + S10CB02-RSYS:GET-VSUM-AMPLT + S10CB02-RSYS:GET-RF-READY-STATUS + S10CB02-RSYS:GET-BEAM-CALIB-STATUS + S10CB02-RSYS:GET-VSUM-PHASE-OFFSET + + + + S30CB10-RSYS:SET-ACC-VOLT + S30CB10-RSYS:SET-BEAM-PHASE + S30CB10-RSYS:SET-KLY-POWER + S30CB10-RSYS:SET-VSUM-PHASE + S30CB10-RSYS:SET-STATION-STATE + S30CB10-RSYS:SET-VSUM-AMPLT-SCALE + S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB10-RSYS:SET-VOLT-POWER-SCALE + S30CB10-RSYS:GET-ACC-VOLT + S30CB10-RSYS:GET-BEAM-PHASE + S30CB10-RSYS:GET-KLY-POWER + S30CB10-RSYS:GET-VSUM-PHASE + S30CB10-RSYS:GET-STATION-MODE + S30CB10-RSYS:GET-STATION-STATE + S30CB10-RSYS:GET-VSUM-AMPLT + S30CB10-RSYS:GET-RF-READY-STATUS + S30CB10-RSYS:GET-BEAM-CALIB-STATUS + S30CB10-RSYS:GET-VSUM-PHASE-OFFSET + + + + SINSB02-RSYS:SET-ACC-VOLT + SINSB02-RSYS:SET-BEAM-PHASE + SINSB02-RSYS:SET-KLY-POWER + SINSB02-RSYS:SET-VSUM-PHASE + SINSB02-RSYS:SET-STATION-STATE + SINSB02-RSYS:SET-VSUM-AMPLT-SCALE + SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + SINSB02-RSYS:SET-VOLT-POWER-SCALE + SINSB02-RSYS:GET-ACC-VOLT + SINSB02-RSYS:GET-BEAM-PHASE + SINSB02-RSYS:GET-KLY-POWER + SINSB02-RSYS:GET-VSUM-PHASE + SINSB02-RSYS:GET-STATION-MODE + SINSB02-RSYS:GET-STATION-STATE + SINSB02-RSYS:GET-VSUM-AMPLT + SINSB02-RSYS:GET-RF-READY-STATUS + SINSB02-RSYS:GET-BEAM-CALIB-STATUS + SINSB02-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINBD01-DSCR010:ROI-XMAX + VA-SINBD01-DSCR010:ROI-XMIN + VA-SINBD01-DSCR010:ROI-YMAX + VA-SINBD01-DSCR010:ROI-YMIN + VA-SINBD01-DSCR010:pipeline-x_stats_gr-g_stddiv_egu + VA-SINBD01-DSCR010:pipeline-y_stats_gr-g_stddiv_egu + VA-SINBD01-DSCR010:pipeline-slice_h_stats-g_stddiv_egu + VA-SINBD01-DSCR010:pipeline-slice_v_stats-g_stddiv_egu + + + + S30CB04-RSYS:SET-ACC-VOLT + S30CB04-RSYS:SET-BEAM-PHASE + S30CB04-RSYS:SET-KLY-POWER + S30CB04-RSYS:SET-VSUM-PHASE + S30CB04-RSYS:SET-STATION-STATE + S30CB04-RSYS:SET-VSUM-AMPLT-SCALE + S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB04-RSYS:SET-VOLT-POWER-SCALE + S30CB04-RSYS:GET-ACC-VOLT + S30CB04-RSYS:GET-BEAM-PHASE + S30CB04-RSYS:GET-KLY-POWER + S30CB04-RSYS:GET-VSUM-PHASE + S30CB04-RSYS:GET-STATION-MODE + S30CB04-RSYS:GET-STATION-STATE + S30CB04-RSYS:GET-VSUM-AMPLT + S30CB04-RSYS:GET-RF-READY-STATUS + S30CB04-RSYS:GET-BEAM-CALIB-STATUS + S30CB04-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINLH03-DSCR070:ROI-XMAX + VA-SINLH03-DSCR070:ROI-XMIN + VA-SINLH03-DSCR070:ROI-YMAX + VA-SINLH03-DSCR070:ROI-YMIN + VA-SINLH03-DSCR070:pipeline-x_stats_gr-g_stddiv_egu + VA-SINLH03-DSCR070:pipeline-y_stats_gr-g_stddiv_egu + VA-SINLH03-DSCR070:pipeline-slice_h_stats-g_stddiv_egu + VA-SINLH03-DSCR070:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINLH02-UIND230-MOT:Y-READ + VA-SARUN03-UIND030-MOT:Y-READ + VA-SARUN04-UIND030-MOT:Y-READ + VA-SARUN05-UIND030-MOT:Y-READ + VA-SARUN06-UIND030-MOT:Y-READ + VA-SARUN07-UIND030-MOT:Y-READ + VA-SARUN08-UIND030-MOT:Y-READ + VA-SARUN09-UIND030-MOT:Y-READ + VA-SARUN10-UIND030-MOT:Y-READ + VA-SARUN11-UIND030-MOT:Y-READ + VA-SARUN12-UIND030-MOT:Y-READ + VA-SARUN13-UIND030-MOT:Y-READ + VA-SARUN14-UIND030-MOT:Y-READ + VA-SARUN15-UIND030-MOT:Y-READ + + + + VA-SINEG01-RSYS:GET-STATION-MODE + VA-SINSB01-RSYS:GET-STATION-MODE + VA-SINSB02-RSYS:GET-STATION-MODE + VA-SINSB03-RSYS:GET-STATION-MODE + VA-SINSB04-RSYS:GET-STATION-MODE + VA-SINXB01-RSYS:GET-STATION-MODE + VA-SINDI01-RSYS:GET-STATION-MODE + VA-S10CB01-RSYS:GET-STATION-MODE + VA-S10CB02-RSYS:GET-STATION-MODE + VA-S10CB03-RSYS:GET-STATION-MODE + VA-S10CB04-RSYS:GET-STATION-MODE + VA-S10CB05-RSYS:GET-STATION-MODE + VA-S10CB06-RSYS:GET-STATION-MODE + VA-S10CB07-RSYS:GET-STATION-MODE + VA-S10CB08-RSYS:GET-STATION-MODE + VA-S10CB09-RSYS:GET-STATION-MODE + VA-S20CB01-RSYS:GET-STATION-MODE + VA-S20CB02-RSYS:GET-STATION-MODE + VA-S20CB03-RSYS:GET-STATION-MODE + VA-S20CB04-RSYS:GET-STATION-MODE + VA-S30CB01-RSYS:GET-STATION-MODE + VA-S30CB02-RSYS:GET-STATION-MODE + VA-S30CB03-RSYS:GET-STATION-MODE + VA-S30CB04-RSYS:GET-STATION-MODE + VA-S30CB05-RSYS:GET-STATION-MODE + VA-S30CB06-RSYS:GET-STATION-MODE + VA-S30CB07-RSYS:GET-STATION-MODE + VA-S30CB08-RSYS:GET-STATION-MODE + VA-S30CB09-RSYS:GET-STATION-MODE + VA-S30CB10-RSYS:GET-STATION-MODE + VA-S30CB11-RSYS:GET-STATION-MODE + VA-S30CB12-RSYS:GET-STATION-MODE + VA-S30CB13-RSYS:GET-STATION-MODE + VA-S30CB14-RSYS:GET-STATION-MODE + + + + VA-SINEG01-MCRX120:I-SET + VA-SINEG01-MCRY120:I-SET + VA-SINEG01-MCRX160:I-SET + VA-SINEG01-MCRY160:I-SET + VA-SINEG01-MCRX180:I-SET + VA-SINEG01-MCRY180:I-SET + VA-SINEG01-MCRX200:I-SET + VA-SINEG01-MCRY200:I-SET + VA-SINEG01-MCRX220:I-SET + VA-SINEG01-MCRY220:I-SET + VA-SINSB01-MCRX010:I-SET + VA-SINSB01-MCRY010:I-SET + VA-SINSB02-MCRX010:I-SET + VA-SINSB02-MCRY010:I-SET + VA-SINLH01-MCRX020:I-SET + VA-SINLH01-MCRY020:I-SET + VA-SINLH01-MCRX050:I-SET + VA-SINLH01-MCRY050:I-SET + VA-SINLH02-MCRX010:I-SET + VA-SINLH02-MCRY010:I-SET + VA-SINLH02-MCRX100:I-SET + VA-SINLH02-MCRX200:I-SET + VA-SINLH02-MCRX300:I-SET + VA-SINLH02-MCRX400:I-SET + VA-SINLH02-MCRX410:I-SET + VA-SINLH02-MCRY410:I-SET + VA-SINLH03-MCRX040:I-SET + VA-SINLH03-MCRY040:I-SET + VA-SINLH03-MCRX080:I-SET + VA-SINLH03-MCRY080:I-SET + VA-SINSB03-MCRX130:I-SET + VA-SINSB03-MCRY130:I-SET + VA-SINSB03-MCRX230:I-SET + VA-SINSB03-MCRY230:I-SET + VA-SINSB04-MCRX130:I-SET + VA-SINSB04-MCRY130:I-SET + VA-SINSB04-MCRX230:I-SET + VA-SINSB04-MCRY230:I-SET + VA-SINSB05-MCRX130:I-SET + VA-SINSB05-MCRY130:I-SET + VA-SINSB05-MCRX230:I-SET + VA-SINSB05-MCRY230:I-SET + VA-SINBC01-MCRX020:I-SET + VA-SINBC01-MCRY020:I-SET + VA-SINBC01-MCRX050:I-SET + VA-SINBC01-MCRY050:I-SET + VA-SINBC01-MCRX070:I-SET + VA-SINBC01-MCRY070:I-SET + VA-SINBC01-MCRX090:I-SET + VA-SINBC01-MCRY090:I-SET + VA-SINBC01-MCRX110:I-SET + VA-SINBC01-MCRY110:I-SET + VA-SINBC02-MCRX100:I-SET + VA-SINBC02-MCRX200:I-SET + VA-SINBC02-MCRX300:I-SET + VA-SINBC02-MCRX400:I-SET + VA-SINDI01-MCRX020:I-SET + VA-SINDI01-MCRY020:I-SET + VA-SINDI01-MCRX070:I-SET + VA-SINDI01-MCRY070:I-SET + VA-SINDI02-MCRX020:I-SET + VA-SINDI02-MCRY020:I-SET + VA-SINDI02-MCRX030:I-SET + VA-SINDI02-MCRY030:I-SET + VA-SINDI02-MCRX050:I-SET + VA-SINDI02-MCRY050:I-SET + VA-SINDI02-MCRX060:I-SET + VA-SINDI02-MCRY060:I-SET + VA-SINDI02-MCRX090:I-SET + VA-SINDI02-MCRY090:I-SET + VA-S10CB01-MCRX230:I-SET + VA-S10CB01-MCRY230:I-SET + VA-S10CB01-MCRX430:I-SET + VA-S10CB01-MCRY430:I-SET + VA-S10CB02-MCRX230:I-SET + VA-S10CB02-MCRY230:I-SET + VA-S10CB02-MCRX430:I-SET + VA-S10CB02-MCRY430:I-SET + VA-S10DI01-MCRX100:I-SET + VA-S10DI01-MCRX120:I-SET + VA-S10DI01-MCRY120:I-SET + VA-S10CB03-MCRX230:I-SET + VA-S10CB03-MCRY230:I-SET + VA-S10CB03-MCRX430:I-SET + VA-S10CB03-MCRY430:I-SET + VA-S10CB04-MCRX230:I-SET + VA-S10CB04-MCRY230:I-SET + VA-S10CB04-MCRX430:I-SET + VA-S10CB04-MCRY430:I-SET + VA-S10CB05-MCRX230:I-SET + VA-S10CB05-MCRY230:I-SET + VA-S10CB05-MCRX430:I-SET + VA-S10CB05-MCRY430:I-SET + VA-S10CB06-MCRX230:I-SET + VA-S10CB06-MCRY230:I-SET + VA-S10CB06-MCRX430:I-SET + VA-S10CB06-MCRY430:I-SET + VA-S10CB07-MCRX230:I-SET + VA-S10CB07-MCRY230:I-SET + VA-S10CB07-MCRX430:I-SET + VA-S10CB07-MCRY430:I-SET + VA-S10CB08-MCRX230:I-SET + VA-S10CB08-MCRY230:I-SET + VA-S10CB08-MCRX430:I-SET + VA-S10CB08-MCRY430:I-SET + VA-S10CB09-MCRX230:I-SET + VA-S10CB09-MCRY230:I-SET + VA-S10BC01-MCRX020:I-SET + VA-S10BC01-MCRY020:I-SET + VA-S10BC01-MCRX040:I-SET + VA-S10BC01-MCRY040:I-SET + VA-S10BC01-MCRX060:I-SET + VA-S10BC01-MCRY060:I-SET + VA-S10BC01-MCRX080:I-SET + VA-S10BC01-MCRY080:I-SET + VA-S10BC01-MCRX100:I-SET + VA-S10BC01-MCRY100:I-SET + VA-S10BC02-MCRX100:I-SET + VA-S10BC02-MCRX200:I-SET + VA-S10BC02-MCRX300:I-SET + VA-S10BC02-MCRX400:I-SET + VA-S10MA01-MCRX020:I-SET + VA-S10MA01-MCRY020:I-SET + VA-S10MA01-MCRX050:I-SET + VA-S10MA01-MCRY050:I-SET + VA-S10MA01-MCRX070:I-SET + VA-S10MA01-MCRY070:I-SET + VA-S10MA01-MCRX100:I-SET + VA-S10MA01-MCRX110:I-SET + VA-S10MA01-MCRY110:I-SET + VA-S10MA01-MCRX130:I-SET + VA-S10MA01-MCRY130:I-SET + VA-S20CB01-MCRX430:I-SET + VA-S20CB01-MCRY430:I-SET + VA-S20CB02-MCRX430:I-SET + VA-S20CB02-MCRY430:I-SET + VA-S20CB03-MCRX430:I-SET + VA-S20CB03-MCRY430:I-SET + VA-S20SY01-MCRX020:I-SET + VA-S20SY01-MCRY020:I-SET + VA-S20SY01-MCRX030:I-SET + VA-S20SY01-MCRY030:I-SET + VA-S20SY01-MCRX050:I-SET + VA-S20SY01-MCRY050:I-SET + VA-S20SY01-MCRX080:I-SET + VA-S20SY01-MCRY080:I-SET + VA-S20SY02-MKDC010:I-SET + VA-S20SY02-MKAC020:I-SET + VA-S20SY02-MKDC030:I-SET + VA-S20SY02-MKAC040:I-SET + VA-S20SY02-MKDC050:I-SET + VA-S20SY02-MCRX060:I-SET + VA-S20SY02-MCRY060:I-SET + VA-S20SY02-MCRX090:I-SET + VA-S20SY02-MCRY090:I-SET + VA-S20SY02-MCRX130:I-SET + VA-S20SY02-MCRY130:I-SET + VA-S20SY02-MCRX170:I-SET + VA-S20SY02-MCRY170:I-SET + VA-S20SY03-MCRX020:I-SET + VA-S20SY03-MCRY020:I-SET + VA-S20SY03-MCRX030:I-SET + VA-S20SY03-MCRY030:I-SET + VA-S20SY03-MCRX050:I-SET + VA-S20SY03-MCRY050:I-SET + VA-S20SY03-MCRX060:I-SET + VA-S20SY03-MCRY060:I-SET + VA-S20SY03-MCRX100:I-SET + VA-S20SY03-MCRY100:I-SET + VA-S30CB01-MCRX430:I-SET + VA-S30CB01-MCRY430:I-SET + VA-S30CB02-MCRX430:I-SET + VA-S30CB02-MCRY430:I-SET + VA-S30CB03-MCRX430:I-SET + VA-S30CB03-MCRY430:I-SET + VA-S30CB04-MCRX430:I-SET + VA-S30CB04-MCRY430:I-SET + VA-S30CB05-MCRX430:I-SET + VA-S30CB05-MCRY430:I-SET + VA-S30CB06-MCRX430:I-SET + VA-S30CB06-MCRY430:I-SET + VA-S30CB07-MCRX430:I-SET + VA-S30CB07-MCRY430:I-SET + VA-S30CB08-MCRX430:I-SET + VA-S30CB08-MCRY430:I-SET + VA-S30CB09-MCRX430:I-SET + VA-S30CB09-MCRY430:I-SET + VA-S30CB10-MCRX430:I-SET + VA-S30CB10-MCRY430:I-SET + VA-S30CB11-MCRX430:I-SET + VA-S30CB11-MCRY430:I-SET + VA-S30CB12-MCRX430:I-SET + VA-S30CB12-MCRY430:I-SET + VA-S30CB13-MCRX430:I-SET + VA-S30CB13-MCRY430:I-SET + VA-S30CB14-MCRX430:I-SET + VA-S30CB14-MCRY430:I-SET + VA-S30CB15-MCRX430:I-SET + VA-S30CB15-MCRY430:I-SET + VA-SARCL01-MCRX020:I-SET + VA-SARCL01-MCRY020:I-SET + VA-SARCL01-MCRX040:I-SET + VA-SARCL01-MCRY040:I-SET + VA-SARCL01-MCRX070:I-SET + VA-SARCL01-MCRY070:I-SET + VA-SARCL01-MCRX090:I-SET + VA-SARCL01-MCRY090:I-SET + VA-SARCL01-MCRX130:I-SET + VA-SARCL01-MCRY130:I-SET + VA-SARCL01-MCRX180:I-SET + VA-SARCL01-MCRY180:I-SET + VA-SARCL02-MCRX100:I-SET + VA-SARCL02-MCRX120:I-SET + VA-SARCL02-MCRY120:I-SET + VA-SARCL02-MCRX200:I-SET + VA-SARCL02-MCRX230:I-SET + VA-SARCL02-MCRY230:I-SET + VA-SARCL02-MCRX240:I-SET + VA-SARCL02-MCRY240:I-SET + VA-SARCL02-MCRX320:I-SET + VA-SARCL02-MCRY320:I-SET + VA-SARCL02-MCRX340:I-SET + VA-SARCL02-MCRY340:I-SET + VA-SARCL02-MCRX400:I-SET + VA-SARCL02-MCRX450:I-SET + VA-SARCL02-MCRY450:I-SET + VA-SARCL02-MCRX480:I-SET + VA-SARCL02-MCRY480:I-SET + VA-SARCL02-MCRX500:I-SET + VA-SARMA01-MCRX020:I-SET + VA-SARMA01-MCRY020:I-SET + VA-SARMA01-MCRX050:I-SET + VA-SARMA01-MCRY050:I-SET + VA-SARMA01-MCRX070:I-SET + VA-SARMA01-MCRY070:I-SET + VA-SARMA01-MCRX110:I-SET + VA-SARMA01-MCRY110:I-SET + VA-SARMA01-MCRX130:I-SET + VA-SARMA01-MCRY130:I-SET + VA-SARMA02-MCRX050:I-SET + VA-SARMA02-MCRY050:I-SET + VA-SARMA02-MCRX120:I-SET + VA-SARMA02-MCRY120:I-SET + VA-SARUN01-MCRX080:I-SET + VA-SARUN01-MCRY080:I-SET + VA-SARUN02-MCRX080:I-SET + VA-SARUN02-MCRY080:I-SET + VA-SARUN03-MCRX010:I-SET + VA-SARUN03-MCRY010:I-SET + VA-SARUN03-MCRX030:I-SET + VA-SARUN03-MCRX040:I-SET + VA-SARUN03-MCRY040:I-SET + VA-SARUN03-MCRX080:I-SET + VA-SARUN03-MCRY080:I-SET + VA-SARUN04-MCRX010:I-SET + VA-SARUN04-MCRY010:I-SET + VA-SARUN04-MCRX030:I-SET + VA-SARUN04-MCRX040:I-SET + VA-SARUN04-MCRY040:I-SET + VA-SARUN04-MCRX080:I-SET + VA-SARUN04-MCRY080:I-SET + VA-SARUN05-MCRX010:I-SET + VA-SARUN05-MCRY010:I-SET + VA-SARUN05-MCRX030:I-SET + VA-SARUN05-MCRX040:I-SET + VA-SARUN05-MCRY040:I-SET + VA-SARUN05-MCRX080:I-SET + VA-SARUN05-MCRY080:I-SET + VA-SARUN06-MCRX010:I-SET + VA-SARUN06-MCRY010:I-SET + VA-SARUN06-MCRX030:I-SET + VA-SARUN06-MCRX040:I-SET + VA-SARUN06-MCRY040:I-SET + VA-SARUN06-MCRX080:I-SET + VA-SARUN06-MCRY080:I-SET + VA-SARUN07-MCRX010:I-SET + VA-SARUN07-MCRY010:I-SET + VA-SARUN07-MCRX030:I-SET + VA-SARUN07-MCRX040:I-SET + VA-SARUN07-MCRY040:I-SET + VA-SARUN07-MCRX080:I-SET + VA-SARUN07-MCRY080:I-SET + VA-SARUN08-MCRX010:I-SET + VA-SARUN08-MCRY010:I-SET + VA-SARUN08-MCRX030:I-SET + VA-SARUN08-MCRX040:I-SET + VA-SARUN08-MCRY040:I-SET + VA-SARUN08-MCRX080:I-SET + VA-SARUN08-MCRY080:I-SET + VA-SARUN09-MCRX010:I-SET + VA-SARUN09-MCRY010:I-SET + VA-SARUN09-MCRX030:I-SET + VA-SARUN09-MCRX040:I-SET + VA-SARUN09-MCRY040:I-SET + VA-SARUN09-MCRX080:I-SET + VA-SARUN09-MCRY080:I-SET + VA-SARUN10-MCRX010:I-SET + VA-SARUN10-MCRY010:I-SET + VA-SARUN10-MCRX030:I-SET + VA-SARUN10-MCRX040:I-SET + VA-SARUN10-MCRY040:I-SET + VA-SARUN10-MCRX080:I-SET + VA-SARUN10-MCRY080:I-SET + VA-SARUN11-MCRX010:I-SET + VA-SARUN11-MCRY010:I-SET + VA-SARUN11-MCRX030:I-SET + VA-SARUN11-MCRX040:I-SET + VA-SARUN11-MCRY040:I-SET + VA-SARUN11-MCRX080:I-SET + VA-SARUN11-MCRY080:I-SET + VA-SARUN12-MCRX010:I-SET + VA-SARUN12-MCRY010:I-SET + VA-SARUN12-MCRX030:I-SET + VA-SARUN12-MCRX040:I-SET + VA-SARUN12-MCRY040:I-SET + VA-SARUN12-MCRX080:I-SET + VA-SARUN12-MCRY080:I-SET + VA-SARUN13-MCRX010:I-SET + VA-SARUN13-MCRY010:I-SET + VA-SARUN13-MCRX030:I-SET + VA-SARUN13-MCRX040:I-SET + VA-SARUN13-MCRY040:I-SET + VA-SARUN13-MCRX080:I-SET + VA-SARUN13-MCRY080:I-SET + VA-SARUN14-MCRX010:I-SET + VA-SARUN14-MCRY010:I-SET + VA-SARUN14-MCRX030:I-SET + VA-SARUN14-MCRX040:I-SET + VA-SARUN14-MCRY040:I-SET + VA-SARUN14-MCRX080:I-SET + VA-SARUN14-MCRY080:I-SET + VA-SARUN15-MCRX010:I-SET + VA-SARUN15-MCRY010:I-SET + VA-SARUN15-MCRX030:I-SET + VA-SARUN15-MCRX040:I-SET + VA-SARUN15-MCRY040:I-SET + VA-SARUN15-MCRX080:I-SET + VA-SARUN15-MCRY080:I-SET + VA-SARUN16-MCRX080:I-SET + VA-SARUN16-MCRY080:I-SET + VA-SARUN17-MCRX080:I-SET + VA-SARUN17-MCRY080:I-SET + VA-SARUN18-MCRX080:I-SET + VA-SARUN18-MCRY080:I-SET + VA-SARUN19-MCRX080:I-SET + VA-SARUN19-MCRY080:I-SET + VA-SARUN20-MCRX080:I-SET + VA-SARUN20-MCRY080:I-SET + VA-SARBD01-MCRX020:I-SET + VA-SARBD01-MCRY020:I-SET + VA-SATSY01-MCRX020:I-SET + VA-SATSY01-MCRY020:I-SET + VA-SATSY01-MCRX040:I-SET + VA-SATSY01-MCRY040:I-SET + VA-SATSY01-MCRX070:I-SET + VA-SATSY01-MCRY070:I-SET + VA-SATSY01-MCRX090:I-SET + VA-SATSY01-MCRY090:I-SET + VA-SATSY01-MCRX210:I-SET + VA-SATSY01-MCRY210:I-SET + VA-SATSY01-MCRX230:I-SET + VA-SATSY01-MCRY230:I-SET + VA-SATSY01-MCRX260:I-SET + VA-SATSY01-MCRY260:I-SET + VA-SATSY01-MCRX280:I-SET + VA-SATSY01-MCRY280:I-SET + VA-SATSY01-MCRX300:I-SET + VA-SATSY01-MCRY300:I-SET + VA-SATSY02-MCRX010:I-SET + VA-SATSY02-MCRY010:I-SET + VA-SATSY02-MCRX100:I-SET + VA-SATSY02-MCRX110:I-SET + VA-SATSY02-MCRY110:I-SET + VA-SATSY02-MCRX120:I-SET + VA-SATSY02-MCRY120:I-SET + VA-SATSY02-MCRX200:I-SET + VA-SATSY02-MCRX230:I-SET + VA-SATSY02-MCRY230:I-SET + VA-SATSY03-MCRX010:I-SET + VA-SATSY03-MCRY010:I-SET + VA-SATSY03-MCRX040:I-SET + VA-SATSY03-MCRY040:I-SET + VA-SATSY03-MCRX070:I-SET + VA-SATSY03-MCRY070:I-SET + VA-SATSY03-MCRX100:I-SET + VA-SATSY03-MCRY100:I-SET + VA-SATSY03-MCRX130:I-SET + VA-SATSY03-MCRY130:I-SET + VA-SATCL01-MCRX100:I-SET + VA-SATCL01-MCRX120:I-SET + VA-SATCL01-MCRY120:I-SET + VA-SATCL01-MCRX130:I-SET + VA-SATCL01-MCRY130:I-SET + VA-SATCL01-MCRX180:I-SET + VA-SATCL01-MCRY180:I-SET + VA-SATCL01-MCRX190:I-SET + VA-SATCL01-MCRY190:I-SET + VA-SATCL01-MCRX300:I-SET + VA-SATDI01-MCRX040:I-SET + VA-SATDI01-MCRY040:I-SET + VA-SATDI01-MCRX050:I-SET + VA-SATDI01-MCRY050:I-SET + VA-SATDI01-MCRX220:I-SET + VA-SATDI01-MCRY220:I-SET + VA-SATDI01-MCRX230:I-SET + VA-SATDI01-MCRY230:I-SET + VA-SATDI01-MCRX250:I-SET + VA-SATDI01-MCRY250:I-SET + VA-SATDI01-MCRX260:I-SET + VA-SATDI01-MCRY260:I-SET + VA-SATDI01-MCRX280:I-SET + VA-SATDI01-MCRY280:I-SET + VA-SATDI01-MCRX300:I-SET + VA-SATDI01-MCRY300:I-SET + VA-SATMA01-MCRX050:I-SET + VA-SATMA01-MCRY050:I-SET + + + + S30CB07-RSYS:SET-ACC-VOLT + S30CB07-RSYS:SET-BEAM-PHASE + S30CB07-RSYS:SET-KLY-POWER + S30CB07-RSYS:SET-VSUM-PHASE + S30CB07-RSYS:SET-STATION-STATE + S30CB07-RSYS:SET-VSUM-AMPLT-SCALE + S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB07-RSYS:SET-VOLT-POWER-SCALE + S30CB07-RSYS:GET-ACC-VOLT + S30CB07-RSYS:GET-BEAM-PHASE + S30CB07-RSYS:GET-KLY-POWER + S30CB07-RSYS:GET-VSUM-PHASE + S30CB07-RSYS:GET-STATION-MODE + S30CB07-RSYS:GET-STATION-STATE + S30CB07-RSYS:GET-VSUM-AMPLT + S30CB07-RSYS:GET-RF-READY-STATUS + S30CB07-RSYS:GET-BEAM-CALIB-STATUS + S30CB07-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINLH02-UIND230-MOT:YMIN + VA-SARUN03-UIND030-MOT:YMIN + VA-SARUN04-UIND030-MOT:YMIN + VA-SARUN05-UIND030-MOT:YMIN + VA-SARUN06-UIND030-MOT:YMIN + VA-SARUN07-UIND030-MOT:YMIN + VA-SARUN08-UIND030-MOT:YMIN + VA-SARUN09-UIND030-MOT:YMIN + VA-SARUN10-UIND030-MOT:YMIN + VA-SARUN11-UIND030-MOT:YMIN + VA-SARUN12-UIND030-MOT:YMIN + VA-SARUN13-UIND030-MOT:YMIN + VA-SARUN14-UIND030-MOT:YMIN + VA-SARUN15-UIND030-MOT:YMIN + + + + SINDI01-RSYS:SET-ACC-VOLT + SINDI01-RSYS:SET-BEAM-PHASE + SINDI01-RSYS:SET-KLY-POWER + SINDI01-RSYS:SET-VSUM-PHASE + SINDI01-RSYS:SET-STATION-STATE + SINDI01-RSYS:SET-VSUM-AMPLT-SCALE + SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + SINDI01-RSYS:SET-VOLT-POWER-SCALE + SINDI01-RSYS:GET-ACC-VOLT + SINDI01-RSYS:GET-BEAM-PHASE + SINDI01-RSYS:GET-KLY-POWER + SINDI01-RSYS:GET-VSUM-PHASE + SINDI01-RSYS:GET-STATION-MODE + SINDI01-RSYS:GET-STATION-STATE + SINDI01-RSYS:GET-VSUM-AMPLT + SINDI01-RSYS:GET-RF-READY-STATUS + SINDI01-RSYS:GET-BEAM-CALIB-STATUS + SINDI01-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINSB02-EXIT:BETX + VA-SINSB02-EXIT:ALFX + VA-SINSB02-EXIT:BETY + VA-SINSB02-EXIT:ALFY + VA-SINSB02-EXIT:EXN + VA-SINSB02-EXIT:EYN + VA-SINSB02-EXIT:CHARGE + + + + S10CB07-RSYS:SET-ACC-VOLT + S10CB07-RSYS:SET-BEAM-PHASE + S10CB07-RSYS:SET-KLY-POWER + S10CB07-RSYS:SET-VSUM-PHASE + S10CB07-RSYS:SET-STATION-STATE + S10CB07-RSYS:SET-VSUM-AMPLT-SCALE + S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB07-RSYS:SET-VOLT-POWER-SCALE + S10CB07-RSYS:GET-ACC-VOLT + S10CB07-RSYS:GET-BEAM-PHASE + S10CB07-RSYS:GET-KLY-POWER + S10CB07-RSYS:GET-VSUM-PHASE + S10CB07-RSYS:GET-STATION-MODE + S10CB07-RSYS:GET-STATION-STATE + S10CB07-RSYS:GET-VSUM-AMPLT + S10CB07-RSYS:GET-RF-READY-STATUS + S10CB07-RSYS:GET-BEAM-CALIB-STATUS + S10CB07-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-RSYS:GET-KLY-POWER + VA-SINSB01-RSYS:GET-KLY-POWER + VA-SINSB02-RSYS:GET-KLY-POWER + VA-SINSB03-RSYS:GET-KLY-POWER + VA-SINSB04-RSYS:GET-KLY-POWER + VA-SINXB01-RSYS:GET-KLY-POWER + VA-SINDI01-RSYS:GET-KLY-POWER + VA-S10CB01-RSYS:GET-KLY-POWER + VA-S10CB02-RSYS:GET-KLY-POWER + VA-S10CB03-RSYS:GET-KLY-POWER + VA-S10CB04-RSYS:GET-KLY-POWER + VA-S10CB05-RSYS:GET-KLY-POWER + VA-S10CB06-RSYS:GET-KLY-POWER + VA-S10CB07-RSYS:GET-KLY-POWER + VA-S10CB08-RSYS:GET-KLY-POWER + VA-S10CB09-RSYS:GET-KLY-POWER + VA-S20CB01-RSYS:GET-KLY-POWER + VA-S20CB02-RSYS:GET-KLY-POWER + VA-S20CB03-RSYS:GET-KLY-POWER + VA-S20CB04-RSYS:GET-KLY-POWER + VA-S30CB01-RSYS:GET-KLY-POWER + VA-S30CB02-RSYS:GET-KLY-POWER + VA-S30CB03-RSYS:GET-KLY-POWER + VA-S30CB04-RSYS:GET-KLY-POWER + VA-S30CB05-RSYS:GET-KLY-POWER + VA-S30CB06-RSYS:GET-KLY-POWER + VA-S30CB07-RSYS:GET-KLY-POWER + VA-S30CB08-RSYS:GET-KLY-POWER + VA-S30CB09-RSYS:GET-KLY-POWER + VA-S30CB10-RSYS:GET-KLY-POWER + VA-S30CB11-RSYS:GET-KLY-POWER + VA-S30CB12-RSYS:GET-KLY-POWER + VA-S30CB13-RSYS:GET-KLY-POWER + VA-S30CB14-RSYS:GET-KLY-POWER + + + + VA-SINEG01-DBPM340:X2-VALID + VA-SINSB01-DBPM150:X2-VALID + VA-SINSB02-DBPM150:X2-VALID + VA-SINLH01-DBPM060:X2-VALID + VA-SINLH02-DBPM210:X2-VALID + VA-SINLH02-DBPM240:X2-VALID + VA-SINLH03-DBPM010:X2-VALID + VA-SINLH03-DBPM050:X2-VALID + VA-SINLH03-DBPM090:X2-VALID + VA-SINSB03-DBPM120:X2-VALID + VA-SINSB03-DBPM220:X2-VALID + VA-SINSB04-DBPM120:X2-VALID + VA-SINSB04-DBPM220:X2-VALID + VA-SINSB05-DBPM120:X2-VALID + VA-SINSB05-DBPM220:X2-VALID + VA-SINXB01-DBPM120:X2-VALID + VA-SINBC01-DBPM010:X2-VALID + VA-SINBC01-DBPM030:X2-VALID + VA-SINBC01-DBPM080:X2-VALID + VA-SINBC01-DBPM100:X2-VALID + VA-SINBC02-DBPM140:X2-VALID + VA-SINBC02-DBPM320:X2-VALID + VA-SINDI01-DBPM010:X2-VALID + VA-SINDI01-DBPM060:X2-VALID + VA-SINDI02-DBPM010:X2-VALID + VA-SINDI02-DBPM040:X2-VALID + VA-SINDI02-DBPM080:X2-VALID + VA-S10CB01-DBPM220:X2-VALID + VA-S10CB01-DBPM420:X2-VALID + VA-S10CB02-DBPM220:X2-VALID + VA-S10CB02-DBPM420:X2-VALID + VA-S10DI01-DBPM110:X2-VALID + VA-S10CB03-DBPM220:X2-VALID + VA-S10CB03-DBPM420:X2-VALID + VA-S10CB04-DBPM220:X2-VALID + VA-S10CB04-DBPM420:X2-VALID + VA-S10CB05-DBPM220:X2-VALID + VA-S10CB05-DBPM420:X2-VALID + VA-S10CB06-DBPM220:X2-VALID + VA-S10CB06-DBPM420:X2-VALID + VA-S10CB07-DBPM220:X2-VALID + VA-S10CB07-DBPM420:X2-VALID + VA-S10CB08-DBPM220:X2-VALID + VA-S10CB08-DBPM420:X2-VALID + VA-S10CB09-DBPM220:X2-VALID + VA-S10BC01-DBPM010:X2-VALID + VA-S10BC01-DBPM050:X2-VALID + VA-S10BC01-DBPM090:X2-VALID + VA-S10BC02-DBPM140:X2-VALID + VA-S10BC02-DBPM320:X2-VALID + VA-S10MA01-DBPM010:X2-VALID + VA-S10MA01-DBPM060:X2-VALID + VA-S10MA01-DBPM120:X2-VALID + VA-S20CB01-DBPM420:X2-VALID + VA-S20CB02-DBPM420:X2-VALID + VA-S20CB03-DBPM420:X2-VALID + VA-S20SY01-DBPM010:X2-VALID + VA-S20SY01-DBPM040:X2-VALID + VA-S20SY01-DBPM060:X2-VALID + VA-S20SY02-DBPM080:X2-VALID + VA-S20SY02-DBPM120:X2-VALID + VA-S20SY02-DBPM150:X2-VALID + VA-S20SY03-DBPM010:X2-VALID + VA-S20SY03-DBPM040:X2-VALID + VA-S20SY03-DBPM080:X2-VALID + VA-S30CB01-DBPM420:X2-VALID + VA-S30CB02-DBPM420:X2-VALID + VA-S30CB03-DBPM420:X2-VALID + VA-S30CB04-DBPM420:X2-VALID + VA-S30CB05-DBPM420:X2-VALID + VA-S30CB06-DBPM420:X2-VALID + VA-S30CB07-DBPM420:X2-VALID + VA-S30CB08-DBPM420:X2-VALID + VA-S30CB09-DBPM420:X2-VALID + VA-S30CB10-DBPM420:X2-VALID + VA-S30CB11-DBPM420:X2-VALID + VA-S30CB12-DBPM420:X2-VALID + VA-S30CB13-DBPM420:X2-VALID + VA-S30CB14-DBPM420:X2-VALID + VA-S30CB15-DBPM420:X2-VALID + VA-SARCL01-DBPM010:X2-VALID + VA-SARCL01-DBPM060:X2-VALID + VA-SARCL01-DBPM120:X2-VALID + VA-SARCL01-DBPM150:X2-VALID + VA-SARCL02-DBPM110:X2-VALID + VA-SARCL02-DBPM220:X2-VALID + VA-SARCL02-DBPM260:X2-VALID + VA-SARCL02-DBPM330:X2-VALID + VA-SARCL02-DBPM470:X2-VALID + VA-SARMA01-DBPM040:X2-VALID + VA-SARMA01-DBPM100:X2-VALID + VA-SARMA02-DBPM010:X2-VALID + VA-SARMA02-DBPM020:X2-VALID + VA-SARMA02-DBPM040:X2-VALID + VA-SARMA02-DBPM110:X2-VALID + VA-SARUN01-DBPM070:X2-VALID + VA-SARUN02-DBPM070:X2-VALID + VA-SARUN03-DBPM070:X2-VALID + VA-SARUN04-DBPM070:X2-VALID + VA-SARUN05-DBPM070:X2-VALID + VA-SARUN06-DBPM070:X2-VALID + VA-SARUN07-DBPM070:X2-VALID + VA-SARUN08-DBPM070:X2-VALID + VA-SARUN09-DBPM070:X2-VALID + VA-SARUN10-DBPM070:X2-VALID + VA-SARUN11-DBPM070:X2-VALID + VA-SARUN12-DBPM070:X2-VALID + VA-SARUN13-DBPM070:X2-VALID + VA-SARUN14-DBPM070:X2-VALID + VA-SARUN15-DBPM070:X2-VALID + VA-SARUN16-DBPM070:X2-VALID + VA-SARUN17-DBPM070:X2-VALID + VA-SARUN18-DBPM070:X2-VALID + VA-SARUN19-DBPM070:X2-VALID + VA-SARUN20-DBPM070:X2-VALID + VA-SARBD01-DBPM040:X2-VALID + VA-SATSY01-DBPM010:X2-VALID + VA-SATSY01-DBPM060:X2-VALID + VA-SATSY01-DBPM100:X2-VALID + VA-SATSY01-DBPM240:X2-VALID + VA-SATSY01-DBPM290:X2-VALID + VA-SATSY02-DBPM020:X2-VALID + VA-SATSY02-DBPM210:X2-VALID + VA-SATSY03-DBPM030:X2-VALID + VA-SATSY03-DBPM060:X2-VALID + VA-SATSY03-DBPM090:X2-VALID + VA-SATSY03-DBPM120:X2-VALID + VA-SATCL01-DBPM140:X2-VALID + VA-SATDI01-DBPM030:X2-VALID + VA-SATDI01-DBPM060:X2-VALID + VA-SATDI01-DBPM110:X2-VALID + VA-SATDI01-DBPM240:X2-VALID + VA-SATDI01-DBPM270:X2-VALID + VA-SATDI01-DBPM310:X2-VALID + VA-SATMA01-DBPM010:X2-VALID + VA-SATMA01-DBPM020:X2-VALID + VA-SATMA01-DBPM040:X2-VALID + VA-S10BD01-DBPM020:X2-VALID + VA-SARBD02-DBPM010:X2-VALID + VA-SARBD02-DBPM040:X2-VALID + + + + VA-SINBC02-MSEX130:I-SET + VA-SINBC02-MSEX330:I-SET + VA-S10BC02-MSEX130:I-SET + VA-S10BC02-MSEX330:I-SET + VA-SARCL02-MSEX140:I-SET + VA-SARCL02-MSEX440:I-SET + VA-SATSY01-MSEX050:I-SET + VA-SATSY01-MSEX080:I-SET + VA-SATSY01-MSEX220:I-SET + VA-SATSY01-MSEX250:I-SET + VA-SATCL01-MSEX110:I-SET + VA-SATCL01-MSEX160:I-SET + VA-SATCL01-MSEX200:I-SET + + + + VA-SARUN03-MQUA020-MOT:NINTERVX + VA-SARUN03-MQUA050-MOT:NINTERVX + VA-SARUN04-MQUA020-MOT:NINTERVX + VA-SARUN04-MQUA050-MOT:NINTERVX + VA-SARUN05-MQUA020-MOT:NINTERVX + VA-SARUN05-MQUA050-MOT:NINTERVX + VA-SARUN06-MQUA020-MOT:NINTERVX + VA-SARUN06-MQUA050-MOT:NINTERVX + VA-SARUN07-MQUA020-MOT:NINTERVX + VA-SARUN07-MQUA050-MOT:NINTERVX + VA-SARUN08-MQUA020-MOT:NINTERVX + VA-SARUN08-MQUA050-MOT:NINTERVX + VA-SARUN09-MQUA020-MOT:NINTERVX + VA-SARUN09-MQUA050-MOT:NINTERVX + VA-SARUN10-MQUA020-MOT:NINTERVX + VA-SARUN10-MQUA050-MOT:NINTERVX + VA-SARUN11-MQUA020-MOT:NINTERVX + VA-SARUN11-MQUA050-MOT:NINTERVX + VA-SARUN12-MQUA020-MOT:NINTERVX + VA-SARUN12-MQUA050-MOT:NINTERVX + VA-SARUN13-MQUA020-MOT:NINTERVX + VA-SARUN13-MQUA050-MOT:NINTERVX + VA-SARUN14-MQUA020-MOT:NINTERVX + VA-SARUN14-MQUA050-MOT:NINTERVX + VA-SARUN15-MQUA020-MOT:NINTERVX + VA-SARUN15-MQUA050-MOT:NINTERVX + + + + VA-SARMA02-MQUA120:X + VA-SARUN01-MQUA080:X + VA-SARUN02-MQUA080:X + VA-SARUN03-MQUA080:X + VA-SARUN04-MQUA080:X + VA-SARUN05-MQUA080:X + VA-SARUN06-MQUA080:X + VA-SARUN07-MQUA080:X + VA-SARUN08-MQUA080:X + VA-SARUN09-MQUA080:X + VA-SARUN10-MQUA080:X + VA-SARUN11-MQUA080:X + VA-SARUN12-MQUA080:X + VA-SARUN13-MQUA080:X + VA-SARUN14-MQUA080:X + VA-SARUN15-MQUA080:X + VA-SARUN16-MQUA080:X + VA-SARUN17-MQUA080:X + VA-SARUN18-MQUA080:X + VA-SARUN19-MQUA080:X + + + + VA-SINEG01-RSYS:GET-VSUM-PHASE-OFFSET + VA-SINSB01-RSYS:GET-VSUM-PHASE-OFFSET + VA-SINSB02-RSYS:GET-VSUM-PHASE-OFFSET + VA-SINSB03-RSYS:GET-VSUM-PHASE-OFFSET + VA-SINSB04-RSYS:GET-VSUM-PHASE-OFFSET + VA-SINXB01-RSYS:GET-VSUM-PHASE-OFFSET + VA-SINDI01-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB01-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB02-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB03-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB04-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB05-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB06-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB07-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB08-RSYS:GET-VSUM-PHASE-OFFSET + VA-S10CB09-RSYS:GET-VSUM-PHASE-OFFSET + VA-S20CB01-RSYS:GET-VSUM-PHASE-OFFSET + VA-S20CB02-RSYS:GET-VSUM-PHASE-OFFSET + VA-S20CB03-RSYS:GET-VSUM-PHASE-OFFSET + VA-S20CB04-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB01-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB02-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB03-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB04-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB05-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB06-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB07-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB08-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB09-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB10-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB11-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB12-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB13-RSYS:GET-VSUM-PHASE-OFFSET + VA-S30CB14-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINSS-LPSA:SHUTTER + + + + VA-SARCL01-DSCR170:ROI-XMAX + VA-SARCL01-DSCR170:ROI-XMIN + VA-SARCL01-DSCR170:ROI-YMAX + VA-SARCL01-DSCR170:ROI-YMIN + VA-SARCL01-DSCR170:pipeline-x_stats_gr-g_stddiv_egu + VA-SARCL01-DSCR170:pipeline-y_stats_gr-g_stddiv_egu + VA-SARCL01-DSCR170:pipeline-slice_h_stats-g_stddiv_egu + VA-SARCL01-DSCR170:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-DBPM340:Q2-VALID + VA-SINSB01-DBPM150:Q2-VALID + VA-SINSB02-DBPM150:Q2-VALID + VA-SINLH01-DBPM060:Q2-VALID + VA-SINLH02-DBPM210:Q2-VALID + VA-SINLH02-DBPM240:Q2-VALID + VA-SINLH03-DBPM010:Q2-VALID + VA-SINLH03-DBPM050:Q2-VALID + VA-SINLH03-DBPM090:Q2-VALID + VA-SINSB03-DBPM120:Q2-VALID + VA-SINSB03-DBPM220:Q2-VALID + VA-SINSB04-DBPM120:Q2-VALID + VA-SINSB04-DBPM220:Q2-VALID + VA-SINSB05-DBPM120:Q2-VALID + VA-SINSB05-DBPM220:Q2-VALID + VA-SINXB01-DBPM120:Q2-VALID + VA-SINBC01-DBPM010:Q2-VALID + VA-SINBC01-DBPM030:Q2-VALID + VA-SINBC01-DBPM080:Q2-VALID + VA-SINBC01-DBPM100:Q2-VALID + VA-SINBC02-DBPM140:Q2-VALID + VA-SINBC02-DBPM320:Q2-VALID + VA-SINDI01-DBPM010:Q2-VALID + VA-SINDI01-DBPM060:Q2-VALID + VA-SINDI02-DBPM010:Q2-VALID + VA-SINDI02-DBPM040:Q2-VALID + VA-SINDI02-DBPM080:Q2-VALID + VA-S10CB01-DBPM220:Q2-VALID + VA-S10CB01-DBPM420:Q2-VALID + VA-S10CB02-DBPM220:Q2-VALID + VA-S10CB02-DBPM420:Q2-VALID + VA-S10DI01-DBPM110:Q2-VALID + VA-S10CB03-DBPM220:Q2-VALID + VA-S10CB03-DBPM420:Q2-VALID + VA-S10CB04-DBPM220:Q2-VALID + VA-S10CB04-DBPM420:Q2-VALID + VA-S10CB05-DBPM220:Q2-VALID + VA-S10CB05-DBPM420:Q2-VALID + VA-S10CB06-DBPM220:Q2-VALID + VA-S10CB06-DBPM420:Q2-VALID + VA-S10CB07-DBPM220:Q2-VALID + VA-S10CB07-DBPM420:Q2-VALID + VA-S10CB08-DBPM220:Q2-VALID + VA-S10CB08-DBPM420:Q2-VALID + VA-S10CB09-DBPM220:Q2-VALID + VA-S10BC01-DBPM010:Q2-VALID + VA-S10BC01-DBPM050:Q2-VALID + VA-S10BC01-DBPM090:Q2-VALID + VA-S10BC02-DBPM140:Q2-VALID + VA-S10BC02-DBPM320:Q2-VALID + VA-S10MA01-DBPM010:Q2-VALID + VA-S10MA01-DBPM060:Q2-VALID + VA-S10MA01-DBPM120:Q2-VALID + VA-S20CB01-DBPM420:Q2-VALID + VA-S20CB02-DBPM420:Q2-VALID + VA-S20CB03-DBPM420:Q2-VALID + VA-S20SY01-DBPM010:Q2-VALID + VA-S20SY01-DBPM040:Q2-VALID + VA-S20SY01-DBPM060:Q2-VALID + VA-S20SY02-DBPM080:Q2-VALID + VA-S20SY02-DBPM120:Q2-VALID + VA-S20SY02-DBPM150:Q2-VALID + VA-S20SY03-DBPM010:Q2-VALID + VA-S20SY03-DBPM040:Q2-VALID + VA-S20SY03-DBPM080:Q2-VALID + VA-S30CB01-DBPM420:Q2-VALID + VA-S30CB02-DBPM420:Q2-VALID + VA-S30CB03-DBPM420:Q2-VALID + VA-S30CB04-DBPM420:Q2-VALID + VA-S30CB05-DBPM420:Q2-VALID + VA-S30CB06-DBPM420:Q2-VALID + VA-S30CB07-DBPM420:Q2-VALID + VA-S30CB08-DBPM420:Q2-VALID + VA-S30CB09-DBPM420:Q2-VALID + VA-S30CB10-DBPM420:Q2-VALID + VA-S30CB11-DBPM420:Q2-VALID + VA-S30CB12-DBPM420:Q2-VALID + VA-S30CB13-DBPM420:Q2-VALID + VA-S30CB14-DBPM420:Q2-VALID + VA-S30CB15-DBPM420:Q2-VALID + VA-SARCL01-DBPM010:Q2-VALID + VA-SARCL01-DBPM060:Q2-VALID + VA-SARCL01-DBPM120:Q2-VALID + VA-SARCL01-DBPM150:Q2-VALID + VA-SARCL02-DBPM110:Q2-VALID + VA-SARCL02-DBPM220:Q2-VALID + VA-SARCL02-DBPM260:Q2-VALID + VA-SARCL02-DBPM330:Q2-VALID + VA-SARCL02-DBPM470:Q2-VALID + VA-SARMA01-DBPM040:Q2-VALID + VA-SARMA01-DBPM100:Q2-VALID + VA-SARMA02-DBPM010:Q2-VALID + VA-SARMA02-DBPM020:Q2-VALID + VA-SARMA02-DBPM040:Q2-VALID + VA-SARMA02-DBPM110:Q2-VALID + VA-SARUN01-DBPM070:Q2-VALID + VA-SARUN02-DBPM070:Q2-VALID + VA-SARUN03-DBPM070:Q2-VALID + VA-SARUN04-DBPM070:Q2-VALID + VA-SARUN05-DBPM070:Q2-VALID + VA-SARUN06-DBPM070:Q2-VALID + VA-SARUN07-DBPM070:Q2-VALID + VA-SARUN08-DBPM070:Q2-VALID + VA-SARUN09-DBPM070:Q2-VALID + VA-SARUN10-DBPM070:Q2-VALID + VA-SARUN11-DBPM070:Q2-VALID + VA-SARUN12-DBPM070:Q2-VALID + VA-SARUN13-DBPM070:Q2-VALID + VA-SARUN14-DBPM070:Q2-VALID + VA-SARUN15-DBPM070:Q2-VALID + VA-SARUN16-DBPM070:Q2-VALID + VA-SARUN17-DBPM070:Q2-VALID + VA-SARUN18-DBPM070:Q2-VALID + VA-SARUN19-DBPM070:Q2-VALID + VA-SARUN20-DBPM070:Q2-VALID + VA-SARBD01-DBPM040:Q2-VALID + VA-SATSY01-DBPM010:Q2-VALID + VA-SATSY01-DBPM060:Q2-VALID + VA-SATSY01-DBPM100:Q2-VALID + VA-SATSY01-DBPM240:Q2-VALID + VA-SATSY01-DBPM290:Q2-VALID + VA-SATSY02-DBPM020:Q2-VALID + VA-SATSY02-DBPM210:Q2-VALID + VA-SATSY03-DBPM030:Q2-VALID + VA-SATSY03-DBPM060:Q2-VALID + VA-SATSY03-DBPM090:Q2-VALID + VA-SATSY03-DBPM120:Q2-VALID + VA-SATCL01-DBPM140:Q2-VALID + VA-SATDI01-DBPM030:Q2-VALID + VA-SATDI01-DBPM060:Q2-VALID + VA-SATDI01-DBPM110:Q2-VALID + VA-SATDI01-DBPM240:Q2-VALID + VA-SATDI01-DBPM270:Q2-VALID + VA-SATDI01-DBPM310:Q2-VALID + VA-SATMA01-DBPM010:Q2-VALID + VA-SATMA01-DBPM020:Q2-VALID + VA-SATMA01-DBPM040:Q2-VALID + VA-S10BD01-DBPM020:Q2-VALID + VA-SARBD02-DBPM010:Q2-VALID + VA-SARBD02-DBPM040:Q2-VALID + + + + VA-SARBD02-DSCR050:ROI-XMAX + VA-SARBD02-DSCR050:ROI-XMIN + VA-SARBD02-DSCR050:ROI-YMAX + VA-SARBD02-DSCR050:ROI-YMIN + VA-SARBD02-DSCR050:pipeline-x_stats_gr-g_stddiv_egu + VA-SARBD02-DSCR050:pipeline-y_stats_gr-g_stddiv_egu + VA-SARBD02-DSCR050:pipeline-slice_h_stats-g_stddiv_egu + VA-SARBD02-DSCR050:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-S10BD01-DSCR030:ROI-XMAX + VA-S10BD01-DSCR030:ROI-XMIN + VA-S10BD01-DSCR030:ROI-YMAX + VA-S10BD01-DSCR030:ROI-YMIN + VA-S10BD01-DSCR030:pipeline-x_stats_gr-g_stddiv_egu + VA-S10BD01-DSCR030:pipeline-y_stats_gr-g_stddiv_egu + VA-S10BD01-DSCR030:pipeline-slice_h_stats-g_stddiv_egu + VA-S10BD01-DSCR030:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-DBPM340:X1 + VA-SINSB01-DBPM150:X1 + VA-SINSB02-DBPM150:X1 + VA-SINLH01-DBPM060:X1 + VA-SINLH02-DBPM210:X1 + VA-SINLH02-DBPM240:X1 + VA-SINLH03-DBPM010:X1 + VA-SINLH03-DBPM050:X1 + VA-SINLH03-DBPM090:X1 + VA-SINSB03-DBPM120:X1 + VA-SINSB03-DBPM220:X1 + VA-SINSB04-DBPM120:X1 + VA-SINSB04-DBPM220:X1 + VA-SINSB05-DBPM120:X1 + VA-SINSB05-DBPM220:X1 + VA-SINXB01-DBPM120:X1 + VA-SINBC01-DBPM010:X1 + VA-SINBC01-DBPM030:X1 + VA-SINBC01-DBPM080:X1 + VA-SINBC01-DBPM100:X1 + VA-SINBC02-DBPM140:X1 + VA-SINBC02-DBPM320:X1 + VA-SINDI01-DBPM010:X1 + VA-SINDI01-DBPM060:X1 + VA-SINDI02-DBPM010:X1 + VA-SINDI02-DBPM040:X1 + VA-SINDI02-DBPM080:X1 + VA-S10CB01-DBPM220:X1 + VA-S10CB01-DBPM420:X1 + VA-S10CB02-DBPM220:X1 + VA-S10CB02-DBPM420:X1 + VA-S10DI01-DBPM110:X1 + VA-S10CB03-DBPM220:X1 + VA-S10CB03-DBPM420:X1 + VA-S10CB04-DBPM220:X1 + VA-S10CB04-DBPM420:X1 + VA-S10CB05-DBPM220:X1 + VA-S10CB05-DBPM420:X1 + VA-S10CB06-DBPM220:X1 + VA-S10CB06-DBPM420:X1 + VA-S10CB07-DBPM220:X1 + VA-S10CB07-DBPM420:X1 + VA-S10CB08-DBPM220:X1 + VA-S10CB08-DBPM420:X1 + VA-S10CB09-DBPM220:X1 + VA-S10BC01-DBPM010:X1 + VA-S10BC01-DBPM050:X1 + VA-S10BC01-DBPM090:X1 + VA-S10BC02-DBPM140:X1 + VA-S10BC02-DBPM320:X1 + VA-S10MA01-DBPM010:X1 + VA-S10MA01-DBPM060:X1 + VA-S10MA01-DBPM120:X1 + VA-S20CB01-DBPM420:X1 + VA-S20CB02-DBPM420:X1 + VA-S20CB03-DBPM420:X1 + VA-S20SY01-DBPM010:X1 + VA-S20SY01-DBPM040:X1 + VA-S20SY01-DBPM060:X1 + VA-S20SY02-DBPM080:X1 + VA-S20SY02-DBPM120:X1 + VA-S20SY02-DBPM150:X1 + VA-S20SY03-DBPM010:X1 + VA-S20SY03-DBPM040:X1 + VA-S20SY03-DBPM080:X1 + VA-S30CB01-DBPM420:X1 + VA-S30CB02-DBPM420:X1 + VA-S30CB03-DBPM420:X1 + VA-S30CB04-DBPM420:X1 + VA-S30CB05-DBPM420:X1 + VA-S30CB06-DBPM420:X1 + VA-S30CB07-DBPM420:X1 + VA-S30CB08-DBPM420:X1 + VA-S30CB09-DBPM420:X1 + VA-S30CB10-DBPM420:X1 + VA-S30CB11-DBPM420:X1 + VA-S30CB12-DBPM420:X1 + VA-S30CB13-DBPM420:X1 + VA-S30CB14-DBPM420:X1 + VA-S30CB15-DBPM420:X1 + VA-SARCL01-DBPM010:X1 + VA-SARCL01-DBPM060:X1 + VA-SARCL01-DBPM120:X1 + VA-SARCL01-DBPM150:X1 + VA-SARCL02-DBPM110:X1 + VA-SARCL02-DBPM220:X1 + VA-SARCL02-DBPM260:X1 + VA-SARCL02-DBPM330:X1 + VA-SARCL02-DBPM470:X1 + VA-SARMA01-DBPM040:X1 + VA-SARMA01-DBPM100:X1 + VA-SARMA02-DBPM010:X1 + VA-SARMA02-DBPM020:X1 + VA-SARMA02-DBPM040:X1 + VA-SARMA02-DBPM110:X1 + VA-SARUN01-DBPM070:X1 + VA-SARUN02-DBPM070:X1 + VA-SARUN03-DBPM070:X1 + VA-SARUN04-DBPM070:X1 + VA-SARUN05-DBPM070:X1 + VA-SARUN06-DBPM070:X1 + VA-SARUN07-DBPM070:X1 + VA-SARUN08-DBPM070:X1 + VA-SARUN09-DBPM070:X1 + VA-SARUN10-DBPM070:X1 + VA-SARUN11-DBPM070:X1 + VA-SARUN12-DBPM070:X1 + VA-SARUN13-DBPM070:X1 + VA-SARUN14-DBPM070:X1 + VA-SARUN15-DBPM070:X1 + VA-SARUN16-DBPM070:X1 + VA-SARUN17-DBPM070:X1 + VA-SARUN18-DBPM070:X1 + VA-SARUN19-DBPM070:X1 + VA-SARUN20-DBPM070:X1 + VA-SARBD01-DBPM040:X1 + VA-SATSY01-DBPM010:X1 + VA-SATSY01-DBPM060:X1 + VA-SATSY01-DBPM100:X1 + VA-SATSY01-DBPM240:X1 + VA-SATSY01-DBPM290:X1 + VA-SATSY02-DBPM020:X1 + VA-SATSY02-DBPM210:X1 + VA-SATSY03-DBPM030:X1 + VA-SATSY03-DBPM060:X1 + VA-SATSY03-DBPM090:X1 + VA-SATSY03-DBPM120:X1 + VA-SATCL01-DBPM140:X1 + VA-SATDI01-DBPM030:X1 + VA-SATDI01-DBPM060:X1 + VA-SATDI01-DBPM110:X1 + VA-SATDI01-DBPM240:X1 + VA-SATDI01-DBPM270:X1 + VA-SATDI01-DBPM310:X1 + VA-SATMA01-DBPM010:X1 + VA-SATMA01-DBPM020:X1 + VA-SATMA01-DBPM040:X1 + VA-S10BD01-DBPM020:X1 + VA-SARBD02-DBPM010:X1 + VA-SARBD02-DBPM040:X1 + + + + VA-SINLH02-UIND230-MOT:XMIN + VA-SARUN03-UIND030-MOT:XMIN + VA-SARUN04-UIND030-MOT:XMIN + VA-SARUN05-UIND030-MOT:XMIN + VA-SARUN06-UIND030-MOT:XMIN + VA-SARUN07-UIND030-MOT:XMIN + VA-SARUN08-UIND030-MOT:XMIN + VA-SARUN09-UIND030-MOT:XMIN + VA-SARUN10-UIND030-MOT:XMIN + VA-SARUN11-UIND030-MOT:XMIN + VA-SARUN12-UIND030-MOT:XMIN + VA-SARUN13-UIND030-MOT:XMIN + VA-SARUN14-UIND030-MOT:XMIN + VA-SARUN15-UIND030-MOT:XMIN + + + + VA-S10DI01-DSCR020:ROI-XMAX + VA-S10DI01-DSCR020:ROI-XMIN + VA-S10DI01-DSCR020:ROI-YMAX + VA-S10DI01-DSCR020:ROI-YMIN + VA-S10DI01-DSCR020:pipeline-x_stats_gr-g_stddiv_egu + VA-S10DI01-DSCR020:pipeline-y_stats_gr-g_stddiv_egu + VA-S10DI01-DSCR020:pipeline-slice_h_stats-g_stddiv_egu + VA-S10DI01-DSCR020:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-BASE + VA-S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-BASE + + + + VA-SINBC01-DSCR040:ROI-XMAX + VA-SINBC01-DSCR040:ROI-XMIN + VA-SINBC01-DSCR040:ROI-YMAX + VA-SINBC01-DSCR040:ROI-YMIN + VA-SINBC01-DSCR040:pipeline-x_stats_gr-g_stddiv_egu + VA-SINBC01-DSCR040:pipeline-y_stats_gr-g_stddiv_egu + VA-SINBC01-DSCR040:pipeline-slice_h_stats-g_stddiv_egu + VA-SINBC01-DSCR040:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SATCL01-DSCR150:ROI-XMAX + VA-SATCL01-DSCR150:ROI-XMIN + VA-SATCL01-DSCR150:ROI-YMAX + VA-SATCL01-DSCR150:ROI-YMIN + VA-SATCL01-DSCR150:pipeline-x_stats_gr-g_stddiv_egu + VA-SATCL01-DSCR150:pipeline-y_stats_gr-g_stddiv_egu + VA-SATCL01-DSCR150:pipeline-slice_h_stats-g_stddiv_egu + VA-SATCL01-DSCR150:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINLH02-UIND230-MOT:NPOINT + VA-SARUN03-UIND030-MOT:NPOINT + VA-SARUN04-UIND030-MOT:NPOINT + VA-SARUN05-UIND030-MOT:NPOINT + VA-SARUN06-UIND030-MOT:NPOINT + VA-SARUN07-UIND030-MOT:NPOINT + VA-SARUN08-UIND030-MOT:NPOINT + VA-SARUN09-UIND030-MOT:NPOINT + VA-SARUN10-UIND030-MOT:NPOINT + VA-SARUN11-UIND030-MOT:NPOINT + VA-SARUN12-UIND030-MOT:NPOINT + VA-SARUN13-UIND030-MOT:NPOINT + VA-SARUN14-UIND030-MOT:NPOINT + VA-SARUN15-UIND030-MOT:NPOINT + + + + VA-SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + VA-S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + + + + VA-SINEG01-RSYS:SET-STATION-STATE + VA-SINSB01-RSYS:SET-STATION-STATE + VA-SINSB02-RSYS:SET-STATION-STATE + VA-SINSB03-RSYS:SET-STATION-STATE + VA-SINSB04-RSYS:SET-STATION-STATE + VA-SINXB01-RSYS:SET-STATION-STATE + VA-SINDI01-RSYS:SET-STATION-STATE + VA-S10CB01-RSYS:SET-STATION-STATE + VA-S10CB02-RSYS:SET-STATION-STATE + VA-S10CB03-RSYS:SET-STATION-STATE + VA-S10CB04-RSYS:SET-STATION-STATE + VA-S10CB05-RSYS:SET-STATION-STATE + VA-S10CB06-RSYS:SET-STATION-STATE + VA-S10CB07-RSYS:SET-STATION-STATE + VA-S10CB08-RSYS:SET-STATION-STATE + VA-S10CB09-RSYS:SET-STATION-STATE + VA-S20CB01-RSYS:SET-STATION-STATE + VA-S20CB02-RSYS:SET-STATION-STATE + VA-S20CB03-RSYS:SET-STATION-STATE + VA-S20CB04-RSYS:SET-STATION-STATE + VA-S30CB01-RSYS:SET-STATION-STATE + VA-S30CB02-RSYS:SET-STATION-STATE + VA-S30CB03-RSYS:SET-STATION-STATE + VA-S30CB04-RSYS:SET-STATION-STATE + VA-S30CB05-RSYS:SET-STATION-STATE + VA-S30CB06-RSYS:SET-STATION-STATE + VA-S30CB07-RSYS:SET-STATION-STATE + VA-S30CB08-RSYS:SET-STATION-STATE + VA-S30CB09-RSYS:SET-STATION-STATE + VA-S30CB10-RSYS:SET-STATION-STATE + VA-S30CB11-RSYS:SET-STATION-STATE + VA-S30CB12-RSYS:SET-STATION-STATE + VA-S30CB13-RSYS:SET-STATION-STATE + VA-S30CB14-RSYS:SET-STATION-STATE + + + + VA-SINEG01-RSYS:GET-BEAM-CALIB-STATUS + VA-SINSB01-RSYS:GET-BEAM-CALIB-STATUS + VA-SINSB02-RSYS:GET-BEAM-CALIB-STATUS + VA-SINSB03-RSYS:GET-BEAM-CALIB-STATUS + VA-SINSB04-RSYS:GET-BEAM-CALIB-STATUS + VA-SINXB01-RSYS:GET-BEAM-CALIB-STATUS + VA-SINDI01-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB01-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB02-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB03-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB04-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB05-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB06-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB07-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB08-RSYS:GET-BEAM-CALIB-STATUS + VA-S10CB09-RSYS:GET-BEAM-CALIB-STATUS + VA-S20CB01-RSYS:GET-BEAM-CALIB-STATUS + VA-S20CB02-RSYS:GET-BEAM-CALIB-STATUS + VA-S20CB03-RSYS:GET-BEAM-CALIB-STATUS + VA-S20CB04-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB01-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB02-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB03-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB04-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB05-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB06-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB07-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB08-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB09-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB10-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB11-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB12-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB13-RSYS:GET-BEAM-CALIB-STATUS + VA-S30CB14-RSYS:GET-BEAM-CALIB-STATUS + + + + VA-SARUN03-MQUA020-MOT:NACQ + VA-SARUN03-MQUA050-MOT:NACQ + VA-SARUN04-MQUA020-MOT:NACQ + VA-SARUN04-MQUA050-MOT:NACQ + VA-SARUN05-MQUA020-MOT:NACQ + VA-SARUN05-MQUA050-MOT:NACQ + VA-SARUN06-MQUA020-MOT:NACQ + VA-SARUN06-MQUA050-MOT:NACQ + VA-SARUN07-MQUA020-MOT:NACQ + VA-SARUN07-MQUA050-MOT:NACQ + VA-SARUN08-MQUA020-MOT:NACQ + VA-SARUN08-MQUA050-MOT:NACQ + VA-SARUN09-MQUA020-MOT:NACQ + VA-SARUN09-MQUA050-MOT:NACQ + VA-SARUN10-MQUA020-MOT:NACQ + VA-SARUN10-MQUA050-MOT:NACQ + VA-SARUN11-MQUA020-MOT:NACQ + VA-SARUN11-MQUA050-MOT:NACQ + VA-SARUN12-MQUA020-MOT:NACQ + VA-SARUN12-MQUA050-MOT:NACQ + VA-SARUN13-MQUA020-MOT:NACQ + VA-SARUN13-MQUA050-MOT:NACQ + VA-SARUN14-MQUA020-MOT:NACQ + VA-SARUN14-MQUA050-MOT:NACQ + VA-SARUN15-MQUA020-MOT:NACQ + VA-SARUN15-MQUA050-MOT:NACQ + + + + VA-SINLH02-UIND230-MOT:X-READ + VA-SARUN03-UIND030-MOT:X-READ + VA-SARUN04-UIND030-MOT:X-READ + VA-SARUN05-UIND030-MOT:X-READ + VA-SARUN06-UIND030-MOT:X-READ + VA-SARUN07-UIND030-MOT:X-READ + VA-SARUN08-UIND030-MOT:X-READ + VA-SARUN09-UIND030-MOT:X-READ + VA-SARUN10-UIND030-MOT:X-READ + VA-SARUN11-UIND030-MOT:X-READ + VA-SARUN12-UIND030-MOT:X-READ + VA-SARUN13-UIND030-MOT:X-READ + VA-SARUN14-UIND030-MOT:X-READ + VA-SARUN15-UIND030-MOT:X-READ + + + + VA-SINLH02-UIND230-MOT:YAW-SET + VA-SARUN03-UIND030-MOT:YAW-SET + VA-SARUN04-UIND030-MOT:YAW-SET + VA-SARUN05-UIND030-MOT:YAW-SET + VA-SARUN06-UIND030-MOT:YAW-SET + VA-SARUN07-UIND030-MOT:YAW-SET + VA-SARUN08-UIND030-MOT:YAW-SET + VA-SARUN09-UIND030-MOT:YAW-SET + VA-SARUN10-UIND030-MOT:YAW-SET + VA-SARUN11-UIND030-MOT:YAW-SET + VA-SARUN12-UIND030-MOT:YAW-SET + VA-SARUN13-UIND030-MOT:YAW-SET + VA-SARUN14-UIND030-MOT:YAW-SET + VA-SARUN15-UIND030-MOT:YAW-SET + + + + SINEG01-RSYS:SET-ACC-VOLT + SINEG01-RSYS:SET-BEAM-PHASE + SINEG01-RSYS:SET-KLY-POWER + SINEG01-RSYS:SET-VSUM-PHASE + SINEG01-RSYS:SET-STATION-STATE + SINEG01-RSYS:SET-VSUM-AMPLT-SCALE + SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + SINEG01-RSYS:SET-VOLT-POWER-SCALE + SINEG01-RSYS:GET-ACC-VOLT + SINEG01-RSYS:GET-BEAM-PHASE + SINEG01-RSYS:GET-KLY-POWER + SINEG01-RSYS:GET-VSUM-PHASE + SINEG01-RSYS:GET-STATION-MODE + SINEG01-RSYS:GET-STATION-STATE + SINEG01-RSYS:GET-VSUM-AMPLT + SINEG01-RSYS:GET-RF-READY-STATUS + SINEG01-RSYS:GET-BEAM-CALIB-STATUS + SINEG01-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-MCRX120:PS-MODE + VA-SINEG01-MCRY120:PS-MODE + VA-SINEG01-MCRX160:PS-MODE + VA-SINEG01-MCRY160:PS-MODE + VA-SINEG01-MCRX180:PS-MODE + VA-SINEG01-MCRY180:PS-MODE + VA-SINEG01-MCRX200:PS-MODE + VA-SINEG01-MCRY200:PS-MODE + VA-SINEG01-MCRX220:PS-MODE + VA-SINEG01-MCRY220:PS-MODE + VA-SINSB01-MCRX010:PS-MODE + VA-SINSB01-MCRY010:PS-MODE + VA-SINSB02-MCRX010:PS-MODE + VA-SINSB02-MCRY010:PS-MODE + VA-SINLH01-MCRX020:PS-MODE + VA-SINLH01-MCRY020:PS-MODE + VA-SINLH01-MCRX050:PS-MODE + VA-SINLH01-MCRY050:PS-MODE + VA-SINLH02-MCRX010:PS-MODE + VA-SINLH02-MCRY010:PS-MODE + VA-SINLH02-MCRX100:PS-MODE + VA-SINLH02-MCRX200:PS-MODE + VA-SINLH02-MCRX300:PS-MODE + VA-SINLH02-MCRX400:PS-MODE + VA-SINLH02-MCRX410:PS-MODE + VA-SINLH02-MCRY410:PS-MODE + VA-SINLH03-MCRX040:PS-MODE + VA-SINLH03-MCRY040:PS-MODE + VA-SINLH03-MCRX080:PS-MODE + VA-SINLH03-MCRY080:PS-MODE + VA-SINSB03-MCRX130:PS-MODE + VA-SINSB03-MCRY130:PS-MODE + VA-SINSB03-MCRX230:PS-MODE + VA-SINSB03-MCRY230:PS-MODE + VA-SINSB04-MCRX130:PS-MODE + VA-SINSB04-MCRY130:PS-MODE + VA-SINSB04-MCRX230:PS-MODE + VA-SINSB04-MCRY230:PS-MODE + VA-SINSB05-MCRX130:PS-MODE + VA-SINSB05-MCRY130:PS-MODE + VA-SINSB05-MCRX230:PS-MODE + VA-SINSB05-MCRY230:PS-MODE + VA-SINBC01-MCRX020:PS-MODE + VA-SINBC01-MCRY020:PS-MODE + VA-SINBC01-MCRX050:PS-MODE + VA-SINBC01-MCRY050:PS-MODE + VA-SINBC01-MCRX070:PS-MODE + VA-SINBC01-MCRY070:PS-MODE + VA-SINBC01-MCRX090:PS-MODE + VA-SINBC01-MCRY090:PS-MODE + VA-SINBC01-MCRX110:PS-MODE + VA-SINBC01-MCRY110:PS-MODE + VA-SINBC02-MCRX100:PS-MODE + VA-SINBC02-MCRX200:PS-MODE + VA-SINBC02-MCRX300:PS-MODE + VA-SINBC02-MCRX400:PS-MODE + VA-SINDI01-MCRX020:PS-MODE + VA-SINDI01-MCRY020:PS-MODE + VA-SINDI01-MCRX070:PS-MODE + VA-SINDI01-MCRY070:PS-MODE + VA-SINDI02-MCRX020:PS-MODE + VA-SINDI02-MCRY020:PS-MODE + VA-SINDI02-MCRX030:PS-MODE + VA-SINDI02-MCRY030:PS-MODE + VA-SINDI02-MCRX050:PS-MODE + VA-SINDI02-MCRY050:PS-MODE + VA-SINDI02-MCRX060:PS-MODE + VA-SINDI02-MCRY060:PS-MODE + VA-SINDI02-MCRX090:PS-MODE + VA-SINDI02-MCRY090:PS-MODE + VA-S10CB01-MCRX230:PS-MODE + VA-S10CB01-MCRY230:PS-MODE + VA-S10CB01-MCRX430:PS-MODE + VA-S10CB01-MCRY430:PS-MODE + VA-S10CB02-MCRX230:PS-MODE + VA-S10CB02-MCRY230:PS-MODE + VA-S10CB02-MCRX430:PS-MODE + VA-S10CB02-MCRY430:PS-MODE + VA-S10DI01-MCRX100:PS-MODE + VA-S10DI01-MCRX120:PS-MODE + VA-S10DI01-MCRY120:PS-MODE + VA-S10CB03-MCRX230:PS-MODE + VA-S10CB03-MCRY230:PS-MODE + VA-S10CB03-MCRX430:PS-MODE + VA-S10CB03-MCRY430:PS-MODE + VA-S10CB04-MCRX230:PS-MODE + VA-S10CB04-MCRY230:PS-MODE + VA-S10CB04-MCRX430:PS-MODE + VA-S10CB04-MCRY430:PS-MODE + VA-S10CB05-MCRX230:PS-MODE + VA-S10CB05-MCRY230:PS-MODE + VA-S10CB05-MCRX430:PS-MODE + VA-S10CB05-MCRY430:PS-MODE + VA-S10CB06-MCRX230:PS-MODE + VA-S10CB06-MCRY230:PS-MODE + VA-S10CB06-MCRX430:PS-MODE + VA-S10CB06-MCRY430:PS-MODE + VA-S10CB07-MCRX230:PS-MODE + VA-S10CB07-MCRY230:PS-MODE + VA-S10CB07-MCRX430:PS-MODE + VA-S10CB07-MCRY430:PS-MODE + VA-S10CB08-MCRX230:PS-MODE + VA-S10CB08-MCRY230:PS-MODE + VA-S10CB08-MCRX430:PS-MODE + VA-S10CB08-MCRY430:PS-MODE + VA-S10CB09-MCRX230:PS-MODE + VA-S10CB09-MCRY230:PS-MODE + VA-S10BC01-MCRX020:PS-MODE + VA-S10BC01-MCRY020:PS-MODE + VA-S10BC01-MCRX040:PS-MODE + VA-S10BC01-MCRY040:PS-MODE + VA-S10BC01-MCRX060:PS-MODE + VA-S10BC01-MCRY060:PS-MODE + VA-S10BC01-MCRX080:PS-MODE + VA-S10BC01-MCRY080:PS-MODE + VA-S10BC01-MCRX100:PS-MODE + VA-S10BC01-MCRY100:PS-MODE + VA-S10BC02-MCRX100:PS-MODE + VA-S10BC02-MCRX200:PS-MODE + VA-S10BC02-MCRX300:PS-MODE + VA-S10BC02-MCRX400:PS-MODE + VA-S10MA01-MCRX020:PS-MODE + VA-S10MA01-MCRY020:PS-MODE + VA-S10MA01-MCRX050:PS-MODE + VA-S10MA01-MCRY050:PS-MODE + VA-S10MA01-MCRX070:PS-MODE + VA-S10MA01-MCRY070:PS-MODE + VA-S10MA01-MCRX100:PS-MODE + VA-S10MA01-MCRX110:PS-MODE + VA-S10MA01-MCRY110:PS-MODE + VA-S10MA01-MCRX130:PS-MODE + VA-S10MA01-MCRY130:PS-MODE + VA-S20CB01-MCRX430:PS-MODE + VA-S20CB01-MCRY430:PS-MODE + VA-S20CB02-MCRX430:PS-MODE + VA-S20CB02-MCRY430:PS-MODE + VA-S20CB03-MCRX430:PS-MODE + VA-S20CB03-MCRY430:PS-MODE + VA-S20SY01-MCRX020:PS-MODE + VA-S20SY01-MCRY020:PS-MODE + VA-S20SY01-MCRX030:PS-MODE + VA-S20SY01-MCRY030:PS-MODE + VA-S20SY01-MCRX050:PS-MODE + VA-S20SY01-MCRY050:PS-MODE + VA-S20SY01-MCRX080:PS-MODE + VA-S20SY01-MCRY080:PS-MODE + VA-S20SY02-MKDC010:PS-MODE + VA-S20SY02-MKAC020:PS-MODE + VA-S20SY02-MKDC030:PS-MODE + VA-S20SY02-MKAC040:PS-MODE + VA-S20SY02-MKDC050:PS-MODE + VA-S20SY02-MCRX060:PS-MODE + VA-S20SY02-MCRY060:PS-MODE + VA-S20SY02-MCRX090:PS-MODE + VA-S20SY02-MCRY090:PS-MODE + VA-S20SY02-MCRX130:PS-MODE + VA-S20SY02-MCRY130:PS-MODE + VA-S20SY02-MCRX170:PS-MODE + VA-S20SY02-MCRY170:PS-MODE + VA-S20SY03-MCRX020:PS-MODE + VA-S20SY03-MCRY020:PS-MODE + VA-S20SY03-MCRX030:PS-MODE + VA-S20SY03-MCRY030:PS-MODE + VA-S20SY03-MCRX050:PS-MODE + VA-S20SY03-MCRY050:PS-MODE + VA-S20SY03-MCRX060:PS-MODE + VA-S20SY03-MCRY060:PS-MODE + VA-S20SY03-MCRX100:PS-MODE + VA-S20SY03-MCRY100:PS-MODE + VA-S30CB01-MCRX430:PS-MODE + VA-S30CB01-MCRY430:PS-MODE + VA-S30CB02-MCRX430:PS-MODE + VA-S30CB02-MCRY430:PS-MODE + VA-S30CB03-MCRX430:PS-MODE + VA-S30CB03-MCRY430:PS-MODE + VA-S30CB04-MCRX430:PS-MODE + VA-S30CB04-MCRY430:PS-MODE + VA-S30CB05-MCRX430:PS-MODE + VA-S30CB05-MCRY430:PS-MODE + VA-S30CB06-MCRX430:PS-MODE + VA-S30CB06-MCRY430:PS-MODE + VA-S30CB07-MCRX430:PS-MODE + VA-S30CB07-MCRY430:PS-MODE + VA-S30CB08-MCRX430:PS-MODE + VA-S30CB08-MCRY430:PS-MODE + VA-S30CB09-MCRX430:PS-MODE + VA-S30CB09-MCRY430:PS-MODE + VA-S30CB10-MCRX430:PS-MODE + VA-S30CB10-MCRY430:PS-MODE + VA-S30CB11-MCRX430:PS-MODE + VA-S30CB11-MCRY430:PS-MODE + VA-S30CB12-MCRX430:PS-MODE + VA-S30CB12-MCRY430:PS-MODE + VA-S30CB13-MCRX430:PS-MODE + VA-S30CB13-MCRY430:PS-MODE + VA-S30CB14-MCRX430:PS-MODE + VA-S30CB14-MCRY430:PS-MODE + VA-S30CB15-MCRX430:PS-MODE + VA-S30CB15-MCRY430:PS-MODE + VA-SARCL01-MCRX020:PS-MODE + VA-SARCL01-MCRY020:PS-MODE + VA-SARCL01-MCRX040:PS-MODE + VA-SARCL01-MCRY040:PS-MODE + VA-SARCL01-MCRX070:PS-MODE + VA-SARCL01-MCRY070:PS-MODE + VA-SARCL01-MCRX090:PS-MODE + VA-SARCL01-MCRY090:PS-MODE + VA-SARCL01-MCRX130:PS-MODE + VA-SARCL01-MCRY130:PS-MODE + VA-SARCL01-MCRX180:PS-MODE + VA-SARCL01-MCRY180:PS-MODE + VA-SARCL02-MCRX100:PS-MODE + VA-SARCL02-MCRX120:PS-MODE + VA-SARCL02-MCRY120:PS-MODE + VA-SARCL02-MCRX200:PS-MODE + VA-SARCL02-MCRX230:PS-MODE + VA-SARCL02-MCRY230:PS-MODE + VA-SARCL02-MCRX240:PS-MODE + VA-SARCL02-MCRY240:PS-MODE + VA-SARCL02-MCRX320:PS-MODE + VA-SARCL02-MCRY320:PS-MODE + VA-SARCL02-MCRX340:PS-MODE + VA-SARCL02-MCRY340:PS-MODE + VA-SARCL02-MCRX400:PS-MODE + VA-SARCL02-MCRX450:PS-MODE + VA-SARCL02-MCRY450:PS-MODE + VA-SARCL02-MCRX480:PS-MODE + VA-SARCL02-MCRY480:PS-MODE + VA-SARCL02-MCRX500:PS-MODE + VA-SARMA01-MCRX020:PS-MODE + VA-SARMA01-MCRY020:PS-MODE + VA-SARMA01-MCRX050:PS-MODE + VA-SARMA01-MCRY050:PS-MODE + VA-SARMA01-MCRX070:PS-MODE + VA-SARMA01-MCRY070:PS-MODE + VA-SARMA01-MCRX110:PS-MODE + VA-SARMA01-MCRY110:PS-MODE + VA-SARMA01-MCRX130:PS-MODE + VA-SARMA01-MCRY130:PS-MODE + VA-SARMA02-MCRX050:PS-MODE + VA-SARMA02-MCRY050:PS-MODE + VA-SARMA02-MCRX120:PS-MODE + VA-SARMA02-MCRY120:PS-MODE + VA-SARUN01-MCRX080:PS-MODE + VA-SARUN01-MCRY080:PS-MODE + VA-SARUN02-MCRX080:PS-MODE + VA-SARUN02-MCRY080:PS-MODE + VA-SARUN03-MCRX010:PS-MODE + VA-SARUN03-MCRY010:PS-MODE + VA-SARUN03-MCRX030:PS-MODE + VA-SARUN03-MCRX040:PS-MODE + VA-SARUN03-MCRY040:PS-MODE + VA-SARUN03-MCRX080:PS-MODE + VA-SARUN03-MCRY080:PS-MODE + VA-SARUN04-MCRX010:PS-MODE + VA-SARUN04-MCRY010:PS-MODE + VA-SARUN04-MCRX030:PS-MODE + VA-SARUN04-MCRX040:PS-MODE + VA-SARUN04-MCRY040:PS-MODE + VA-SARUN04-MCRX080:PS-MODE + VA-SARUN04-MCRY080:PS-MODE + VA-SARUN05-MCRX010:PS-MODE + VA-SARUN05-MCRY010:PS-MODE + VA-SARUN05-MCRX030:PS-MODE + VA-SARUN05-MCRX040:PS-MODE + VA-SARUN05-MCRY040:PS-MODE + VA-SARUN05-MCRX080:PS-MODE + VA-SARUN05-MCRY080:PS-MODE + VA-SARUN06-MCRX010:PS-MODE + VA-SARUN06-MCRY010:PS-MODE + VA-SARUN06-MCRX030:PS-MODE + VA-SARUN06-MCRX040:PS-MODE + VA-SARUN06-MCRY040:PS-MODE + VA-SARUN06-MCRX080:PS-MODE + VA-SARUN06-MCRY080:PS-MODE + VA-SARUN07-MCRX010:PS-MODE + VA-SARUN07-MCRY010:PS-MODE + VA-SARUN07-MCRX030:PS-MODE + VA-SARUN07-MCRX040:PS-MODE + VA-SARUN07-MCRY040:PS-MODE + VA-SARUN07-MCRX080:PS-MODE + VA-SARUN07-MCRY080:PS-MODE + VA-SARUN08-MCRX010:PS-MODE + VA-SARUN08-MCRY010:PS-MODE + VA-SARUN08-MCRX030:PS-MODE + VA-SARUN08-MCRX040:PS-MODE + VA-SARUN08-MCRY040:PS-MODE + VA-SARUN08-MCRX080:PS-MODE + VA-SARUN08-MCRY080:PS-MODE + VA-SARUN09-MCRX010:PS-MODE + VA-SARUN09-MCRY010:PS-MODE + VA-SARUN09-MCRX030:PS-MODE + VA-SARUN09-MCRX040:PS-MODE + VA-SARUN09-MCRY040:PS-MODE + VA-SARUN09-MCRX080:PS-MODE + VA-SARUN09-MCRY080:PS-MODE + VA-SARUN10-MCRX010:PS-MODE + VA-SARUN10-MCRY010:PS-MODE + VA-SARUN10-MCRX030:PS-MODE + VA-SARUN10-MCRX040:PS-MODE + VA-SARUN10-MCRY040:PS-MODE + VA-SARUN10-MCRX080:PS-MODE + VA-SARUN10-MCRY080:PS-MODE + VA-SARUN11-MCRX010:PS-MODE + VA-SARUN11-MCRY010:PS-MODE + VA-SARUN11-MCRX030:PS-MODE + VA-SARUN11-MCRX040:PS-MODE + VA-SARUN11-MCRY040:PS-MODE + VA-SARUN11-MCRX080:PS-MODE + VA-SARUN11-MCRY080:PS-MODE + VA-SARUN12-MCRX010:PS-MODE + VA-SARUN12-MCRY010:PS-MODE + VA-SARUN12-MCRX030:PS-MODE + VA-SARUN12-MCRX040:PS-MODE + VA-SARUN12-MCRY040:PS-MODE + VA-SARUN12-MCRX080:PS-MODE + VA-SARUN12-MCRY080:PS-MODE + VA-SARUN13-MCRX010:PS-MODE + VA-SARUN13-MCRY010:PS-MODE + VA-SARUN13-MCRX030:PS-MODE + VA-SARUN13-MCRX040:PS-MODE + VA-SARUN13-MCRY040:PS-MODE + VA-SARUN13-MCRX080:PS-MODE + VA-SARUN13-MCRY080:PS-MODE + VA-SARUN14-MCRX010:PS-MODE + VA-SARUN14-MCRY010:PS-MODE + VA-SARUN14-MCRX030:PS-MODE + VA-SARUN14-MCRX040:PS-MODE + VA-SARUN14-MCRY040:PS-MODE + VA-SARUN14-MCRX080:PS-MODE + VA-SARUN14-MCRY080:PS-MODE + VA-SARUN15-MCRX010:PS-MODE + VA-SARUN15-MCRY010:PS-MODE + VA-SARUN15-MCRX030:PS-MODE + VA-SARUN15-MCRX040:PS-MODE + VA-SARUN15-MCRY040:PS-MODE + VA-SARUN15-MCRX080:PS-MODE + VA-SARUN15-MCRY080:PS-MODE + VA-SARUN16-MCRX080:PS-MODE + VA-SARUN16-MCRY080:PS-MODE + VA-SARUN17-MCRX080:PS-MODE + VA-SARUN17-MCRY080:PS-MODE + VA-SARUN18-MCRX080:PS-MODE + VA-SARUN18-MCRY080:PS-MODE + VA-SARUN19-MCRX080:PS-MODE + VA-SARUN19-MCRY080:PS-MODE + VA-SARUN20-MCRX080:PS-MODE + VA-SARUN20-MCRY080:PS-MODE + VA-SARBD01-MCRX020:PS-MODE + VA-SARBD01-MCRY020:PS-MODE + VA-SATSY01-MCRX020:PS-MODE + VA-SATSY01-MCRY020:PS-MODE + VA-SATSY01-MCRX040:PS-MODE + VA-SATSY01-MCRY040:PS-MODE + VA-SATSY01-MCRX070:PS-MODE + VA-SATSY01-MCRY070:PS-MODE + VA-SATSY01-MCRX090:PS-MODE + VA-SATSY01-MCRY090:PS-MODE + VA-SATSY01-MCRX210:PS-MODE + VA-SATSY01-MCRY210:PS-MODE + VA-SATSY01-MCRX230:PS-MODE + VA-SATSY01-MCRY230:PS-MODE + VA-SATSY01-MCRX260:PS-MODE + VA-SATSY01-MCRY260:PS-MODE + VA-SATSY01-MCRX280:PS-MODE + VA-SATSY01-MCRY280:PS-MODE + VA-SATSY01-MCRX300:PS-MODE + VA-SATSY01-MCRY300:PS-MODE + VA-SATSY02-MCRX010:PS-MODE + VA-SATSY02-MCRY010:PS-MODE + VA-SATSY02-MCRX100:PS-MODE + VA-SATSY02-MCRX110:PS-MODE + VA-SATSY02-MCRY110:PS-MODE + VA-SATSY02-MCRX120:PS-MODE + VA-SATSY02-MCRY120:PS-MODE + VA-SATSY02-MCRX200:PS-MODE + VA-SATSY02-MCRX230:PS-MODE + VA-SATSY02-MCRY230:PS-MODE + VA-SATSY03-MCRX010:PS-MODE + VA-SATSY03-MCRY010:PS-MODE + VA-SATSY03-MCRX040:PS-MODE + VA-SATSY03-MCRY040:PS-MODE + VA-SATSY03-MCRX070:PS-MODE + VA-SATSY03-MCRY070:PS-MODE + VA-SATSY03-MCRX100:PS-MODE + VA-SATSY03-MCRY100:PS-MODE + VA-SATSY03-MCRX130:PS-MODE + VA-SATSY03-MCRY130:PS-MODE + VA-SATCL01-MCRX100:PS-MODE + VA-SATCL01-MCRX120:PS-MODE + VA-SATCL01-MCRY120:PS-MODE + VA-SATCL01-MCRX130:PS-MODE + VA-SATCL01-MCRY130:PS-MODE + VA-SATCL01-MCRX180:PS-MODE + VA-SATCL01-MCRY180:PS-MODE + VA-SATCL01-MCRX190:PS-MODE + VA-SATCL01-MCRY190:PS-MODE + VA-SATCL01-MCRX300:PS-MODE + VA-SATDI01-MCRX040:PS-MODE + VA-SATDI01-MCRY040:PS-MODE + VA-SATDI01-MCRX050:PS-MODE + VA-SATDI01-MCRY050:PS-MODE + VA-SATDI01-MCRX220:PS-MODE + VA-SATDI01-MCRY220:PS-MODE + VA-SATDI01-MCRX230:PS-MODE + VA-SATDI01-MCRY230:PS-MODE + VA-SATDI01-MCRX250:PS-MODE + VA-SATDI01-MCRY250:PS-MODE + VA-SATDI01-MCRX260:PS-MODE + VA-SATDI01-MCRY260:PS-MODE + VA-SATDI01-MCRX280:PS-MODE + VA-SATDI01-MCRY280:PS-MODE + VA-SATDI01-MCRX300:PS-MODE + VA-SATDI01-MCRY300:PS-MODE + VA-SATMA01-MCRX050:PS-MODE + VA-SATMA01-MCRY050:PS-MODE + + + + VA-SINLH02-UIND230-MOT:NINTERVY + VA-SARUN03-UIND030-MOT:NINTERVY + VA-SARUN04-UIND030-MOT:NINTERVY + VA-SARUN05-UIND030-MOT:NINTERVY + VA-SARUN06-UIND030-MOT:NINTERVY + VA-SARUN07-UIND030-MOT:NINTERVY + VA-SARUN08-UIND030-MOT:NINTERVY + VA-SARUN09-UIND030-MOT:NINTERVY + VA-SARUN10-UIND030-MOT:NINTERVY + VA-SARUN11-UIND030-MOT:NINTERVY + VA-SARUN12-UIND030-MOT:NINTERVY + VA-SARUN13-UIND030-MOT:NINTERVY + VA-SARUN14-UIND030-MOT:NINTERVY + VA-SARUN15-UIND030-MOT:NINTERVY + + + + S10CB01-RSYS:SET-ACC-VOLT + S10CB01-RSYS:SET-BEAM-PHASE + S10CB01-RSYS:SET-KLY-POWER + S10CB01-RSYS:SET-VSUM-PHASE + S10CB01-RSYS:SET-STATION-STATE + S10CB01-RSYS:SET-VSUM-AMPLT-SCALE + S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB01-RSYS:SET-VOLT-POWER-SCALE + S10CB01-RSYS:GET-ACC-VOLT + S10CB01-RSYS:GET-BEAM-PHASE + S10CB01-RSYS:GET-KLY-POWER + S10CB01-RSYS:GET-VSUM-PHASE + S10CB01-RSYS:GET-STATION-MODE + S10CB01-RSYS:GET-STATION-STATE + S10CB01-RSYS:GET-VSUM-AMPLT + S10CB01-RSYS:GET-RF-READY-STATUS + S10CB01-RSYS:GET-BEAM-CALIB-STATUS + S10CB01-RSYS:GET-VSUM-PHASE-OFFSET + + + + S30CB02-RSYS:SET-ACC-VOLT + S30CB02-RSYS:SET-BEAM-PHASE + S30CB02-RSYS:SET-KLY-POWER + S30CB02-RSYS:SET-VSUM-PHASE + S30CB02-RSYS:SET-STATION-STATE + S30CB02-RSYS:SET-VSUM-AMPLT-SCALE + S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB02-RSYS:SET-VOLT-POWER-SCALE + S30CB02-RSYS:GET-ACC-VOLT + S30CB02-RSYS:GET-BEAM-PHASE + S30CB02-RSYS:GET-KLY-POWER + S30CB02-RSYS:GET-VSUM-PHASE + S30CB02-RSYS:GET-STATION-MODE + S30CB02-RSYS:GET-STATION-STATE + S30CB02-RSYS:GET-VSUM-AMPLT + S30CB02-RSYS:GET-RF-READY-STATUS + S30CB02-RSYS:GET-BEAM-CALIB-STATUS + S30CB02-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SARBD01-DSCR110:ROI-XMAX + VA-SARBD01-DSCR110:ROI-XMIN + VA-SARBD01-DSCR110:ROI-YMAX + VA-SARBD01-DSCR110:ROI-YMIN + VA-SARBD01-DSCR110:pipeline-x_stats_gr-g_stddiv_egu + VA-SARBD01-DSCR110:pipeline-y_stats_gr-g_stddiv_egu + VA-SARBD01-DSCR110:pipeline-slice_h_stats-g_stddiv_egu + VA-SARBD01-DSCR110:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-DBPM340:X1-VALID + VA-SINSB01-DBPM150:X1-VALID + VA-SINSB02-DBPM150:X1-VALID + VA-SINLH01-DBPM060:X1-VALID + VA-SINLH02-DBPM210:X1-VALID + VA-SINLH02-DBPM240:X1-VALID + VA-SINLH03-DBPM010:X1-VALID + VA-SINLH03-DBPM050:X1-VALID + VA-SINLH03-DBPM090:X1-VALID + VA-SINSB03-DBPM120:X1-VALID + VA-SINSB03-DBPM220:X1-VALID + VA-SINSB04-DBPM120:X1-VALID + VA-SINSB04-DBPM220:X1-VALID + VA-SINSB05-DBPM120:X1-VALID + VA-SINSB05-DBPM220:X1-VALID + VA-SINXB01-DBPM120:X1-VALID + VA-SINBC01-DBPM010:X1-VALID + VA-SINBC01-DBPM030:X1-VALID + VA-SINBC01-DBPM080:X1-VALID + VA-SINBC01-DBPM100:X1-VALID + VA-SINBC02-DBPM140:X1-VALID + VA-SINBC02-DBPM320:X1-VALID + VA-SINDI01-DBPM010:X1-VALID + VA-SINDI01-DBPM060:X1-VALID + VA-SINDI02-DBPM010:X1-VALID + VA-SINDI02-DBPM040:X1-VALID + VA-SINDI02-DBPM080:X1-VALID + VA-S10CB01-DBPM220:X1-VALID + VA-S10CB01-DBPM420:X1-VALID + VA-S10CB02-DBPM220:X1-VALID + VA-S10CB02-DBPM420:X1-VALID + VA-S10DI01-DBPM110:X1-VALID + VA-S10CB03-DBPM220:X1-VALID + VA-S10CB03-DBPM420:X1-VALID + VA-S10CB04-DBPM220:X1-VALID + VA-S10CB04-DBPM420:X1-VALID + VA-S10CB05-DBPM220:X1-VALID + VA-S10CB05-DBPM420:X1-VALID + VA-S10CB06-DBPM220:X1-VALID + VA-S10CB06-DBPM420:X1-VALID + VA-S10CB07-DBPM220:X1-VALID + VA-S10CB07-DBPM420:X1-VALID + VA-S10CB08-DBPM220:X1-VALID + VA-S10CB08-DBPM420:X1-VALID + VA-S10CB09-DBPM220:X1-VALID + VA-S10BC01-DBPM010:X1-VALID + VA-S10BC01-DBPM050:X1-VALID + VA-S10BC01-DBPM090:X1-VALID + VA-S10BC02-DBPM140:X1-VALID + VA-S10BC02-DBPM320:X1-VALID + VA-S10MA01-DBPM010:X1-VALID + VA-S10MA01-DBPM060:X1-VALID + VA-S10MA01-DBPM120:X1-VALID + VA-S20CB01-DBPM420:X1-VALID + VA-S20CB02-DBPM420:X1-VALID + VA-S20CB03-DBPM420:X1-VALID + VA-S20SY01-DBPM010:X1-VALID + VA-S20SY01-DBPM040:X1-VALID + VA-S20SY01-DBPM060:X1-VALID + VA-S20SY02-DBPM080:X1-VALID + VA-S20SY02-DBPM120:X1-VALID + VA-S20SY02-DBPM150:X1-VALID + VA-S20SY03-DBPM010:X1-VALID + VA-S20SY03-DBPM040:X1-VALID + VA-S20SY03-DBPM080:X1-VALID + VA-S30CB01-DBPM420:X1-VALID + VA-S30CB02-DBPM420:X1-VALID + VA-S30CB03-DBPM420:X1-VALID + VA-S30CB04-DBPM420:X1-VALID + VA-S30CB05-DBPM420:X1-VALID + VA-S30CB06-DBPM420:X1-VALID + VA-S30CB07-DBPM420:X1-VALID + VA-S30CB08-DBPM420:X1-VALID + VA-S30CB09-DBPM420:X1-VALID + VA-S30CB10-DBPM420:X1-VALID + VA-S30CB11-DBPM420:X1-VALID + VA-S30CB12-DBPM420:X1-VALID + VA-S30CB13-DBPM420:X1-VALID + VA-S30CB14-DBPM420:X1-VALID + VA-S30CB15-DBPM420:X1-VALID + VA-SARCL01-DBPM010:X1-VALID + VA-SARCL01-DBPM060:X1-VALID + VA-SARCL01-DBPM120:X1-VALID + VA-SARCL01-DBPM150:X1-VALID + VA-SARCL02-DBPM110:X1-VALID + VA-SARCL02-DBPM220:X1-VALID + VA-SARCL02-DBPM260:X1-VALID + VA-SARCL02-DBPM330:X1-VALID + VA-SARCL02-DBPM470:X1-VALID + VA-SARMA01-DBPM040:X1-VALID + VA-SARMA01-DBPM100:X1-VALID + VA-SARMA02-DBPM010:X1-VALID + VA-SARMA02-DBPM020:X1-VALID + VA-SARMA02-DBPM040:X1-VALID + VA-SARMA02-DBPM110:X1-VALID + VA-SARUN01-DBPM070:X1-VALID + VA-SARUN02-DBPM070:X1-VALID + VA-SARUN03-DBPM070:X1-VALID + VA-SARUN04-DBPM070:X1-VALID + VA-SARUN05-DBPM070:X1-VALID + VA-SARUN06-DBPM070:X1-VALID + VA-SARUN07-DBPM070:X1-VALID + VA-SARUN08-DBPM070:X1-VALID + VA-SARUN09-DBPM070:X1-VALID + VA-SARUN10-DBPM070:X1-VALID + VA-SARUN11-DBPM070:X1-VALID + VA-SARUN12-DBPM070:X1-VALID + VA-SARUN13-DBPM070:X1-VALID + VA-SARUN14-DBPM070:X1-VALID + VA-SARUN15-DBPM070:X1-VALID + VA-SARUN16-DBPM070:X1-VALID + VA-SARUN17-DBPM070:X1-VALID + VA-SARUN18-DBPM070:X1-VALID + VA-SARUN19-DBPM070:X1-VALID + VA-SARUN20-DBPM070:X1-VALID + VA-SARBD01-DBPM040:X1-VALID + VA-SATSY01-DBPM010:X1-VALID + VA-SATSY01-DBPM060:X1-VALID + VA-SATSY01-DBPM100:X1-VALID + VA-SATSY01-DBPM240:X1-VALID + VA-SATSY01-DBPM290:X1-VALID + VA-SATSY02-DBPM020:X1-VALID + VA-SATSY02-DBPM210:X1-VALID + VA-SATSY03-DBPM030:X1-VALID + VA-SATSY03-DBPM060:X1-VALID + VA-SATSY03-DBPM090:X1-VALID + VA-SATSY03-DBPM120:X1-VALID + VA-SATCL01-DBPM140:X1-VALID + VA-SATDI01-DBPM030:X1-VALID + VA-SATDI01-DBPM060:X1-VALID + VA-SATDI01-DBPM110:X1-VALID + VA-SATDI01-DBPM240:X1-VALID + VA-SATDI01-DBPM270:X1-VALID + VA-SATDI01-DBPM310:X1-VALID + VA-SATMA01-DBPM010:X1-VALID + VA-SATMA01-DBPM020:X1-VALID + VA-SATMA01-DBPM040:X1-VALID + VA-S10BD01-DBPM020:X1-VALID + VA-SARBD02-DBPM010:X1-VALID + VA-SARBD02-DBPM040:X1-VALID + + + + VA-SINLH02-DSCR250:ROI-XMAX + VA-SINLH02-DSCR250:ROI-XMIN + VA-SINLH02-DSCR250:ROI-YMAX + VA-SINLH02-DSCR250:ROI-YMIN + VA-SINLH02-DSCR250:pipeline-x_stats_gr-g_stddiv_egu + VA-SINLH02-DSCR250:pipeline-y_stats_gr-g_stddiv_egu + VA-SINLH02-DSCR250:pipeline-slice_h_stats-g_stddiv_egu + VA-SINLH02-DSCR250:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINBC02-MSEX130:K2L + VA-SINBC02-MSEX330:K2L + VA-S10BC02-MSEX130:K2L + VA-S10BC02-MSEX330:K2L + VA-SARCL02-MSEX140:K2L + VA-SARCL02-MSEX440:K2L + VA-SATSY01-MSEX050:K2L + VA-SATSY01-MSEX080:K2L + VA-SATSY01-MSEX220:K2L + VA-SATSY01-MSEX250:K2L + VA-SATCL01-MSEX110:K2L + VA-SATCL01-MSEX160:K2L + VA-SATCL01-MSEX200:K2L + + + + VA-S10MA01-DSCR090:ROI-XMAX + VA-S10MA01-DSCR090:ROI-XMIN + VA-S10MA01-DSCR090:ROI-YMAX + VA-S10MA01-DSCR090:ROI-YMIN + VA-S10MA01-DSCR090:pipeline-x_stats_gr-g_stddiv_egu + VA-S10MA01-DSCR090:pipeline-y_stats_gr-g_stddiv_egu + VA-S10MA01-DSCR090:pipeline-slice_h_stats-g_stddiv_egu + VA-S10MA01-DSCR090:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SATMA01-DSCR030:ROI-XMAX + VA-SATMA01-DSCR030:ROI-XMIN + VA-SATMA01-DSCR030:ROI-YMAX + VA-SATMA01-DSCR030:ROI-YMIN + VA-SATMA01-DSCR030:pipeline-x_stats_gr-g_stddiv_egu + VA-SATMA01-DSCR030:pipeline-y_stats_gr-g_stddiv_egu + VA-SATMA01-DSCR030:pipeline-slice_h_stats-g_stddiv_egu + VA-SATMA01-DSCR030:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINEG01-DBPM340:Y1 + VA-SINSB01-DBPM150:Y1 + VA-SINSB02-DBPM150:Y1 + VA-SINLH01-DBPM060:Y1 + VA-SINLH02-DBPM210:Y1 + VA-SINLH02-DBPM240:Y1 + VA-SINLH03-DBPM010:Y1 + VA-SINLH03-DBPM050:Y1 + VA-SINLH03-DBPM090:Y1 + VA-SINSB03-DBPM120:Y1 + VA-SINSB03-DBPM220:Y1 + VA-SINSB04-DBPM120:Y1 + VA-SINSB04-DBPM220:Y1 + VA-SINSB05-DBPM120:Y1 + VA-SINSB05-DBPM220:Y1 + VA-SINXB01-DBPM120:Y1 + VA-SINBC01-DBPM010:Y1 + VA-SINBC01-DBPM030:Y1 + VA-SINBC01-DBPM080:Y1 + VA-SINBC01-DBPM100:Y1 + VA-SINBC02-DBPM140:Y1 + VA-SINBC02-DBPM320:Y1 + VA-SINDI01-DBPM010:Y1 + VA-SINDI01-DBPM060:Y1 + VA-SINDI02-DBPM010:Y1 + VA-SINDI02-DBPM040:Y1 + VA-SINDI02-DBPM080:Y1 + VA-S10CB01-DBPM220:Y1 + VA-S10CB01-DBPM420:Y1 + VA-S10CB02-DBPM220:Y1 + VA-S10CB02-DBPM420:Y1 + VA-S10DI01-DBPM110:Y1 + VA-S10CB03-DBPM220:Y1 + VA-S10CB03-DBPM420:Y1 + VA-S10CB04-DBPM220:Y1 + VA-S10CB04-DBPM420:Y1 + VA-S10CB05-DBPM220:Y1 + VA-S10CB05-DBPM420:Y1 + VA-S10CB06-DBPM220:Y1 + VA-S10CB06-DBPM420:Y1 + VA-S10CB07-DBPM220:Y1 + VA-S10CB07-DBPM420:Y1 + VA-S10CB08-DBPM220:Y1 + VA-S10CB08-DBPM420:Y1 + VA-S10CB09-DBPM220:Y1 + VA-S10BC01-DBPM010:Y1 + VA-S10BC01-DBPM050:Y1 + VA-S10BC01-DBPM090:Y1 + VA-S10BC02-DBPM140:Y1 + VA-S10BC02-DBPM320:Y1 + VA-S10MA01-DBPM010:Y1 + VA-S10MA01-DBPM060:Y1 + VA-S10MA01-DBPM120:Y1 + VA-S20CB01-DBPM420:Y1 + VA-S20CB02-DBPM420:Y1 + VA-S20CB03-DBPM420:Y1 + VA-S20SY01-DBPM010:Y1 + VA-S20SY01-DBPM040:Y1 + VA-S20SY01-DBPM060:Y1 + VA-S20SY02-DBPM080:Y1 + VA-S20SY02-DBPM120:Y1 + VA-S20SY02-DBPM150:Y1 + VA-S20SY03-DBPM010:Y1 + VA-S20SY03-DBPM040:Y1 + VA-S20SY03-DBPM080:Y1 + VA-S30CB01-DBPM420:Y1 + VA-S30CB02-DBPM420:Y1 + VA-S30CB03-DBPM420:Y1 + VA-S30CB04-DBPM420:Y1 + VA-S30CB05-DBPM420:Y1 + VA-S30CB06-DBPM420:Y1 + VA-S30CB07-DBPM420:Y1 + VA-S30CB08-DBPM420:Y1 + VA-S30CB09-DBPM420:Y1 + VA-S30CB10-DBPM420:Y1 + VA-S30CB11-DBPM420:Y1 + VA-S30CB12-DBPM420:Y1 + VA-S30CB13-DBPM420:Y1 + VA-S30CB14-DBPM420:Y1 + VA-S30CB15-DBPM420:Y1 + VA-SARCL01-DBPM010:Y1 + VA-SARCL01-DBPM060:Y1 + VA-SARCL01-DBPM120:Y1 + VA-SARCL01-DBPM150:Y1 + VA-SARCL02-DBPM110:Y1 + VA-SARCL02-DBPM220:Y1 + VA-SARCL02-DBPM260:Y1 + VA-SARCL02-DBPM330:Y1 + VA-SARCL02-DBPM470:Y1 + VA-SARMA01-DBPM040:Y1 + VA-SARMA01-DBPM100:Y1 + VA-SARMA02-DBPM010:Y1 + VA-SARMA02-DBPM020:Y1 + VA-SARMA02-DBPM040:Y1 + VA-SARMA02-DBPM110:Y1 + VA-SARUN01-DBPM070:Y1 + VA-SARUN02-DBPM070:Y1 + VA-SARUN03-DBPM070:Y1 + VA-SARUN04-DBPM070:Y1 + VA-SARUN05-DBPM070:Y1 + VA-SARUN06-DBPM070:Y1 + VA-SARUN07-DBPM070:Y1 + VA-SARUN08-DBPM070:Y1 + VA-SARUN09-DBPM070:Y1 + VA-SARUN10-DBPM070:Y1 + VA-SARUN11-DBPM070:Y1 + VA-SARUN12-DBPM070:Y1 + VA-SARUN13-DBPM070:Y1 + VA-SARUN14-DBPM070:Y1 + VA-SARUN15-DBPM070:Y1 + VA-SARUN16-DBPM070:Y1 + VA-SARUN17-DBPM070:Y1 + VA-SARUN18-DBPM070:Y1 + VA-SARUN19-DBPM070:Y1 + VA-SARUN20-DBPM070:Y1 + VA-SARBD01-DBPM040:Y1 + VA-SATSY01-DBPM010:Y1 + VA-SATSY01-DBPM060:Y1 + VA-SATSY01-DBPM100:Y1 + VA-SATSY01-DBPM240:Y1 + VA-SATSY01-DBPM290:Y1 + VA-SATSY02-DBPM020:Y1 + VA-SATSY02-DBPM210:Y1 + VA-SATSY03-DBPM030:Y1 + VA-SATSY03-DBPM060:Y1 + VA-SATSY03-DBPM090:Y1 + VA-SATSY03-DBPM120:Y1 + VA-SATCL01-DBPM140:Y1 + VA-SATDI01-DBPM030:Y1 + VA-SATDI01-DBPM060:Y1 + VA-SATDI01-DBPM110:Y1 + VA-SATDI01-DBPM240:Y1 + VA-SATDI01-DBPM270:Y1 + VA-SATDI01-DBPM310:Y1 + VA-SATMA01-DBPM010:Y1 + VA-SATMA01-DBPM020:Y1 + VA-SATMA01-DBPM040:Y1 + VA-S10BD01-DBPM020:Y1 + VA-SARBD02-DBPM010:Y1 + VA-SARBD02-DBPM040:Y1 + + + + VA-SINEG01-MBND300:ANGLE + VA-SINLH02-MBND100:ANGLE + VA-SINLH02-MBND200:ANGLE + VA-SINLH02-MBND300:ANGLE + VA-SINLH02-MBND400:ANGLE + VA-SINBC02-MBND100:ANGLE + VA-SINBC02-MBND200:ANGLE + VA-SINBC02-MBND300:ANGLE + VA-SINBC02-MBND400:ANGLE + VA-S10DI01-MBND100:ANGLE + VA-S10BC02-MBND100:ANGLE + VA-S10BC02-MBND200:ANGLE + VA-S10BC02-MBND300:ANGLE + VA-S10BC02-MBND400:ANGLE + VA-S10MA01-MBND100:ANGLE + VA-S20SY02-MBND200:ANGLE + VA-SARCL02-MBND100:ANGLE + VA-SARCL02-MBND200:ANGLE + VA-SARCL02-MBND400:ANGLE + VA-SARCL02-MBND500:ANGLE + VA-SARMA02-MBND100:ANGLE + VA-SARBD01-MBND100:ANGLE + VA-SARBD01-MBND200:ANGLE + VA-SATSY01-MBND200:ANGLE + VA-SATSY01-MBND400:ANGLE + VA-SATSY02-MBND100:ANGLE + VA-SATSY02-MBND200:ANGLE + VA-SATCL01-MBND100:ANGLE + VA-SATCL01-MBND300:ANGLE + VA-SATMA01-MBND100:ANGLE + + + + VA-SINEG01-RSYS:SET-VSUM-AMPLT-SCALE + VA-SINSB01-RSYS:SET-VSUM-AMPLT-SCALE + VA-SINSB02-RSYS:SET-VSUM-AMPLT-SCALE + VA-SINSB03-RSYS:SET-VSUM-AMPLT-SCALE + VA-SINSB04-RSYS:SET-VSUM-AMPLT-SCALE + VA-SINXB01-RSYS:SET-VSUM-AMPLT-SCALE + VA-SINDI01-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB01-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB02-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB03-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB04-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB05-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB06-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB07-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB08-RSYS:SET-VSUM-AMPLT-SCALE + VA-S10CB09-RSYS:SET-VSUM-AMPLT-SCALE + VA-S20CB01-RSYS:SET-VSUM-AMPLT-SCALE + VA-S20CB02-RSYS:SET-VSUM-AMPLT-SCALE + VA-S20CB03-RSYS:SET-VSUM-AMPLT-SCALE + VA-S20CB04-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB01-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB02-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB03-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB04-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB05-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB06-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB07-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB08-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB09-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB10-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB11-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB12-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB13-RSYS:SET-VSUM-AMPLT-SCALE + VA-S30CB14-RSYS:SET-VSUM-AMPLT-SCALE + + + + S10CB04-RSYS:SET-ACC-VOLT + S10CB04-RSYS:SET-BEAM-PHASE + S10CB04-RSYS:SET-KLY-POWER + S10CB04-RSYS:SET-VSUM-PHASE + S10CB04-RSYS:SET-STATION-STATE + S10CB04-RSYS:SET-VSUM-AMPLT-SCALE + S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB04-RSYS:SET-VOLT-POWER-SCALE + S10CB04-RSYS:GET-ACC-VOLT + S10CB04-RSYS:GET-BEAM-PHASE + S10CB04-RSYS:GET-KLY-POWER + S10CB04-RSYS:GET-VSUM-PHASE + S10CB04-RSYS:GET-STATION-MODE + S10CB04-RSYS:GET-STATION-STATE + S10CB04-RSYS:GET-VSUM-AMPLT + S10CB04-RSYS:GET-RF-READY-STATUS + S10CB04-RSYS:GET-BEAM-CALIB-STATUS + S10CB04-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + VA-S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + + + + VA-SINLH02-UIND230-MOT:Y-SET + VA-SARUN03-UIND030-MOT:Y-SET + VA-SARUN04-UIND030-MOT:Y-SET + VA-SARUN05-UIND030-MOT:Y-SET + VA-SARUN06-UIND030-MOT:Y-SET + VA-SARUN07-UIND030-MOT:Y-SET + VA-SARUN08-UIND030-MOT:Y-SET + VA-SARUN09-UIND030-MOT:Y-SET + VA-SARUN10-UIND030-MOT:Y-SET + VA-SARUN11-UIND030-MOT:Y-SET + VA-SARUN12-UIND030-MOT:Y-SET + VA-SARUN13-UIND030-MOT:Y-SET + VA-SARUN14-UIND030-MOT:Y-SET + VA-SARUN15-UIND030-MOT:Y-SET + + + + VA-SINEG01-RSYS:GET-ACC-VOLT + VA-SINSB01-RSYS:GET-ACC-VOLT + VA-SINSB02-RSYS:GET-ACC-VOLT + VA-SINSB03-RSYS:GET-ACC-VOLT + VA-SINSB04-RSYS:GET-ACC-VOLT + VA-SINXB01-RSYS:GET-ACC-VOLT + VA-SINDI01-RSYS:GET-ACC-VOLT + VA-S10CB01-RSYS:GET-ACC-VOLT + VA-S10CB02-RSYS:GET-ACC-VOLT + VA-S10CB03-RSYS:GET-ACC-VOLT + VA-S10CB04-RSYS:GET-ACC-VOLT + VA-S10CB05-RSYS:GET-ACC-VOLT + VA-S10CB06-RSYS:GET-ACC-VOLT + VA-S10CB07-RSYS:GET-ACC-VOLT + VA-S10CB08-RSYS:GET-ACC-VOLT + VA-S10CB09-RSYS:GET-ACC-VOLT + VA-S20CB01-RSYS:GET-ACC-VOLT + VA-S20CB02-RSYS:GET-ACC-VOLT + VA-S20CB03-RSYS:GET-ACC-VOLT + VA-S20CB04-RSYS:GET-ACC-VOLT + VA-S30CB01-RSYS:GET-ACC-VOLT + VA-S30CB02-RSYS:GET-ACC-VOLT + VA-S30CB03-RSYS:GET-ACC-VOLT + VA-S30CB04-RSYS:GET-ACC-VOLT + VA-S30CB05-RSYS:GET-ACC-VOLT + VA-S30CB06-RSYS:GET-ACC-VOLT + VA-S30CB07-RSYS:GET-ACC-VOLT + VA-S30CB08-RSYS:GET-ACC-VOLT + VA-S30CB09-RSYS:GET-ACC-VOLT + VA-S30CB10-RSYS:GET-ACC-VOLT + VA-S30CB11-RSYS:GET-ACC-VOLT + VA-S30CB12-RSYS:GET-ACC-VOLT + VA-S30CB13-RSYS:GET-ACC-VOLT + VA-S30CB14-RSYS:GET-ACC-VOLT + + + + VA-SINEG01-RSYS:SET-BEAM-PHASE + VA-SINSB01-RSYS:SET-BEAM-PHASE + VA-SINSB02-RSYS:SET-BEAM-PHASE + VA-SINSB03-RSYS:SET-BEAM-PHASE + VA-SINSB04-RSYS:SET-BEAM-PHASE + VA-SINXB01-RSYS:SET-BEAM-PHASE + VA-SINDI01-RSYS:SET-BEAM-PHASE + VA-S10CB01-RSYS:SET-BEAM-PHASE + VA-S10CB02-RSYS:SET-BEAM-PHASE + VA-S10CB03-RSYS:SET-BEAM-PHASE + VA-S10CB04-RSYS:SET-BEAM-PHASE + VA-S10CB05-RSYS:SET-BEAM-PHASE + VA-S10CB06-RSYS:SET-BEAM-PHASE + VA-S10CB07-RSYS:SET-BEAM-PHASE + VA-S10CB08-RSYS:SET-BEAM-PHASE + VA-S10CB09-RSYS:SET-BEAM-PHASE + VA-S20CB01-RSYS:SET-BEAM-PHASE + VA-S20CB02-RSYS:SET-BEAM-PHASE + VA-S20CB03-RSYS:SET-BEAM-PHASE + VA-S20CB04-RSYS:SET-BEAM-PHASE + VA-S30CB01-RSYS:SET-BEAM-PHASE + VA-S30CB02-RSYS:SET-BEAM-PHASE + VA-S30CB03-RSYS:SET-BEAM-PHASE + VA-S30CB04-RSYS:SET-BEAM-PHASE + VA-S30CB05-RSYS:SET-BEAM-PHASE + VA-S30CB06-RSYS:SET-BEAM-PHASE + VA-S30CB07-RSYS:SET-BEAM-PHASE + VA-S30CB08-RSYS:SET-BEAM-PHASE + VA-S30CB09-RSYS:SET-BEAM-PHASE + VA-S30CB10-RSYS:SET-BEAM-PHASE + VA-S30CB11-RSYS:SET-BEAM-PHASE + VA-S30CB12-RSYS:SET-BEAM-PHASE + VA-S30CB13-RSYS:SET-BEAM-PHASE + VA-S30CB14-RSYS:SET-BEAM-PHASE + + + + VA-SINEG01-DBPM340:OFFS-X + VA-SINSB01-DBPM150:OFFS-X + VA-SINSB02-DBPM150:OFFS-X + VA-SINLH01-DBPM060:OFFS-X + VA-SINLH02-DBPM210:OFFS-X + VA-SINLH02-DBPM240:OFFS-X + VA-SINLH03-DBPM010:OFFS-X + VA-SINLH03-DBPM050:OFFS-X + VA-SINLH03-DBPM090:OFFS-X + VA-SINSB03-DBPM120:OFFS-X + VA-SINSB03-DBPM220:OFFS-X + VA-SINSB04-DBPM120:OFFS-X + VA-SINSB04-DBPM220:OFFS-X + VA-SINSB05-DBPM120:OFFS-X + VA-SINSB05-DBPM220:OFFS-X + VA-SINXB01-DBPM120:OFFS-X + VA-SINBC01-DBPM010:OFFS-X + VA-SINBC01-DBPM030:OFFS-X + VA-SINBC01-DBPM080:OFFS-X + VA-SINBC01-DBPM100:OFFS-X + VA-SINBC02-DBPM140:OFFS-X + VA-SINBC02-DBPM320:OFFS-X + VA-SINDI01-DBPM010:OFFS-X + VA-SINDI01-DBPM060:OFFS-X + VA-SINDI02-DBPM010:OFFS-X + VA-SINDI02-DBPM040:OFFS-X + VA-SINDI02-DBPM080:OFFS-X + VA-S10CB01-DBPM220:OFFS-X + VA-S10CB01-DBPM420:OFFS-X + VA-S10CB02-DBPM220:OFFS-X + VA-S10CB02-DBPM420:OFFS-X + VA-S10DI01-DBPM110:OFFS-X + VA-S10CB03-DBPM220:OFFS-X + VA-S10CB03-DBPM420:OFFS-X + VA-S10CB04-DBPM220:OFFS-X + VA-S10CB04-DBPM420:OFFS-X + VA-S10CB05-DBPM220:OFFS-X + VA-S10CB05-DBPM420:OFFS-X + VA-S10CB06-DBPM220:OFFS-X + VA-S10CB06-DBPM420:OFFS-X + VA-S10CB07-DBPM220:OFFS-X + VA-S10CB07-DBPM420:OFFS-X + VA-S10CB08-DBPM220:OFFS-X + VA-S10CB08-DBPM420:OFFS-X + VA-S10CB09-DBPM220:OFFS-X + VA-S10BC01-DBPM010:OFFS-X + VA-S10BC01-DBPM050:OFFS-X + VA-S10BC01-DBPM090:OFFS-X + VA-S10BC02-DBPM140:OFFS-X + VA-S10BC02-DBPM320:OFFS-X + VA-S10MA01-DBPM010:OFFS-X + VA-S10MA01-DBPM060:OFFS-X + VA-S10MA01-DBPM120:OFFS-X + VA-S20CB01-DBPM420:OFFS-X + VA-S20CB02-DBPM420:OFFS-X + VA-S20CB03-DBPM420:OFFS-X + VA-S20SY01-DBPM010:OFFS-X + VA-S20SY01-DBPM040:OFFS-X + VA-S20SY01-DBPM060:OFFS-X + VA-S20SY02-DBPM080:OFFS-X + VA-S20SY02-DBPM120:OFFS-X + VA-S20SY02-DBPM150:OFFS-X + VA-S20SY03-DBPM010:OFFS-X + VA-S20SY03-DBPM040:OFFS-X + VA-S20SY03-DBPM080:OFFS-X + VA-S30CB01-DBPM420:OFFS-X + VA-S30CB02-DBPM420:OFFS-X + VA-S30CB03-DBPM420:OFFS-X + VA-S30CB04-DBPM420:OFFS-X + VA-S30CB05-DBPM420:OFFS-X + VA-S30CB06-DBPM420:OFFS-X + VA-S30CB07-DBPM420:OFFS-X + VA-S30CB08-DBPM420:OFFS-X + VA-S30CB09-DBPM420:OFFS-X + VA-S30CB10-DBPM420:OFFS-X + VA-S30CB11-DBPM420:OFFS-X + VA-S30CB12-DBPM420:OFFS-X + VA-S30CB13-DBPM420:OFFS-X + VA-S30CB14-DBPM420:OFFS-X + VA-S30CB15-DBPM420:OFFS-X + VA-SARCL01-DBPM010:OFFS-X + VA-SARCL01-DBPM060:OFFS-X + VA-SARCL01-DBPM120:OFFS-X + VA-SARCL01-DBPM150:OFFS-X + VA-SARCL02-DBPM110:OFFS-X + VA-SARCL02-DBPM220:OFFS-X + VA-SARCL02-DBPM260:OFFS-X + VA-SARCL02-DBPM330:OFFS-X + VA-SARCL02-DBPM470:OFFS-X + VA-SARMA01-DBPM040:OFFS-X + VA-SARMA01-DBPM100:OFFS-X + VA-SARMA02-DBPM010:OFFS-X + VA-SARMA02-DBPM020:OFFS-X + VA-SARMA02-DBPM040:OFFS-X + VA-SARMA02-DBPM110:OFFS-X + VA-SARUN01-DBPM070:OFFS-X + VA-SARUN02-DBPM070:OFFS-X + VA-SARUN03-DBPM070:OFFS-X + VA-SARUN04-DBPM070:OFFS-X + VA-SARUN05-DBPM070:OFFS-X + VA-SARUN06-DBPM070:OFFS-X + VA-SARUN07-DBPM070:OFFS-X + VA-SARUN08-DBPM070:OFFS-X + VA-SARUN09-DBPM070:OFFS-X + VA-SARUN10-DBPM070:OFFS-X + VA-SARUN11-DBPM070:OFFS-X + VA-SARUN12-DBPM070:OFFS-X + VA-SARUN13-DBPM070:OFFS-X + VA-SARUN14-DBPM070:OFFS-X + VA-SARUN15-DBPM070:OFFS-X + VA-SARUN16-DBPM070:OFFS-X + VA-SARUN17-DBPM070:OFFS-X + VA-SARUN18-DBPM070:OFFS-X + VA-SARUN19-DBPM070:OFFS-X + VA-SARUN20-DBPM070:OFFS-X + VA-SARBD01-DBPM040:OFFS-X + VA-SATSY01-DBPM010:OFFS-X + VA-SATSY01-DBPM060:OFFS-X + VA-SATSY01-DBPM100:OFFS-X + VA-SATSY01-DBPM240:OFFS-X + VA-SATSY01-DBPM290:OFFS-X + VA-SATSY02-DBPM020:OFFS-X + VA-SATSY02-DBPM210:OFFS-X + VA-SATSY03-DBPM030:OFFS-X + VA-SATSY03-DBPM060:OFFS-X + VA-SATSY03-DBPM090:OFFS-X + VA-SATSY03-DBPM120:OFFS-X + VA-SATCL01-DBPM140:OFFS-X + VA-SATDI01-DBPM030:OFFS-X + VA-SATDI01-DBPM060:OFFS-X + VA-SATDI01-DBPM110:OFFS-X + VA-SATDI01-DBPM240:OFFS-X + VA-SATDI01-DBPM270:OFFS-X + VA-SATDI01-DBPM310:OFFS-X + VA-SATMA01-DBPM010:OFFS-X + VA-SATMA01-DBPM020:OFFS-X + VA-SATMA01-DBPM040:OFFS-X + VA-S10BD01-DBPM020:OFFS-X + VA-SARBD02-DBPM010:OFFS-X + VA-SARBD02-DBPM040:OFFS-X + + + + VA-S10MA01-SSTP115:IN-OUT + VA-SARMA02-SSTP105:IN-OUT + VA-SATMA01-SSTP105:IN-OUT + + + + S10CB08-RSYS:SET-ACC-VOLT + S10CB08-RSYS:SET-BEAM-PHASE + S10CB08-RSYS:SET-KLY-POWER + S10CB08-RSYS:SET-VSUM-PHASE + S10CB08-RSYS:SET-STATION-STATE + S10CB08-RSYS:SET-VSUM-AMPLT-SCALE + S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB08-RSYS:SET-VOLT-POWER-SCALE + S10CB08-RSYS:GET-ACC-VOLT + S10CB08-RSYS:GET-BEAM-PHASE + S10CB08-RSYS:GET-KLY-POWER + S10CB08-RSYS:GET-VSUM-PHASE + S10CB08-RSYS:GET-STATION-MODE + S10CB08-RSYS:GET-STATION-STATE + S10CB08-RSYS:GET-VSUM-AMPLT + S10CB08-RSYS:GET-RF-READY-STATUS + S10CB08-RSYS:GET-BEAM-CALIB-STATUS + S10CB08-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINLH02-UIND230-MOT:YMAX + VA-SARUN03-UIND030-MOT:YMAX + VA-SARUN04-UIND030-MOT:YMAX + VA-SARUN05-UIND030-MOT:YMAX + VA-SARUN06-UIND030-MOT:YMAX + VA-SARUN07-UIND030-MOT:YMAX + VA-SARUN08-UIND030-MOT:YMAX + VA-SARUN09-UIND030-MOT:YMAX + VA-SARUN10-UIND030-MOT:YMAX + VA-SARUN11-UIND030-MOT:YMAX + VA-SARUN12-UIND030-MOT:YMAX + VA-SARUN13-UIND030-MOT:YMAX + VA-SARUN14-UIND030-MOT:YMAX + VA-SARUN15-UIND030-MOT:YMAX + + + + VA-SINEG01-RSYS:GET-BEAM-PHASE + VA-SINSB01-RSYS:GET-BEAM-PHASE + VA-SINSB02-RSYS:GET-BEAM-PHASE + VA-SINSB03-RSYS:GET-BEAM-PHASE + VA-SINSB04-RSYS:GET-BEAM-PHASE + VA-SINXB01-RSYS:GET-BEAM-PHASE + VA-SINDI01-RSYS:GET-BEAM-PHASE + VA-S10CB01-RSYS:GET-BEAM-PHASE + VA-S10CB02-RSYS:GET-BEAM-PHASE + VA-S10CB03-RSYS:GET-BEAM-PHASE + VA-S10CB04-RSYS:GET-BEAM-PHASE + VA-S10CB05-RSYS:GET-BEAM-PHASE + VA-S10CB06-RSYS:GET-BEAM-PHASE + VA-S10CB07-RSYS:GET-BEAM-PHASE + VA-S10CB08-RSYS:GET-BEAM-PHASE + VA-S10CB09-RSYS:GET-BEAM-PHASE + VA-S20CB01-RSYS:GET-BEAM-PHASE + VA-S20CB02-RSYS:GET-BEAM-PHASE + VA-S20CB03-RSYS:GET-BEAM-PHASE + VA-S20CB04-RSYS:GET-BEAM-PHASE + VA-S30CB01-RSYS:GET-BEAM-PHASE + VA-S30CB02-RSYS:GET-BEAM-PHASE + VA-S30CB03-RSYS:GET-BEAM-PHASE + VA-S30CB04-RSYS:GET-BEAM-PHASE + VA-S30CB05-RSYS:GET-BEAM-PHASE + VA-S30CB06-RSYS:GET-BEAM-PHASE + VA-S30CB07-RSYS:GET-BEAM-PHASE + VA-S30CB08-RSYS:GET-BEAM-PHASE + VA-S30CB09-RSYS:GET-BEAM-PHASE + VA-S30CB10-RSYS:GET-BEAM-PHASE + VA-S30CB11-RSYS:GET-BEAM-PHASE + VA-S30CB12-RSYS:GET-BEAM-PHASE + VA-S30CB13-RSYS:GET-BEAM-PHASE + VA-S30CB14-RSYS:GET-BEAM-PHASE + + + + VA-SINEG01-MQUA140:PS-MODE + VA-SINEG01-MQUA150:PS-MODE + VA-SINEG01-MQUA310:PS-MODE + VA-SINEG01-MQUA320:PS-MODE + VA-SINLH01-MQUA020:PS-MODE + VA-SINLH01-MQUA030:PS-MODE + VA-SINLH01-MQUA040:PS-MODE + VA-SINLH01-MQUA050:PS-MODE + VA-SINLH01-MQUA070:PS-MODE + VA-SINLH02-MQUA010:PS-MODE + VA-SINLH02-MQUA410:PS-MODE + VA-SINLH03-MQUA030:PS-MODE + VA-SINLH03-MQUA040:PS-MODE + VA-SINLH03-MQUA060:PS-MODE + VA-SINLH03-MQUA080:PS-MODE + VA-SINSB03-MQUA130:PS-MODE + VA-SINSB03-MQUA230:PS-MODE + VA-SINSB04-MQUA130:PS-MODE + VA-SINSB04-MQUA230:PS-MODE + VA-SINSB05-MQUA130:PS-MODE + VA-SINSB05-MQUA230:PS-MODE + VA-SINBC01-MQUA020:PS-MODE + VA-SINBC01-MQUA050:PS-MODE + VA-SINBC01-MQUA070:PS-MODE + VA-SINBC01-MQUA090:PS-MODE + VA-SINBC01-MQUA110:PS-MODE + VA-SINBC02-MQUA110:PS-MODE + VA-SINBC02-MQUA120:PS-MODE + VA-SINBC02-MQUA340:PS-MODE + VA-SINBC02-MQUA350:PS-MODE + VA-SINDI01-MQUA020:PS-MODE + VA-SINDI01-MQUA030:PS-MODE + VA-SINDI01-MQUA070:PS-MODE + VA-SINDI02-MQUA020:PS-MODE + VA-SINDI02-MQUA030:PS-MODE + VA-SINDI02-MQUA050:PS-MODE + VA-SINDI02-MQUA060:PS-MODE + VA-SINDI02-MQUA070:PS-MODE + VA-SINDI02-MQUA090:PS-MODE + VA-S10CB01-MQUA230:PS-MODE + VA-S10CB01-MQUA430:PS-MODE + VA-S10CB02-MQUA230:PS-MODE + VA-S10CB02-MQUA430:PS-MODE + VA-S10DI01-MQUA030:PS-MODE + VA-S10DI01-MQUA120:PS-MODE + VA-S10CB03-MQUA230:PS-MODE + VA-S10CB03-MQUA430:PS-MODE + VA-S10CB04-MQUA230:PS-MODE + VA-S10CB04-MQUA430:PS-MODE + VA-S10CB05-MQUA230:PS-MODE + VA-S10CB05-MQUA430:PS-MODE + VA-S10CB06-MQUA230:PS-MODE + VA-S10CB06-MQUA430:PS-MODE + VA-S10CB07-MQUA230:PS-MODE + VA-S10CB07-MQUA430:PS-MODE + VA-S10CB08-MQUA230:PS-MODE + VA-S10CB08-MQUA430:PS-MODE + VA-S10CB09-MQUA230:PS-MODE + VA-S10BC01-MQUA020:PS-MODE + VA-S10BC01-MQUA040:PS-MODE + VA-S10BC01-MQUA060:PS-MODE + VA-S10BC01-MQUA080:PS-MODE + VA-S10BC01-MQUA100:PS-MODE + VA-S10BC02-MQUA110:PS-MODE + VA-S10BC02-MQUA120:PS-MODE + VA-S10BC02-MQUA340:PS-MODE + VA-S10BC02-MQUA350:PS-MODE + VA-S10MA01-MQUA020:PS-MODE + VA-S10MA01-MQUA050:PS-MODE + VA-S10MA01-MQUA070:PS-MODE + VA-S10MA01-MQUA110:PS-MODE + VA-S10MA01-MQUA130:PS-MODE + VA-S20CB01-MQUA430:PS-MODE + VA-S20CB02-MQUA430:PS-MODE + VA-S20CB03-MQUA430:PS-MODE + VA-S20SY01-MQUA020:PS-MODE + VA-S20SY01-MQUA030:PS-MODE + VA-S20SY01-MQUA050:PS-MODE + VA-S20SY01-MQUA080:PS-MODE + VA-S20SY02-MQUA070:PS-MODE + VA-S20SY02-MQUA100:PS-MODE + VA-S20SY02-MQUA140:PS-MODE + VA-S20SY02-MQUA180:PS-MODE + VA-S20SY03-MQUA020:PS-MODE + VA-S20SY03-MQUA030:PS-MODE + VA-S20SY03-MQUA050:PS-MODE + VA-S20SY03-MQUA060:PS-MODE + VA-S20SY03-MQUA100:PS-MODE + VA-S30CB01-MQUA430:PS-MODE + VA-S30CB02-MQUA430:PS-MODE + VA-S30CB03-MQUA430:PS-MODE + VA-S30CB04-MQUA430:PS-MODE + VA-S30CB05-MQUA430:PS-MODE + VA-S30CB06-MQUA430:PS-MODE + VA-S30CB07-MQUA430:PS-MODE + VA-S30CB08-MQUA430:PS-MODE + VA-S30CB09-MQUA430:PS-MODE + VA-S30CB10-MQUA430:PS-MODE + VA-S30CB11-MQUA430:PS-MODE + VA-S30CB12-MQUA430:PS-MODE + VA-S30CB13-MQUA430:PS-MODE + VA-S30CB14-MQUA430:PS-MODE + VA-S30CB15-MQUA430:PS-MODE + VA-SARCL01-MQUA020:PS-MODE + VA-SARCL01-MQUA050:PS-MODE + VA-SARCL01-MQUA080:PS-MODE + VA-SARCL01-MQUA100:PS-MODE + VA-SARCL01-MQUA140:PS-MODE + VA-SARCL01-MQUA190:PS-MODE + VA-SARCL02-MQUA130:PS-MODE + VA-SARCL02-MQUA150:PS-MODE + VA-SARCL02-MQUA160:PS-MODE + VA-SARCL02-MQUA210:PS-MODE + VA-SARCL02-MQUA250:PS-MODE + VA-SARCL02-MQUA300:PS-MODE + VA-SARCL02-MQUA310:PS-MODE + VA-SARCL02-MQUA350:PS-MODE + VA-SARCL02-MQUA420:PS-MODE + VA-SARCL02-MQUA430:PS-MODE + VA-SARCL02-MQUA460:PS-MODE + VA-SARMA01-MQUA010:PS-MODE + VA-SARMA01-MQUA060:PS-MODE + VA-SARMA01-MQUA080:PS-MODE + VA-SARMA01-MQUA120:PS-MODE + VA-SARMA01-MQUA140:PS-MODE + VA-SARMA02-MQUA050:PS-MODE + VA-SARMA02-MQUA120:PS-MODE + VA-SARUN01-MQUA080:PS-MODE + VA-SARUN02-MQUA080:PS-MODE + VA-SARUN03-MQUA080:PS-MODE + VA-SARUN04-MQUA080:PS-MODE + VA-SARUN05-MQUA080:PS-MODE + VA-SARUN06-MQUA080:PS-MODE + VA-SARUN07-MQUA080:PS-MODE + VA-SARUN08-MQUA080:PS-MODE + VA-SARUN09-MQUA080:PS-MODE + VA-SARUN10-MQUA080:PS-MODE + VA-SARUN11-MQUA080:PS-MODE + VA-SARUN12-MQUA080:PS-MODE + VA-SARUN13-MQUA080:PS-MODE + VA-SARUN14-MQUA080:PS-MODE + VA-SARUN15-MQUA080:PS-MODE + VA-SARUN16-MQUA080:PS-MODE + VA-SARUN17-MQUA080:PS-MODE + VA-SARUN18-MQUA080:PS-MODE + VA-SARUN19-MQUA080:PS-MODE + VA-SARUN20-MQUA080:PS-MODE + VA-SARBD01-MQUA020:PS-MODE + VA-SATSY01-MQUA020:PS-MODE + VA-SATSY01-MQUA030:PS-MODE + VA-SATSY01-MQUA040:PS-MODE + VA-SATSY01-MQUA070:PS-MODE + VA-SATSY01-MQUA090:PS-MODE + VA-SATSY01-MQUA210:PS-MODE + VA-SATSY01-MQUA230:PS-MODE + VA-SATSY01-MQUA260:PS-MODE + VA-SATSY01-MQUA270:PS-MODE + VA-SATSY01-MQUA280:PS-MODE + VA-SATSY01-MQUA300:PS-MODE + VA-SATSY02-MQUA010:PS-MODE + VA-SATSY02-MQUA110:PS-MODE + VA-SATSY02-MQUA120:PS-MODE + VA-SATSY02-MQUA230:PS-MODE + VA-SATSY03-MQUA010:PS-MODE + VA-SATSY03-MQUA040:PS-MODE + VA-SATSY03-MQUA070:PS-MODE + VA-SATSY03-MQUA100:PS-MODE + VA-SATSY03-MQUA130:PS-MODE + VA-SATCL01-MQUA120:PS-MODE + VA-SATCL01-MQUA130:PS-MODE + VA-SATCL01-MQUA180:PS-MODE + VA-SATCL01-MQUA190:PS-MODE + VA-SATDI01-MQUA040:PS-MODE + VA-SATDI01-MQUA050:PS-MODE + VA-SATDI01-MQUA220:PS-MODE + VA-SATDI01-MQUA230:PS-MODE + VA-SATDI01-MQUA250:PS-MODE + VA-SATDI01-MQUA260:PS-MODE + VA-SATDI01-MQUA280:PS-MODE + VA-SATDI01-MQUA300:PS-MODE + VA-SATMA01-MQUA050:PS-MODE + VA-S10BD01-MQUA010:PS-MODE + VA-SARBD02-MQUA030:PS-MODE + + + + VA-SARUN03-MQUA020:KL + VA-SARUN03-MQUA050:KL + VA-SARUN04-MQUA020:KL + VA-SARUN04-MQUA050:KL + VA-SARUN05-MQUA020:KL + VA-SARUN05-MQUA050:KL + VA-SARUN06-MQUA020:KL + VA-SARUN06-MQUA050:KL + VA-SARUN07-MQUA020:KL + VA-SARUN07-MQUA050:KL + VA-SARUN08-MQUA020:KL + VA-SARUN08-MQUA050:KL + VA-SARUN09-MQUA020:KL + VA-SARUN09-MQUA050:KL + VA-SARUN10-MQUA020:KL + VA-SARUN10-MQUA050:KL + VA-SARUN11-MQUA020:KL + VA-SARUN11-MQUA050:KL + VA-SARUN12-MQUA020:KL + VA-SARUN12-MQUA050:KL + VA-SARUN13-MQUA020:KL + VA-SARUN13-MQUA050:KL + VA-SARUN14-MQUA020:KL + VA-SARUN14-MQUA050:KL + VA-SARUN15-MQUA020:KL + VA-SARUN15-MQUA050:KL + + + + SINSB03-RSYS:SET-ACC-VOLT + SINSB03-RSYS:SET-BEAM-PHASE + SINSB03-RSYS:SET-KLY-POWER + SINSB03-RSYS:SET-VSUM-PHASE + SINSB03-RSYS:SET-STATION-STATE + SINSB03-RSYS:SET-VSUM-AMPLT-SCALE + SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + SINSB03-RSYS:SET-VOLT-POWER-SCALE + SINSB03-RSYS:GET-ACC-VOLT + SINSB03-RSYS:GET-BEAM-PHASE + SINSB03-RSYS:GET-KLY-POWER + SINSB03-RSYS:GET-VSUM-PHASE + SINSB03-RSYS:GET-STATION-MODE + SINSB03-RSYS:GET-STATION-STATE + SINSB03-RSYS:GET-VSUM-AMPLT + SINSB03-RSYS:GET-RF-READY-STATUS + SINSB03-RSYS:GET-BEAM-CALIB-STATUS + SINSB03-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-MBND300:PS-MODE + VA-SINLH02-MBND100:PS-MODE + VA-SINLH02-MBND200:PS-MODE + VA-SINLH02-MBND300:PS-MODE + VA-SINLH02-MBND400:PS-MODE + VA-SINBC02-MBND100:PS-MODE + VA-SINBC02-MBND200:PS-MODE + VA-SINBC02-MBND300:PS-MODE + VA-SINBC02-MBND400:PS-MODE + VA-S10DI01-MBND100:PS-MODE + VA-S10BC02-MBND100:PS-MODE + VA-S10BC02-MBND200:PS-MODE + VA-S10BC02-MBND300:PS-MODE + VA-S10BC02-MBND400:PS-MODE + VA-S10MA01-MBND100:PS-MODE + VA-S20SY02-MBND200:PS-MODE + VA-SARCL02-MBND100:PS-MODE + VA-SARCL02-MBND200:PS-MODE + VA-SARCL02-MBND400:PS-MODE + VA-SARCL02-MBND500:PS-MODE + VA-SARMA02-MBND100:PS-MODE + VA-SARBD01-MBND100:PS-MODE + VA-SARBD01-MBND200:PS-MODE + VA-SATSY01-MBND200:PS-MODE + VA-SATSY01-MBND400:PS-MODE + VA-SATSY02-MBND100:PS-MODE + VA-SATSY02-MBND200:PS-MODE + VA-SATCL01-MBND100:PS-MODE + VA-SATCL01-MBND300:PS-MODE + VA-SATMA01-MBND100:PS-MODE + + + + VA-SINEG01-DSCR190:GET-SCREEN + VA-SINEG01-DSCR350:GET-SCREEN + VA-SINLH01-DSCR080:GET-SCREEN + VA-SINLH02-DSCR220:GET-SCREEN + VA-SINLH02-DSCR250:GET-SCREEN + VA-SINLH03-DSCR070:GET-SCREEN + VA-SINSB03-DSCR110:GET-SCREEN + VA-SINBC01-DSCR040:GET-SCREEN + VA-SINBC02-DSCR220:GET-SCREEN + VA-SINDI01-DSCR080:GET-SCREEN + VA-S10DI01-DSCR020:GET-SCREEN + VA-S10BC02-DSCR220:GET-SCREEN + VA-S10MA01-DSCR090:GET-SCREEN + VA-SARCL01-DSCR170:GET-SCREEN + VA-SARCL02-DSCR280:GET-SCREEN + VA-SARMA02-DSCR030:GET-SCREEN + VA-SARBD01-DSCR050:GET-SCREEN + VA-SARBD01-DSCR110:GET-SCREEN + VA-SATCL01-DSCR150:GET-SCREEN + VA-SATMA01-DSCR030:GET-SCREEN + VA-SINBD01-DSCR010:GET-SCREEN + VA-S10BD01-DSCR030:GET-SCREEN + VA-SARBD02-DSCR050:GET-SCREEN + + + + S10CB05-RSYS:SET-ACC-VOLT + S10CB05-RSYS:SET-BEAM-PHASE + S10CB05-RSYS:SET-KLY-POWER + S10CB05-RSYS:SET-VSUM-PHASE + S10CB05-RSYS:SET-STATION-STATE + S10CB05-RSYS:SET-VSUM-AMPLT-SCALE + S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB05-RSYS:SET-VOLT-POWER-SCALE + S10CB05-RSYS:GET-ACC-VOLT + S10CB05-RSYS:GET-BEAM-PHASE + S10CB05-RSYS:GET-KLY-POWER + S10CB05-RSYS:GET-VSUM-PHASE + S10CB05-RSYS:GET-STATION-MODE + S10CB05-RSYS:GET-STATION-STATE + S10CB05-RSYS:GET-VSUM-AMPLT + S10CB05-RSYS:GET-RF-READY-STATUS + S10CB05-RSYS:GET-BEAM-CALIB-STATUS + S10CB05-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-RSYS:GET-VSUM-PHASE + VA-SINSB01-RSYS:GET-VSUM-PHASE + VA-SINSB02-RSYS:GET-VSUM-PHASE + VA-SINSB03-RSYS:GET-VSUM-PHASE + VA-SINSB04-RSYS:GET-VSUM-PHASE + VA-SINXB01-RSYS:GET-VSUM-PHASE + VA-SINDI01-RSYS:GET-VSUM-PHASE + VA-S10CB01-RSYS:GET-VSUM-PHASE + VA-S10CB02-RSYS:GET-VSUM-PHASE + VA-S10CB03-RSYS:GET-VSUM-PHASE + VA-S10CB04-RSYS:GET-VSUM-PHASE + VA-S10CB05-RSYS:GET-VSUM-PHASE + VA-S10CB06-RSYS:GET-VSUM-PHASE + VA-S10CB07-RSYS:GET-VSUM-PHASE + VA-S10CB08-RSYS:GET-VSUM-PHASE + VA-S10CB09-RSYS:GET-VSUM-PHASE + VA-S20CB01-RSYS:GET-VSUM-PHASE + VA-S20CB02-RSYS:GET-VSUM-PHASE + VA-S20CB03-RSYS:GET-VSUM-PHASE + VA-S20CB04-RSYS:GET-VSUM-PHASE + VA-S30CB01-RSYS:GET-VSUM-PHASE + VA-S30CB02-RSYS:GET-VSUM-PHASE + VA-S30CB03-RSYS:GET-VSUM-PHASE + VA-S30CB04-RSYS:GET-VSUM-PHASE + VA-S30CB05-RSYS:GET-VSUM-PHASE + VA-S30CB06-RSYS:GET-VSUM-PHASE + VA-S30CB07-RSYS:GET-VSUM-PHASE + VA-S30CB08-RSYS:GET-VSUM-PHASE + VA-S30CB09-RSYS:GET-VSUM-PHASE + VA-S30CB10-RSYS:GET-VSUM-PHASE + VA-S30CB11-RSYS:GET-VSUM-PHASE + VA-S30CB12-RSYS:GET-VSUM-PHASE + VA-S30CB13-RSYS:GET-VSUM-PHASE + VA-S30CB14-RSYS:GET-VSUM-PHASE + + + + VA-SINEG01-DBPM340:Q1-VALID + VA-SINSB01-DBPM150:Q1-VALID + VA-SINSB02-DBPM150:Q1-VALID + VA-SINLH01-DBPM060:Q1-VALID + VA-SINLH02-DBPM210:Q1-VALID + VA-SINLH02-DBPM240:Q1-VALID + VA-SINLH03-DBPM010:Q1-VALID + VA-SINLH03-DBPM050:Q1-VALID + VA-SINLH03-DBPM090:Q1-VALID + VA-SINSB03-DBPM120:Q1-VALID + VA-SINSB03-DBPM220:Q1-VALID + VA-SINSB04-DBPM120:Q1-VALID + VA-SINSB04-DBPM220:Q1-VALID + VA-SINSB05-DBPM120:Q1-VALID + VA-SINSB05-DBPM220:Q1-VALID + VA-SINXB01-DBPM120:Q1-VALID + VA-SINBC01-DBPM010:Q1-VALID + VA-SINBC01-DBPM030:Q1-VALID + VA-SINBC01-DBPM080:Q1-VALID + VA-SINBC01-DBPM100:Q1-VALID + VA-SINBC02-DBPM140:Q1-VALID + VA-SINBC02-DBPM320:Q1-VALID + VA-SINDI01-DBPM010:Q1-VALID + VA-SINDI01-DBPM060:Q1-VALID + VA-SINDI02-DBPM010:Q1-VALID + VA-SINDI02-DBPM040:Q1-VALID + VA-SINDI02-DBPM080:Q1-VALID + VA-S10CB01-DBPM220:Q1-VALID + VA-S10CB01-DBPM420:Q1-VALID + VA-S10CB02-DBPM220:Q1-VALID + VA-S10CB02-DBPM420:Q1-VALID + VA-S10DI01-DBPM110:Q1-VALID + VA-S10CB03-DBPM220:Q1-VALID + VA-S10CB03-DBPM420:Q1-VALID + VA-S10CB04-DBPM220:Q1-VALID + VA-S10CB04-DBPM420:Q1-VALID + VA-S10CB05-DBPM220:Q1-VALID + VA-S10CB05-DBPM420:Q1-VALID + VA-S10CB06-DBPM220:Q1-VALID + VA-S10CB06-DBPM420:Q1-VALID + VA-S10CB07-DBPM220:Q1-VALID + VA-S10CB07-DBPM420:Q1-VALID + VA-S10CB08-DBPM220:Q1-VALID + VA-S10CB08-DBPM420:Q1-VALID + VA-S10CB09-DBPM220:Q1-VALID + VA-S10BC01-DBPM010:Q1-VALID + VA-S10BC01-DBPM050:Q1-VALID + VA-S10BC01-DBPM090:Q1-VALID + VA-S10BC02-DBPM140:Q1-VALID + VA-S10BC02-DBPM320:Q1-VALID + VA-S10MA01-DBPM010:Q1-VALID + VA-S10MA01-DBPM060:Q1-VALID + VA-S10MA01-DBPM120:Q1-VALID + VA-S20CB01-DBPM420:Q1-VALID + VA-S20CB02-DBPM420:Q1-VALID + VA-S20CB03-DBPM420:Q1-VALID + VA-S20SY01-DBPM010:Q1-VALID + VA-S20SY01-DBPM040:Q1-VALID + VA-S20SY01-DBPM060:Q1-VALID + VA-S20SY02-DBPM080:Q1-VALID + VA-S20SY02-DBPM120:Q1-VALID + VA-S20SY02-DBPM150:Q1-VALID + VA-S20SY03-DBPM010:Q1-VALID + VA-S20SY03-DBPM040:Q1-VALID + VA-S20SY03-DBPM080:Q1-VALID + VA-S30CB01-DBPM420:Q1-VALID + VA-S30CB02-DBPM420:Q1-VALID + VA-S30CB03-DBPM420:Q1-VALID + VA-S30CB04-DBPM420:Q1-VALID + VA-S30CB05-DBPM420:Q1-VALID + VA-S30CB06-DBPM420:Q1-VALID + VA-S30CB07-DBPM420:Q1-VALID + VA-S30CB08-DBPM420:Q1-VALID + VA-S30CB09-DBPM420:Q1-VALID + VA-S30CB10-DBPM420:Q1-VALID + VA-S30CB11-DBPM420:Q1-VALID + VA-S30CB12-DBPM420:Q1-VALID + VA-S30CB13-DBPM420:Q1-VALID + VA-S30CB14-DBPM420:Q1-VALID + VA-S30CB15-DBPM420:Q1-VALID + VA-SARCL01-DBPM010:Q1-VALID + VA-SARCL01-DBPM060:Q1-VALID + VA-SARCL01-DBPM120:Q1-VALID + VA-SARCL01-DBPM150:Q1-VALID + VA-SARCL02-DBPM110:Q1-VALID + VA-SARCL02-DBPM220:Q1-VALID + VA-SARCL02-DBPM260:Q1-VALID + VA-SARCL02-DBPM330:Q1-VALID + VA-SARCL02-DBPM470:Q1-VALID + VA-SARMA01-DBPM040:Q1-VALID + VA-SARMA01-DBPM100:Q1-VALID + VA-SARMA02-DBPM010:Q1-VALID + VA-SARMA02-DBPM020:Q1-VALID + VA-SARMA02-DBPM040:Q1-VALID + VA-SARMA02-DBPM110:Q1-VALID + VA-SARUN01-DBPM070:Q1-VALID + VA-SARUN02-DBPM070:Q1-VALID + VA-SARUN03-DBPM070:Q1-VALID + VA-SARUN04-DBPM070:Q1-VALID + VA-SARUN05-DBPM070:Q1-VALID + VA-SARUN06-DBPM070:Q1-VALID + VA-SARUN07-DBPM070:Q1-VALID + VA-SARUN08-DBPM070:Q1-VALID + VA-SARUN09-DBPM070:Q1-VALID + VA-SARUN10-DBPM070:Q1-VALID + VA-SARUN11-DBPM070:Q1-VALID + VA-SARUN12-DBPM070:Q1-VALID + VA-SARUN13-DBPM070:Q1-VALID + VA-SARUN14-DBPM070:Q1-VALID + VA-SARUN15-DBPM070:Q1-VALID + VA-SARUN16-DBPM070:Q1-VALID + VA-SARUN17-DBPM070:Q1-VALID + VA-SARUN18-DBPM070:Q1-VALID + VA-SARUN19-DBPM070:Q1-VALID + VA-SARUN20-DBPM070:Q1-VALID + VA-SARBD01-DBPM040:Q1-VALID + VA-SATSY01-DBPM010:Q1-VALID + VA-SATSY01-DBPM060:Q1-VALID + VA-SATSY01-DBPM100:Q1-VALID + VA-SATSY01-DBPM240:Q1-VALID + VA-SATSY01-DBPM290:Q1-VALID + VA-SATSY02-DBPM020:Q1-VALID + VA-SATSY02-DBPM210:Q1-VALID + VA-SATSY03-DBPM030:Q1-VALID + VA-SATSY03-DBPM060:Q1-VALID + VA-SATSY03-DBPM090:Q1-VALID + VA-SATSY03-DBPM120:Q1-VALID + VA-SATCL01-DBPM140:Q1-VALID + VA-SATDI01-DBPM030:Q1-VALID + VA-SATDI01-DBPM060:Q1-VALID + VA-SATDI01-DBPM110:Q1-VALID + VA-SATDI01-DBPM240:Q1-VALID + VA-SATDI01-DBPM270:Q1-VALID + VA-SATDI01-DBPM310:Q1-VALID + VA-SATMA01-DBPM010:Q1-VALID + VA-SATMA01-DBPM020:Q1-VALID + VA-SATMA01-DBPM040:Q1-VALID + VA-S10BD01-DBPM020:Q1-VALID + VA-SARBD02-DBPM010:Q1-VALID + VA-SARBD02-DBPM040:Q1-VALID + + + + VA-SINEG01-DBPM340:OFFS-Y + VA-SINSB01-DBPM150:OFFS-Y + VA-SINSB02-DBPM150:OFFS-Y + VA-SINLH01-DBPM060:OFFS-Y + VA-SINLH02-DBPM210:OFFS-Y + VA-SINLH02-DBPM240:OFFS-Y + VA-SINLH03-DBPM010:OFFS-Y + VA-SINLH03-DBPM050:OFFS-Y + VA-SINLH03-DBPM090:OFFS-Y + VA-SINSB03-DBPM120:OFFS-Y + VA-SINSB03-DBPM220:OFFS-Y + VA-SINSB04-DBPM120:OFFS-Y + VA-SINSB04-DBPM220:OFFS-Y + VA-SINSB05-DBPM120:OFFS-Y + VA-SINSB05-DBPM220:OFFS-Y + VA-SINXB01-DBPM120:OFFS-Y + VA-SINBC01-DBPM010:OFFS-Y + VA-SINBC01-DBPM030:OFFS-Y + VA-SINBC01-DBPM080:OFFS-Y + VA-SINBC01-DBPM100:OFFS-Y + VA-SINBC02-DBPM140:OFFS-Y + VA-SINBC02-DBPM320:OFFS-Y + VA-SINDI01-DBPM010:OFFS-Y + VA-SINDI01-DBPM060:OFFS-Y + VA-SINDI02-DBPM010:OFFS-Y + VA-SINDI02-DBPM040:OFFS-Y + VA-SINDI02-DBPM080:OFFS-Y + VA-S10CB01-DBPM220:OFFS-Y + VA-S10CB01-DBPM420:OFFS-Y + VA-S10CB02-DBPM220:OFFS-Y + VA-S10CB02-DBPM420:OFFS-Y + VA-S10DI01-DBPM110:OFFS-Y + VA-S10CB03-DBPM220:OFFS-Y + VA-S10CB03-DBPM420:OFFS-Y + VA-S10CB04-DBPM220:OFFS-Y + VA-S10CB04-DBPM420:OFFS-Y + VA-S10CB05-DBPM220:OFFS-Y + VA-S10CB05-DBPM420:OFFS-Y + VA-S10CB06-DBPM220:OFFS-Y + VA-S10CB06-DBPM420:OFFS-Y + VA-S10CB07-DBPM220:OFFS-Y + VA-S10CB07-DBPM420:OFFS-Y + VA-S10CB08-DBPM220:OFFS-Y + VA-S10CB08-DBPM420:OFFS-Y + VA-S10CB09-DBPM220:OFFS-Y + VA-S10BC01-DBPM010:OFFS-Y + VA-S10BC01-DBPM050:OFFS-Y + VA-S10BC01-DBPM090:OFFS-Y + VA-S10BC02-DBPM140:OFFS-Y + VA-S10BC02-DBPM320:OFFS-Y + VA-S10MA01-DBPM010:OFFS-Y + VA-S10MA01-DBPM060:OFFS-Y + VA-S10MA01-DBPM120:OFFS-Y + VA-S20CB01-DBPM420:OFFS-Y + VA-S20CB02-DBPM420:OFFS-Y + VA-S20CB03-DBPM420:OFFS-Y + VA-S20SY01-DBPM010:OFFS-Y + VA-S20SY01-DBPM040:OFFS-Y + VA-S20SY01-DBPM060:OFFS-Y + VA-S20SY02-DBPM080:OFFS-Y + VA-S20SY02-DBPM120:OFFS-Y + VA-S20SY02-DBPM150:OFFS-Y + VA-S20SY03-DBPM010:OFFS-Y + VA-S20SY03-DBPM040:OFFS-Y + VA-S20SY03-DBPM080:OFFS-Y + VA-S30CB01-DBPM420:OFFS-Y + VA-S30CB02-DBPM420:OFFS-Y + VA-S30CB03-DBPM420:OFFS-Y + VA-S30CB04-DBPM420:OFFS-Y + VA-S30CB05-DBPM420:OFFS-Y + VA-S30CB06-DBPM420:OFFS-Y + VA-S30CB07-DBPM420:OFFS-Y + VA-S30CB08-DBPM420:OFFS-Y + VA-S30CB09-DBPM420:OFFS-Y + VA-S30CB10-DBPM420:OFFS-Y + VA-S30CB11-DBPM420:OFFS-Y + VA-S30CB12-DBPM420:OFFS-Y + VA-S30CB13-DBPM420:OFFS-Y + VA-S30CB14-DBPM420:OFFS-Y + VA-S30CB15-DBPM420:OFFS-Y + VA-SARCL01-DBPM010:OFFS-Y + VA-SARCL01-DBPM060:OFFS-Y + VA-SARCL01-DBPM120:OFFS-Y + VA-SARCL01-DBPM150:OFFS-Y + VA-SARCL02-DBPM110:OFFS-Y + VA-SARCL02-DBPM220:OFFS-Y + VA-SARCL02-DBPM260:OFFS-Y + VA-SARCL02-DBPM330:OFFS-Y + VA-SARCL02-DBPM470:OFFS-Y + VA-SARMA01-DBPM040:OFFS-Y + VA-SARMA01-DBPM100:OFFS-Y + VA-SARMA02-DBPM010:OFFS-Y + VA-SARMA02-DBPM020:OFFS-Y + VA-SARMA02-DBPM040:OFFS-Y + VA-SARMA02-DBPM110:OFFS-Y + VA-SARUN01-DBPM070:OFFS-Y + VA-SARUN02-DBPM070:OFFS-Y + VA-SARUN03-DBPM070:OFFS-Y + VA-SARUN04-DBPM070:OFFS-Y + VA-SARUN05-DBPM070:OFFS-Y + VA-SARUN06-DBPM070:OFFS-Y + VA-SARUN07-DBPM070:OFFS-Y + VA-SARUN08-DBPM070:OFFS-Y + VA-SARUN09-DBPM070:OFFS-Y + VA-SARUN10-DBPM070:OFFS-Y + VA-SARUN11-DBPM070:OFFS-Y + VA-SARUN12-DBPM070:OFFS-Y + VA-SARUN13-DBPM070:OFFS-Y + VA-SARUN14-DBPM070:OFFS-Y + VA-SARUN15-DBPM070:OFFS-Y + VA-SARUN16-DBPM070:OFFS-Y + VA-SARUN17-DBPM070:OFFS-Y + VA-SARUN18-DBPM070:OFFS-Y + VA-SARUN19-DBPM070:OFFS-Y + VA-SARUN20-DBPM070:OFFS-Y + VA-SARBD01-DBPM040:OFFS-Y + VA-SATSY01-DBPM010:OFFS-Y + VA-SATSY01-DBPM060:OFFS-Y + VA-SATSY01-DBPM100:OFFS-Y + VA-SATSY01-DBPM240:OFFS-Y + VA-SATSY01-DBPM290:OFFS-Y + VA-SATSY02-DBPM020:OFFS-Y + VA-SATSY02-DBPM210:OFFS-Y + VA-SATSY03-DBPM030:OFFS-Y + VA-SATSY03-DBPM060:OFFS-Y + VA-SATSY03-DBPM090:OFFS-Y + VA-SATSY03-DBPM120:OFFS-Y + VA-SATCL01-DBPM140:OFFS-Y + VA-SATDI01-DBPM030:OFFS-Y + VA-SATDI01-DBPM060:OFFS-Y + VA-SATDI01-DBPM110:OFFS-Y + VA-SATDI01-DBPM240:OFFS-Y + VA-SATDI01-DBPM270:OFFS-Y + VA-SATDI01-DBPM310:OFFS-Y + VA-SATMA01-DBPM010:OFFS-Y + VA-SATMA01-DBPM020:OFFS-Y + VA-SATMA01-DBPM040:OFFS-Y + VA-S10BD01-DBPM020:OFFS-Y + VA-SARBD02-DBPM010:OFFS-Y + VA-SARBD02-DBPM040:OFFS-Y + + + + SINSB01-RSYS:SET-ACC-VOLT + SINSB01-RSYS:SET-BEAM-PHASE + SINSB01-RSYS:SET-KLY-POWER + SINSB01-RSYS:SET-VSUM-PHASE + SINSB01-RSYS:SET-STATION-STATE + SINSB01-RSYS:SET-VSUM-AMPLT-SCALE + SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + SINSB01-RSYS:SET-VOLT-POWER-SCALE + SINSB01-RSYS:GET-ACC-VOLT + SINSB01-RSYS:GET-BEAM-PHASE + SINSB01-RSYS:GET-KLY-POWER + SINSB01-RSYS:GET-VSUM-PHASE + SINSB01-RSYS:GET-STATION-MODE + SINSB01-RSYS:GET-STATION-STATE + SINSB01-RSYS:GET-VSUM-AMPLT + SINSB01-RSYS:GET-RF-READY-STATUS + SINSB01-RSYS:GET-BEAM-CALIB-STATUS + SINSB01-RSYS:GET-VSUM-PHASE-OFFSET + + + + S30CB05-RSYS:SET-ACC-VOLT + S30CB05-RSYS:SET-BEAM-PHASE + S30CB05-RSYS:SET-KLY-POWER + S30CB05-RSYS:SET-VSUM-PHASE + S30CB05-RSYS:SET-STATION-STATE + S30CB05-RSYS:SET-VSUM-AMPLT-SCALE + S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB05-RSYS:SET-VOLT-POWER-SCALE + S30CB05-RSYS:GET-ACC-VOLT + S30CB05-RSYS:GET-BEAM-PHASE + S30CB05-RSYS:GET-KLY-POWER + S30CB05-RSYS:GET-VSUM-PHASE + S30CB05-RSYS:GET-STATION-MODE + S30CB05-RSYS:GET-STATION-STATE + S30CB05-RSYS:GET-VSUM-AMPLT + S30CB05-RSYS:GET-RF-READY-STATUS + S30CB05-RSYS:GET-BEAM-CALIB-STATUS + S30CB05-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-MQUA140:I-SET + VA-SINEG01-MQUA150:I-SET + VA-SINEG01-MQUA310:I-SET + VA-SINEG01-MQUA320:I-SET + VA-SINLH01-MQUA020:I-SET + VA-SINLH01-MQUA030:I-SET + VA-SINLH01-MQUA040:I-SET + VA-SINLH01-MQUA050:I-SET + VA-SINLH01-MQUA070:I-SET + VA-SINLH02-MQUA010:I-SET + VA-SINLH02-MQUA410:I-SET + VA-SINLH03-MQUA030:I-SET + VA-SINLH03-MQUA040:I-SET + VA-SINLH03-MQUA060:I-SET + VA-SINLH03-MQUA080:I-SET + VA-SINSB03-MQUA130:I-SET + VA-SINSB03-MQUA230:I-SET + VA-SINSB04-MQUA130:I-SET + VA-SINSB04-MQUA230:I-SET + VA-SINSB05-MQUA130:I-SET + VA-SINSB05-MQUA230:I-SET + VA-SINBC01-MQUA020:I-SET + VA-SINBC01-MQUA050:I-SET + VA-SINBC01-MQUA070:I-SET + VA-SINBC01-MQUA090:I-SET + VA-SINBC01-MQUA110:I-SET + VA-SINBC02-MQUA110:I-SET + VA-SINBC02-MQUA120:I-SET + VA-SINBC02-MQUA340:I-SET + VA-SINBC02-MQUA350:I-SET + VA-SINDI01-MQUA020:I-SET + VA-SINDI01-MQUA030:I-SET + VA-SINDI01-MQUA070:I-SET + VA-SINDI02-MQUA020:I-SET + VA-SINDI02-MQUA030:I-SET + VA-SINDI02-MQUA050:I-SET + VA-SINDI02-MQUA060:I-SET + VA-SINDI02-MQUA070:I-SET + VA-SINDI02-MQUA090:I-SET + VA-S10CB01-MQUA230:I-SET + VA-S10CB01-MQUA430:I-SET + VA-S10CB02-MQUA230:I-SET + VA-S10CB02-MQUA430:I-SET + VA-S10DI01-MQUA030:I-SET + VA-S10DI01-MQUA120:I-SET + VA-S10CB03-MQUA230:I-SET + VA-S10CB03-MQUA430:I-SET + VA-S10CB04-MQUA230:I-SET + VA-S10CB04-MQUA430:I-SET + VA-S10CB05-MQUA230:I-SET + VA-S10CB05-MQUA430:I-SET + VA-S10CB06-MQUA230:I-SET + VA-S10CB06-MQUA430:I-SET + VA-S10CB07-MQUA230:I-SET + VA-S10CB07-MQUA430:I-SET + VA-S10CB08-MQUA230:I-SET + VA-S10CB08-MQUA430:I-SET + VA-S10CB09-MQUA230:I-SET + VA-S10BC01-MQUA020:I-SET + VA-S10BC01-MQUA040:I-SET + VA-S10BC01-MQUA060:I-SET + VA-S10BC01-MQUA080:I-SET + VA-S10BC01-MQUA100:I-SET + VA-S10BC02-MQUA110:I-SET + VA-S10BC02-MQUA120:I-SET + VA-S10BC02-MQUA340:I-SET + VA-S10BC02-MQUA350:I-SET + VA-S10MA01-MQUA020:I-SET + VA-S10MA01-MQUA050:I-SET + VA-S10MA01-MQUA070:I-SET + VA-S10MA01-MQUA110:I-SET + VA-S10MA01-MQUA130:I-SET + VA-S20CB01-MQUA430:I-SET + VA-S20CB02-MQUA430:I-SET + VA-S20CB03-MQUA430:I-SET + VA-S20SY01-MQUA020:I-SET + VA-S20SY01-MQUA030:I-SET + VA-S20SY01-MQUA050:I-SET + VA-S20SY01-MQUA080:I-SET + VA-S20SY02-MQUA070:I-SET + VA-S20SY02-MQUA100:I-SET + VA-S20SY02-MQUA140:I-SET + VA-S20SY02-MQUA180:I-SET + VA-S20SY03-MQUA020:I-SET + VA-S20SY03-MQUA030:I-SET + VA-S20SY03-MQUA050:I-SET + VA-S20SY03-MQUA060:I-SET + VA-S20SY03-MQUA100:I-SET + VA-S30CB01-MQUA430:I-SET + VA-S30CB02-MQUA430:I-SET + VA-S30CB03-MQUA430:I-SET + VA-S30CB04-MQUA430:I-SET + VA-S30CB05-MQUA430:I-SET + VA-S30CB06-MQUA430:I-SET + VA-S30CB07-MQUA430:I-SET + VA-S30CB08-MQUA430:I-SET + VA-S30CB09-MQUA430:I-SET + VA-S30CB10-MQUA430:I-SET + VA-S30CB11-MQUA430:I-SET + VA-S30CB12-MQUA430:I-SET + VA-S30CB13-MQUA430:I-SET + VA-S30CB14-MQUA430:I-SET + VA-S30CB15-MQUA430:I-SET + VA-SARCL01-MQUA020:I-SET + VA-SARCL01-MQUA050:I-SET + VA-SARCL01-MQUA080:I-SET + VA-SARCL01-MQUA100:I-SET + VA-SARCL01-MQUA140:I-SET + VA-SARCL01-MQUA190:I-SET + VA-SARCL02-MQUA130:I-SET + VA-SARCL02-MQUA150:I-SET + VA-SARCL02-MQUA160:I-SET + VA-SARCL02-MQUA210:I-SET + VA-SARCL02-MQUA250:I-SET + VA-SARCL02-MQUA300:I-SET + VA-SARCL02-MQUA310:I-SET + VA-SARCL02-MQUA350:I-SET + VA-SARCL02-MQUA420:I-SET + VA-SARCL02-MQUA430:I-SET + VA-SARCL02-MQUA460:I-SET + VA-SARMA01-MQUA010:I-SET + VA-SARMA01-MQUA060:I-SET + VA-SARMA01-MQUA080:I-SET + VA-SARMA01-MQUA120:I-SET + VA-SARMA01-MQUA140:I-SET + VA-SARMA02-MQUA050:I-SET + VA-SARMA02-MQUA120:I-SET + VA-SARUN01-MQUA080:I-SET + VA-SARUN02-MQUA080:I-SET + VA-SARUN03-MQUA080:I-SET + VA-SARUN04-MQUA080:I-SET + VA-SARUN05-MQUA080:I-SET + VA-SARUN06-MQUA080:I-SET + VA-SARUN07-MQUA080:I-SET + VA-SARUN08-MQUA080:I-SET + VA-SARUN09-MQUA080:I-SET + VA-SARUN10-MQUA080:I-SET + VA-SARUN11-MQUA080:I-SET + VA-SARUN12-MQUA080:I-SET + VA-SARUN13-MQUA080:I-SET + VA-SARUN14-MQUA080:I-SET + VA-SARUN15-MQUA080:I-SET + VA-SARUN16-MQUA080:I-SET + VA-SARUN17-MQUA080:I-SET + VA-SARUN18-MQUA080:I-SET + VA-SARUN19-MQUA080:I-SET + VA-SARUN20-MQUA080:I-SET + VA-SARBD01-MQUA020:I-SET + VA-SATSY01-MQUA020:I-SET + VA-SATSY01-MQUA030:I-SET + VA-SATSY01-MQUA040:I-SET + VA-SATSY01-MQUA070:I-SET + VA-SATSY01-MQUA090:I-SET + VA-SATSY01-MQUA210:I-SET + VA-SATSY01-MQUA230:I-SET + VA-SATSY01-MQUA260:I-SET + VA-SATSY01-MQUA270:I-SET + VA-SATSY01-MQUA280:I-SET + VA-SATSY01-MQUA300:I-SET + VA-SATSY02-MQUA010:I-SET + VA-SATSY02-MQUA110:I-SET + VA-SATSY02-MQUA120:I-SET + VA-SATSY02-MQUA230:I-SET + VA-SATSY03-MQUA010:I-SET + VA-SATSY03-MQUA040:I-SET + VA-SATSY03-MQUA070:I-SET + VA-SATSY03-MQUA100:I-SET + VA-SATSY03-MQUA130:I-SET + VA-SATCL01-MQUA120:I-SET + VA-SATCL01-MQUA130:I-SET + VA-SATCL01-MQUA180:I-SET + VA-SATCL01-MQUA190:I-SET + VA-SATDI01-MQUA040:I-SET + VA-SATDI01-MQUA050:I-SET + VA-SATDI01-MQUA220:I-SET + VA-SATDI01-MQUA230:I-SET + VA-SATDI01-MQUA250:I-SET + VA-SATDI01-MQUA260:I-SET + VA-SATDI01-MQUA280:I-SET + VA-SATDI01-MQUA300:I-SET + VA-SATMA01-MQUA050:I-SET + VA-S10BD01-MQUA010:I-SET + VA-SARBD02-MQUA030:I-SET + + + + VA-SARUN03-MQUA020-MOT:X + VA-SARUN03-MQUA050-MOT:X + VA-SARUN04-MQUA020-MOT:X + VA-SARUN04-MQUA050-MOT:X + VA-SARUN05-MQUA020-MOT:X + VA-SARUN05-MQUA050-MOT:X + VA-SARUN06-MQUA020-MOT:X + VA-SARUN06-MQUA050-MOT:X + VA-SARUN07-MQUA020-MOT:X + VA-SARUN07-MQUA050-MOT:X + VA-SARUN08-MQUA020-MOT:X + VA-SARUN08-MQUA050-MOT:X + VA-SARUN09-MQUA020-MOT:X + VA-SARUN09-MQUA050-MOT:X + VA-SARUN10-MQUA020-MOT:X + VA-SARUN10-MQUA050-MOT:X + VA-SARUN11-MQUA020-MOT:X + VA-SARUN11-MQUA050-MOT:X + VA-SARUN12-MQUA020-MOT:X + VA-SARUN12-MQUA050-MOT:X + VA-SARUN13-MQUA020-MOT:X + VA-SARUN13-MQUA050-MOT:X + VA-SARUN14-MQUA020-MOT:X + VA-SARUN14-MQUA050-MOT:X + VA-SARUN15-MQUA020-MOT:X + VA-SARUN15-MQUA050-MOT:X + + + + S10CB03-RSYS:SET-ACC-VOLT + S10CB03-RSYS:SET-BEAM-PHASE + S10CB03-RSYS:SET-KLY-POWER + S10CB03-RSYS:SET-VSUM-PHASE + S10CB03-RSYS:SET-STATION-STATE + S10CB03-RSYS:SET-VSUM-AMPLT-SCALE + S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S10CB03-RSYS:SET-VOLT-POWER-SCALE + S10CB03-RSYS:GET-ACC-VOLT + S10CB03-RSYS:GET-BEAM-PHASE + S10CB03-RSYS:GET-KLY-POWER + S10CB03-RSYS:GET-VSUM-PHASE + S10CB03-RSYS:GET-STATION-MODE + S10CB03-RSYS:GET-STATION-STATE + S10CB03-RSYS:GET-VSUM-AMPLT + S10CB03-RSYS:GET-RF-READY-STATUS + S10CB03-RSYS:GET-BEAM-CALIB-STATUS + S10CB03-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINBC02-BC:ANGLE-SET + VA-SINBC02-BC:MOTOR-POS-SET + VA-SINBC02-BC:DL + VA-SINBC02-BC:DL-VALID + + + + VA-SINEG01-DBPM340:SIM-X1 + VA-SINSB01-DBPM150:SIM-X1 + VA-SINSB02-DBPM150:SIM-X1 + VA-SINLH01-DBPM060:SIM-X1 + VA-SINLH02-DBPM210:SIM-X1 + VA-SINLH02-DBPM240:SIM-X1 + VA-SINLH03-DBPM010:SIM-X1 + VA-SINLH03-DBPM050:SIM-X1 + VA-SINLH03-DBPM090:SIM-X1 + VA-SINSB03-DBPM120:SIM-X1 + VA-SINSB03-DBPM220:SIM-X1 + VA-SINSB04-DBPM120:SIM-X1 + VA-SINSB04-DBPM220:SIM-X1 + VA-SINSB05-DBPM120:SIM-X1 + VA-SINSB05-DBPM220:SIM-X1 + VA-SINXB01-DBPM120:SIM-X1 + VA-SINBC01-DBPM010:SIM-X1 + VA-SINBC01-DBPM030:SIM-X1 + VA-SINBC01-DBPM080:SIM-X1 + VA-SINBC01-DBPM100:SIM-X1 + VA-SINBC02-DBPM140:SIM-X1 + VA-SINBC02-DBPM320:SIM-X1 + VA-SINDI01-DBPM010:SIM-X1 + VA-SINDI01-DBPM060:SIM-X1 + VA-SINDI02-DBPM010:SIM-X1 + VA-SINDI02-DBPM040:SIM-X1 + VA-SINDI02-DBPM080:SIM-X1 + VA-S10CB01-DBPM220:SIM-X1 + VA-S10CB01-DBPM420:SIM-X1 + VA-S10CB02-DBPM220:SIM-X1 + VA-S10CB02-DBPM420:SIM-X1 + VA-S10DI01-DBPM110:SIM-X1 + VA-S10CB03-DBPM220:SIM-X1 + VA-S10CB03-DBPM420:SIM-X1 + VA-S10CB04-DBPM220:SIM-X1 + VA-S10CB04-DBPM420:SIM-X1 + VA-S10CB05-DBPM220:SIM-X1 + VA-S10CB05-DBPM420:SIM-X1 + VA-S10CB06-DBPM220:SIM-X1 + VA-S10CB06-DBPM420:SIM-X1 + VA-S10CB07-DBPM220:SIM-X1 + VA-S10CB07-DBPM420:SIM-X1 + VA-S10CB08-DBPM220:SIM-X1 + VA-S10CB08-DBPM420:SIM-X1 + VA-S10CB09-DBPM220:SIM-X1 + VA-S10BC01-DBPM010:SIM-X1 + VA-S10BC01-DBPM050:SIM-X1 + VA-S10BC01-DBPM090:SIM-X1 + VA-S10BC02-DBPM140:SIM-X1 + VA-S10BC02-DBPM320:SIM-X1 + VA-S10MA01-DBPM010:SIM-X1 + VA-S10MA01-DBPM060:SIM-X1 + VA-S10MA01-DBPM120:SIM-X1 + VA-S20CB01-DBPM420:SIM-X1 + VA-S20CB02-DBPM420:SIM-X1 + VA-S20CB03-DBPM420:SIM-X1 + VA-S20SY01-DBPM010:SIM-X1 + VA-S20SY01-DBPM040:SIM-X1 + VA-S20SY01-DBPM060:SIM-X1 + VA-S20SY02-DBPM080:SIM-X1 + VA-S20SY02-DBPM120:SIM-X1 + VA-S20SY02-DBPM150:SIM-X1 + VA-S20SY03-DBPM010:SIM-X1 + VA-S20SY03-DBPM040:SIM-X1 + VA-S20SY03-DBPM080:SIM-X1 + VA-S30CB01-DBPM420:SIM-X1 + VA-S30CB02-DBPM420:SIM-X1 + VA-S30CB03-DBPM420:SIM-X1 + VA-S30CB04-DBPM420:SIM-X1 + VA-S30CB05-DBPM420:SIM-X1 + VA-S30CB06-DBPM420:SIM-X1 + VA-S30CB07-DBPM420:SIM-X1 + VA-S30CB08-DBPM420:SIM-X1 + VA-S30CB09-DBPM420:SIM-X1 + VA-S30CB10-DBPM420:SIM-X1 + VA-S30CB11-DBPM420:SIM-X1 + VA-S30CB12-DBPM420:SIM-X1 + VA-S30CB13-DBPM420:SIM-X1 + VA-S30CB14-DBPM420:SIM-X1 + VA-S30CB15-DBPM420:SIM-X1 + VA-SARCL01-DBPM010:SIM-X1 + VA-SARCL01-DBPM060:SIM-X1 + VA-SARCL01-DBPM120:SIM-X1 + VA-SARCL01-DBPM150:SIM-X1 + VA-SARCL02-DBPM110:SIM-X1 + VA-SARCL02-DBPM220:SIM-X1 + VA-SARCL02-DBPM260:SIM-X1 + VA-SARCL02-DBPM330:SIM-X1 + VA-SARCL02-DBPM470:SIM-X1 + VA-SARMA01-DBPM040:SIM-X1 + VA-SARMA01-DBPM100:SIM-X1 + VA-SARMA02-DBPM010:SIM-X1 + VA-SARMA02-DBPM020:SIM-X1 + VA-SARMA02-DBPM040:SIM-X1 + VA-SARMA02-DBPM110:SIM-X1 + VA-SARUN01-DBPM070:SIM-X1 + VA-SARUN02-DBPM070:SIM-X1 + VA-SARUN03-DBPM070:SIM-X1 + VA-SARUN04-DBPM070:SIM-X1 + VA-SARUN05-DBPM070:SIM-X1 + VA-SARUN06-DBPM070:SIM-X1 + VA-SARUN07-DBPM070:SIM-X1 + VA-SARUN08-DBPM070:SIM-X1 + VA-SARUN09-DBPM070:SIM-X1 + VA-SARUN10-DBPM070:SIM-X1 + VA-SARUN11-DBPM070:SIM-X1 + VA-SARUN12-DBPM070:SIM-X1 + VA-SARUN13-DBPM070:SIM-X1 + VA-SARUN14-DBPM070:SIM-X1 + VA-SARUN15-DBPM070:SIM-X1 + VA-SARUN16-DBPM070:SIM-X1 + VA-SARUN17-DBPM070:SIM-X1 + VA-SARUN18-DBPM070:SIM-X1 + VA-SARUN19-DBPM070:SIM-X1 + VA-SARUN20-DBPM070:SIM-X1 + VA-SARBD01-DBPM040:SIM-X1 + VA-SATSY01-DBPM010:SIM-X1 + VA-SATSY01-DBPM060:SIM-X1 + VA-SATSY01-DBPM100:SIM-X1 + VA-SATSY01-DBPM240:SIM-X1 + VA-SATSY01-DBPM290:SIM-X1 + VA-SATSY02-DBPM020:SIM-X1 + VA-SATSY02-DBPM210:SIM-X1 + VA-SATSY03-DBPM030:SIM-X1 + VA-SATSY03-DBPM060:SIM-X1 + VA-SATSY03-DBPM090:SIM-X1 + VA-SATSY03-DBPM120:SIM-X1 + VA-SATCL01-DBPM140:SIM-X1 + VA-SATDI01-DBPM030:SIM-X1 + VA-SATDI01-DBPM060:SIM-X1 + VA-SATDI01-DBPM110:SIM-X1 + VA-SATDI01-DBPM240:SIM-X1 + VA-SATDI01-DBPM270:SIM-X1 + VA-SATDI01-DBPM310:SIM-X1 + VA-SATMA01-DBPM010:SIM-X1 + VA-SATMA01-DBPM020:SIM-X1 + VA-SATMA01-DBPM040:SIM-X1 + VA-S10BD01-DBPM020:SIM-X1 + VA-SARBD02-DBPM010:SIM-X1 + VA-SARBD02-DBPM040:SIM-X1 + + + + SINXB01-RSYS:SET-ACC-VOLT + SINXB01-RSYS:SET-BEAM-PHASE + SINXB01-RSYS:SET-KLY-POWER + SINXB01-RSYS:SET-VSUM-PHASE + SINXB01-RSYS:SET-STATION-STATE + SINXB01-RSYS:SET-VSUM-AMPLT-SCALE + SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + SINXB01-RSYS:SET-VOLT-POWER-SCALE + SINXB01-RSYS:GET-ACC-VOLT + SINXB01-RSYS:GET-BEAM-PHASE + SINXB01-RSYS:GET-KLY-POWER + SINXB01-RSYS:GET-VSUM-PHASE + SINXB01-RSYS:GET-STATION-MODE + SINXB01-RSYS:GET-STATION-STATE + SINXB01-RSYS:GET-VSUM-AMPLT + SINXB01-RSYS:GET-RF-READY-STATUS + SINXB01-RSYS:GET-BEAM-CALIB-STATUS + SINXB01-RSYS:GET-VSUM-PHASE-OFFSET + + + + S20CB04-RSYS:SET-ACC-VOLT + S20CB04-RSYS:SET-BEAM-PHASE + S20CB04-RSYS:SET-KLY-POWER + S20CB04-RSYS:SET-VSUM-PHASE + S20CB04-RSYS:SET-STATION-STATE + S20CB04-RSYS:SET-VSUM-AMPLT-SCALE + S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S20CB04-RSYS:SET-VOLT-POWER-SCALE + S20CB04-RSYS:GET-ACC-VOLT + S20CB04-RSYS:GET-BEAM-PHASE + S20CB04-RSYS:GET-KLY-POWER + S20CB04-RSYS:GET-VSUM-PHASE + S20CB04-RSYS:GET-STATION-MODE + S20CB04-RSYS:GET-STATION-STATE + S20CB04-RSYS:GET-VSUM-AMPLT + S20CB04-RSYS:GET-RF-READY-STATUS + S20CB04-RSYS:GET-BEAM-CALIB-STATUS + S20CB04-RSYS:GET-VSUM-PHASE-OFFSET + + + + S20CB03-RSYS:SET-ACC-VOLT + S20CB03-RSYS:SET-BEAM-PHASE + S20CB03-RSYS:SET-KLY-POWER + S20CB03-RSYS:SET-VSUM-PHASE + S20CB03-RSYS:SET-STATION-STATE + S20CB03-RSYS:SET-VSUM-AMPLT-SCALE + S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S20CB03-RSYS:SET-VOLT-POWER-SCALE + S20CB03-RSYS:GET-ACC-VOLT + S20CB03-RSYS:GET-BEAM-PHASE + S20CB03-RSYS:GET-KLY-POWER + S20CB03-RSYS:GET-VSUM-PHASE + S20CB03-RSYS:GET-STATION-MODE + S20CB03-RSYS:GET-STATION-STATE + S20CB03-RSYS:GET-VSUM-AMPLT + S20CB03-RSYS:GET-RF-READY-STATUS + S20CB03-RSYS:GET-BEAM-CALIB-STATUS + S20CB03-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINBC02-DSCR220:ROI-XMAX + VA-SINBC02-DSCR220:ROI-XMIN + VA-SINBC02-DSCR220:ROI-YMAX + VA-SINBC02-DSCR220:ROI-YMIN + VA-SINBC02-DSCR220:pipeline-x_stats_gr-g_stddiv_egu + VA-SINBC02-DSCR220:pipeline-y_stats_gr-g_stddiv_egu + VA-SINBC02-DSCR220:pipeline-slice_h_stats-g_stddiv_egu + VA-SINBC02-DSCR220:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SINLH02-UIND230-MOT:XMAX + VA-SARUN03-UIND030-MOT:XMAX + VA-SARUN04-UIND030-MOT:XMAX + VA-SARUN05-UIND030-MOT:XMAX + VA-SARUN06-UIND030-MOT:XMAX + VA-SARUN07-UIND030-MOT:XMAX + VA-SARUN08-UIND030-MOT:XMAX + VA-SARUN09-UIND030-MOT:XMAX + VA-SARUN10-UIND030-MOT:XMAX + VA-SARUN11-UIND030-MOT:XMAX + VA-SARUN12-UIND030-MOT:XMAX + VA-SARUN13-UIND030-MOT:XMAX + VA-SARUN14-UIND030-MOT:XMAX + VA-SARUN15-UIND030-MOT:XMAX + + + + S30CB08-RSYS:SET-ACC-VOLT + S30CB08-RSYS:SET-BEAM-PHASE + S30CB08-RSYS:SET-KLY-POWER + S30CB08-RSYS:SET-VSUM-PHASE + S30CB08-RSYS:SET-STATION-STATE + S30CB08-RSYS:SET-VSUM-AMPLT-SCALE + S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB08-RSYS:SET-VOLT-POWER-SCALE + S30CB08-RSYS:GET-ACC-VOLT + S30CB08-RSYS:GET-BEAM-PHASE + S30CB08-RSYS:GET-KLY-POWER + S30CB08-RSYS:GET-VSUM-PHASE + S30CB08-RSYS:GET-STATION-MODE + S30CB08-RSYS:GET-STATION-STATE + S30CB08-RSYS:GET-VSUM-AMPLT + S30CB08-RSYS:GET-RF-READY-STATUS + S30CB08-RSYS:GET-BEAM-CALIB-STATUS + S30CB08-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-DBPM340:Q2 + VA-SINSB01-DBPM150:Q2 + VA-SINSB02-DBPM150:Q2 + VA-SINLH01-DBPM060:Q2 + VA-SINLH02-DBPM210:Q2 + VA-SINLH02-DBPM240:Q2 + VA-SINLH03-DBPM010:Q2 + VA-SINLH03-DBPM050:Q2 + VA-SINLH03-DBPM090:Q2 + VA-SINSB03-DBPM120:Q2 + VA-SINSB03-DBPM220:Q2 + VA-SINSB04-DBPM120:Q2 + VA-SINSB04-DBPM220:Q2 + VA-SINSB05-DBPM120:Q2 + VA-SINSB05-DBPM220:Q2 + VA-SINXB01-DBPM120:Q2 + VA-SINBC01-DBPM010:Q2 + VA-SINBC01-DBPM030:Q2 + VA-SINBC01-DBPM080:Q2 + VA-SINBC01-DBPM100:Q2 + VA-SINBC02-DBPM140:Q2 + VA-SINBC02-DBPM320:Q2 + VA-SINDI01-DBPM010:Q2 + VA-SINDI01-DBPM060:Q2 + VA-SINDI02-DBPM010:Q2 + VA-SINDI02-DBPM040:Q2 + VA-SINDI02-DBPM080:Q2 + VA-S10CB01-DBPM220:Q2 + VA-S10CB01-DBPM420:Q2 + VA-S10CB02-DBPM220:Q2 + VA-S10CB02-DBPM420:Q2 + VA-S10DI01-DBPM110:Q2 + VA-S10CB03-DBPM220:Q2 + VA-S10CB03-DBPM420:Q2 + VA-S10CB04-DBPM220:Q2 + VA-S10CB04-DBPM420:Q2 + VA-S10CB05-DBPM220:Q2 + VA-S10CB05-DBPM420:Q2 + VA-S10CB06-DBPM220:Q2 + VA-S10CB06-DBPM420:Q2 + VA-S10CB07-DBPM220:Q2 + VA-S10CB07-DBPM420:Q2 + VA-S10CB08-DBPM220:Q2 + VA-S10CB08-DBPM420:Q2 + VA-S10CB09-DBPM220:Q2 + VA-S10BC01-DBPM010:Q2 + VA-S10BC01-DBPM050:Q2 + VA-S10BC01-DBPM090:Q2 + VA-S10BC02-DBPM140:Q2 + VA-S10BC02-DBPM320:Q2 + VA-S10MA01-DBPM010:Q2 + VA-S10MA01-DBPM060:Q2 + VA-S10MA01-DBPM120:Q2 + VA-S20CB01-DBPM420:Q2 + VA-S20CB02-DBPM420:Q2 + VA-S20CB03-DBPM420:Q2 + VA-S20SY01-DBPM010:Q2 + VA-S20SY01-DBPM040:Q2 + VA-S20SY01-DBPM060:Q2 + VA-S20SY02-DBPM080:Q2 + VA-S20SY02-DBPM120:Q2 + VA-S20SY02-DBPM150:Q2 + VA-S20SY03-DBPM010:Q2 + VA-S20SY03-DBPM040:Q2 + VA-S20SY03-DBPM080:Q2 + VA-S30CB01-DBPM420:Q2 + VA-S30CB02-DBPM420:Q2 + VA-S30CB03-DBPM420:Q2 + VA-S30CB04-DBPM420:Q2 + VA-S30CB05-DBPM420:Q2 + VA-S30CB06-DBPM420:Q2 + VA-S30CB07-DBPM420:Q2 + VA-S30CB08-DBPM420:Q2 + VA-S30CB09-DBPM420:Q2 + VA-S30CB10-DBPM420:Q2 + VA-S30CB11-DBPM420:Q2 + VA-S30CB12-DBPM420:Q2 + VA-S30CB13-DBPM420:Q2 + VA-S30CB14-DBPM420:Q2 + VA-S30CB15-DBPM420:Q2 + VA-SARCL01-DBPM010:Q2 + VA-SARCL01-DBPM060:Q2 + VA-SARCL01-DBPM120:Q2 + VA-SARCL01-DBPM150:Q2 + VA-SARCL02-DBPM110:Q2 + VA-SARCL02-DBPM220:Q2 + VA-SARCL02-DBPM260:Q2 + VA-SARCL02-DBPM330:Q2 + VA-SARCL02-DBPM470:Q2 + VA-SARMA01-DBPM040:Q2 + VA-SARMA01-DBPM100:Q2 + VA-SARMA02-DBPM010:Q2 + VA-SARMA02-DBPM020:Q2 + VA-SARMA02-DBPM040:Q2 + VA-SARMA02-DBPM110:Q2 + VA-SARUN01-DBPM070:Q2 + VA-SARUN02-DBPM070:Q2 + VA-SARUN03-DBPM070:Q2 + VA-SARUN04-DBPM070:Q2 + VA-SARUN05-DBPM070:Q2 + VA-SARUN06-DBPM070:Q2 + VA-SARUN07-DBPM070:Q2 + VA-SARUN08-DBPM070:Q2 + VA-SARUN09-DBPM070:Q2 + VA-SARUN10-DBPM070:Q2 + VA-SARUN11-DBPM070:Q2 + VA-SARUN12-DBPM070:Q2 + VA-SARUN13-DBPM070:Q2 + VA-SARUN14-DBPM070:Q2 + VA-SARUN15-DBPM070:Q2 + VA-SARUN16-DBPM070:Q2 + VA-SARUN17-DBPM070:Q2 + VA-SARUN18-DBPM070:Q2 + VA-SARUN19-DBPM070:Q2 + VA-SARUN20-DBPM070:Q2 + VA-SARBD01-DBPM040:Q2 + VA-SATSY01-DBPM010:Q2 + VA-SATSY01-DBPM060:Q2 + VA-SATSY01-DBPM100:Q2 + VA-SATSY01-DBPM240:Q2 + VA-SATSY01-DBPM290:Q2 + VA-SATSY02-DBPM020:Q2 + VA-SATSY02-DBPM210:Q2 + VA-SATSY03-DBPM030:Q2 + VA-SATSY03-DBPM060:Q2 + VA-SATSY03-DBPM090:Q2 + VA-SATSY03-DBPM120:Q2 + VA-SATCL01-DBPM140:Q2 + VA-SATDI01-DBPM030:Q2 + VA-SATDI01-DBPM060:Q2 + VA-SATDI01-DBPM110:Q2 + VA-SATDI01-DBPM240:Q2 + VA-SATDI01-DBPM270:Q2 + VA-SATDI01-DBPM310:Q2 + VA-SATMA01-DBPM010:Q2 + VA-SATMA01-DBPM020:Q2 + VA-SATMA01-DBPM040:Q2 + VA-S10BD01-DBPM020:Q2 + VA-SARBD02-DBPM010:Q2 + VA-SARBD02-DBPM040:Q2 + + + + S30CB12-RSYS:SET-ACC-VOLT + S30CB12-RSYS:SET-BEAM-PHASE + S30CB12-RSYS:SET-KLY-POWER + S30CB12-RSYS:SET-VSUM-PHASE + S30CB12-RSYS:SET-STATION-STATE + S30CB12-RSYS:SET-VSUM-AMPLT-SCALE + S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB12-RSYS:SET-VOLT-POWER-SCALE + S30CB12-RSYS:GET-ACC-VOLT + S30CB12-RSYS:GET-BEAM-PHASE + S30CB12-RSYS:GET-KLY-POWER + S30CB12-RSYS:GET-VSUM-PHASE + S30CB12-RSYS:GET-STATION-MODE + S30CB12-RSYS:GET-STATION-STATE + S30CB12-RSYS:GET-VSUM-AMPLT + S30CB12-RSYS:GET-RF-READY-STATUS + S30CB12-RSYS:GET-BEAM-CALIB-STATUS + S30CB12-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-MBND300:I-SET + VA-SINLH02-MBND100:I-SET + VA-SINLH02-MBND200:I-SET + VA-SINLH02-MBND300:I-SET + VA-SINLH02-MBND400:I-SET + VA-SINBC02-MBND100:I-SET + VA-SINBC02-MBND200:I-SET + VA-SINBC02-MBND300:I-SET + VA-SINBC02-MBND400:I-SET + VA-S10DI01-MBND100:I-SET + VA-S10BC02-MBND100:I-SET + VA-S10BC02-MBND200:I-SET + VA-S10BC02-MBND300:I-SET + VA-S10BC02-MBND400:I-SET + VA-S10MA01-MBND100:I-SET + VA-S20SY02-MBND200:I-SET + VA-SARCL02-MBND100:I-SET + VA-SARCL02-MBND200:I-SET + VA-SARCL02-MBND400:I-SET + VA-SARCL02-MBND500:I-SET + VA-SARMA02-MBND100:I-SET + VA-SARBD01-MBND100:I-SET + VA-SARBD01-MBND200:I-SET + VA-SATSY01-MBND200:I-SET + VA-SATSY01-MBND400:I-SET + VA-SATSY02-MBND100:I-SET + VA-SATSY02-MBND200:I-SET + VA-SATCL01-MBND100:I-SET + VA-SATCL01-MBND300:I-SET + VA-SATMA01-MBND100:I-SET + + + + VA-SINEG01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-SINSB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-SINSB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-SINSB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-SINSB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-SINXB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-SINDI01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S10CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S20CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S20CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S20CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S20CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB02-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB04-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB05-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB06-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB07-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB08-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB09-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB10-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB12-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + VA-S30CB14-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + + + + S30CB11-RSYS:SET-ACC-VOLT + S30CB11-RSYS:SET-BEAM-PHASE + S30CB11-RSYS:SET-KLY-POWER + S30CB11-RSYS:SET-VSUM-PHASE + S30CB11-RSYS:SET-STATION-STATE + S30CB11-RSYS:SET-VSUM-AMPLT-SCALE + S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB11-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB11-RSYS:SET-VOLT-POWER-SCALE + S30CB11-RSYS:GET-ACC-VOLT + S30CB11-RSYS:GET-BEAM-PHASE + S30CB11-RSYS:GET-KLY-POWER + S30CB11-RSYS:GET-VSUM-PHASE + S30CB11-RSYS:GET-STATION-MODE + S30CB11-RSYS:GET-STATION-STATE + S30CB11-RSYS:GET-VSUM-AMPLT + S30CB11-RSYS:GET-RF-READY-STATUS + S30CB11-RSYS:GET-BEAM-CALIB-STATUS + S30CB11-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-DBPM340:SIM-X2 + VA-SINSB01-DBPM150:SIM-X2 + VA-SINSB02-DBPM150:SIM-X2 + VA-SINLH01-DBPM060:SIM-X2 + VA-SINLH02-DBPM210:SIM-X2 + VA-SINLH02-DBPM240:SIM-X2 + VA-SINLH03-DBPM010:SIM-X2 + VA-SINLH03-DBPM050:SIM-X2 + VA-SINLH03-DBPM090:SIM-X2 + VA-SINSB03-DBPM120:SIM-X2 + VA-SINSB03-DBPM220:SIM-X2 + VA-SINSB04-DBPM120:SIM-X2 + VA-SINSB04-DBPM220:SIM-X2 + VA-SINSB05-DBPM120:SIM-X2 + VA-SINSB05-DBPM220:SIM-X2 + VA-SINXB01-DBPM120:SIM-X2 + VA-SINBC01-DBPM010:SIM-X2 + VA-SINBC01-DBPM030:SIM-X2 + VA-SINBC01-DBPM080:SIM-X2 + VA-SINBC01-DBPM100:SIM-X2 + VA-SINBC02-DBPM140:SIM-X2 + VA-SINBC02-DBPM320:SIM-X2 + VA-SINDI01-DBPM010:SIM-X2 + VA-SINDI01-DBPM060:SIM-X2 + VA-SINDI02-DBPM010:SIM-X2 + VA-SINDI02-DBPM040:SIM-X2 + VA-SINDI02-DBPM080:SIM-X2 + VA-S10CB01-DBPM220:SIM-X2 + VA-S10CB01-DBPM420:SIM-X2 + VA-S10CB02-DBPM220:SIM-X2 + VA-S10CB02-DBPM420:SIM-X2 + VA-S10DI01-DBPM110:SIM-X2 + VA-S10CB03-DBPM220:SIM-X2 + VA-S10CB03-DBPM420:SIM-X2 + VA-S10CB04-DBPM220:SIM-X2 + VA-S10CB04-DBPM420:SIM-X2 + VA-S10CB05-DBPM220:SIM-X2 + VA-S10CB05-DBPM420:SIM-X2 + VA-S10CB06-DBPM220:SIM-X2 + VA-S10CB06-DBPM420:SIM-X2 + VA-S10CB07-DBPM220:SIM-X2 + VA-S10CB07-DBPM420:SIM-X2 + VA-S10CB08-DBPM220:SIM-X2 + VA-S10CB08-DBPM420:SIM-X2 + VA-S10CB09-DBPM220:SIM-X2 + VA-S10BC01-DBPM010:SIM-X2 + VA-S10BC01-DBPM050:SIM-X2 + VA-S10BC01-DBPM090:SIM-X2 + VA-S10BC02-DBPM140:SIM-X2 + VA-S10BC02-DBPM320:SIM-X2 + VA-S10MA01-DBPM010:SIM-X2 + VA-S10MA01-DBPM060:SIM-X2 + VA-S10MA01-DBPM120:SIM-X2 + VA-S20CB01-DBPM420:SIM-X2 + VA-S20CB02-DBPM420:SIM-X2 + VA-S20CB03-DBPM420:SIM-X2 + VA-S20SY01-DBPM010:SIM-X2 + VA-S20SY01-DBPM040:SIM-X2 + VA-S20SY01-DBPM060:SIM-X2 + VA-S20SY02-DBPM080:SIM-X2 + VA-S20SY02-DBPM120:SIM-X2 + VA-S20SY02-DBPM150:SIM-X2 + VA-S20SY03-DBPM010:SIM-X2 + VA-S20SY03-DBPM040:SIM-X2 + VA-S20SY03-DBPM080:SIM-X2 + VA-S30CB01-DBPM420:SIM-X2 + VA-S30CB02-DBPM420:SIM-X2 + VA-S30CB03-DBPM420:SIM-X2 + VA-S30CB04-DBPM420:SIM-X2 + VA-S30CB05-DBPM420:SIM-X2 + VA-S30CB06-DBPM420:SIM-X2 + VA-S30CB07-DBPM420:SIM-X2 + VA-S30CB08-DBPM420:SIM-X2 + VA-S30CB09-DBPM420:SIM-X2 + VA-S30CB10-DBPM420:SIM-X2 + VA-S30CB11-DBPM420:SIM-X2 + VA-S30CB12-DBPM420:SIM-X2 + VA-S30CB13-DBPM420:SIM-X2 + VA-S30CB14-DBPM420:SIM-X2 + VA-S30CB15-DBPM420:SIM-X2 + VA-SARCL01-DBPM010:SIM-X2 + VA-SARCL01-DBPM060:SIM-X2 + VA-SARCL01-DBPM120:SIM-X2 + VA-SARCL01-DBPM150:SIM-X2 + VA-SARCL02-DBPM110:SIM-X2 + VA-SARCL02-DBPM220:SIM-X2 + VA-SARCL02-DBPM260:SIM-X2 + VA-SARCL02-DBPM330:SIM-X2 + VA-SARCL02-DBPM470:SIM-X2 + VA-SARMA01-DBPM040:SIM-X2 + VA-SARMA01-DBPM100:SIM-X2 + VA-SARMA02-DBPM010:SIM-X2 + VA-SARMA02-DBPM020:SIM-X2 + VA-SARMA02-DBPM040:SIM-X2 + VA-SARMA02-DBPM110:SIM-X2 + VA-SARUN01-DBPM070:SIM-X2 + VA-SARUN02-DBPM070:SIM-X2 + VA-SARUN03-DBPM070:SIM-X2 + VA-SARUN04-DBPM070:SIM-X2 + VA-SARUN05-DBPM070:SIM-X2 + VA-SARUN06-DBPM070:SIM-X2 + VA-SARUN07-DBPM070:SIM-X2 + VA-SARUN08-DBPM070:SIM-X2 + VA-SARUN09-DBPM070:SIM-X2 + VA-SARUN10-DBPM070:SIM-X2 + VA-SARUN11-DBPM070:SIM-X2 + VA-SARUN12-DBPM070:SIM-X2 + VA-SARUN13-DBPM070:SIM-X2 + VA-SARUN14-DBPM070:SIM-X2 + VA-SARUN15-DBPM070:SIM-X2 + VA-SARUN16-DBPM070:SIM-X2 + VA-SARUN17-DBPM070:SIM-X2 + VA-SARUN18-DBPM070:SIM-X2 + VA-SARUN19-DBPM070:SIM-X2 + VA-SARUN20-DBPM070:SIM-X2 + VA-SARBD01-DBPM040:SIM-X2 + VA-SATSY01-DBPM010:SIM-X2 + VA-SATSY01-DBPM060:SIM-X2 + VA-SATSY01-DBPM100:SIM-X2 + VA-SATSY01-DBPM240:SIM-X2 + VA-SATSY01-DBPM290:SIM-X2 + VA-SATSY02-DBPM020:SIM-X2 + VA-SATSY02-DBPM210:SIM-X2 + VA-SATSY03-DBPM030:SIM-X2 + VA-SATSY03-DBPM060:SIM-X2 + VA-SATSY03-DBPM090:SIM-X2 + VA-SATSY03-DBPM120:SIM-X2 + VA-SATCL01-DBPM140:SIM-X2 + VA-SATDI01-DBPM030:SIM-X2 + VA-SATDI01-DBPM060:SIM-X2 + VA-SATDI01-DBPM110:SIM-X2 + VA-SATDI01-DBPM240:SIM-X2 + VA-SATDI01-DBPM270:SIM-X2 + VA-SATDI01-DBPM310:SIM-X2 + VA-SATMA01-DBPM010:SIM-X2 + VA-SATMA01-DBPM020:SIM-X2 + VA-SATMA01-DBPM040:SIM-X2 + VA-S10BD01-DBPM020:SIM-X2 + VA-SARBD02-DBPM010:SIM-X2 + VA-SARBD02-DBPM040:SIM-X2 + + + + VA-SINEG01-RSYS:SET-ACC-VOLT + VA-SINSB01-RSYS:SET-ACC-VOLT + VA-SINSB02-RSYS:SET-ACC-VOLT + VA-SINSB03-RSYS:SET-ACC-VOLT + VA-SINSB04-RSYS:SET-ACC-VOLT + VA-SINXB01-RSYS:SET-ACC-VOLT + VA-SINDI01-RSYS:SET-ACC-VOLT + VA-S10CB01-RSYS:SET-ACC-VOLT + VA-S10CB02-RSYS:SET-ACC-VOLT + VA-S10CB03-RSYS:SET-ACC-VOLT + VA-S10CB04-RSYS:SET-ACC-VOLT + VA-S10CB05-RSYS:SET-ACC-VOLT + VA-S10CB06-RSYS:SET-ACC-VOLT + VA-S10CB07-RSYS:SET-ACC-VOLT + VA-S10CB08-RSYS:SET-ACC-VOLT + VA-S10CB09-RSYS:SET-ACC-VOLT + VA-S20CB01-RSYS:SET-ACC-VOLT + VA-S20CB02-RSYS:SET-ACC-VOLT + VA-S20CB03-RSYS:SET-ACC-VOLT + VA-S20CB04-RSYS:SET-ACC-VOLT + VA-S30CB01-RSYS:SET-ACC-VOLT + VA-S30CB02-RSYS:SET-ACC-VOLT + VA-S30CB03-RSYS:SET-ACC-VOLT + VA-S30CB04-RSYS:SET-ACC-VOLT + VA-S30CB05-RSYS:SET-ACC-VOLT + VA-S30CB06-RSYS:SET-ACC-VOLT + VA-S30CB07-RSYS:SET-ACC-VOLT + VA-S30CB08-RSYS:SET-ACC-VOLT + VA-S30CB09-RSYS:SET-ACC-VOLT + VA-S30CB10-RSYS:SET-ACC-VOLT + VA-S30CB11-RSYS:SET-ACC-VOLT + VA-S30CB12-RSYS:SET-ACC-VOLT + VA-S30CB13-RSYS:SET-ACC-VOLT + VA-S30CB14-RSYS:SET-ACC-VOLT + + + + VA-SINEG01-DBPM340:Q1 + VA-SINSB01-DBPM150:Q1 + VA-SINSB02-DBPM150:Q1 + VA-SINLH01-DBPM060:Q1 + VA-SINLH02-DBPM210:Q1 + VA-SINLH02-DBPM240:Q1 + VA-SINLH03-DBPM010:Q1 + VA-SINLH03-DBPM050:Q1 + VA-SINLH03-DBPM090:Q1 + VA-SINSB03-DBPM120:Q1 + VA-SINSB03-DBPM220:Q1 + VA-SINSB04-DBPM120:Q1 + VA-SINSB04-DBPM220:Q1 + VA-SINSB05-DBPM120:Q1 + VA-SINSB05-DBPM220:Q1 + VA-SINXB01-DBPM120:Q1 + VA-SINBC01-DBPM010:Q1 + VA-SINBC01-DBPM030:Q1 + VA-SINBC01-DBPM080:Q1 + VA-SINBC01-DBPM100:Q1 + VA-SINBC02-DBPM140:Q1 + VA-SINBC02-DBPM320:Q1 + VA-SINDI01-DBPM010:Q1 + VA-SINDI01-DBPM060:Q1 + VA-SINDI02-DBPM010:Q1 + VA-SINDI02-DBPM040:Q1 + VA-SINDI02-DBPM080:Q1 + VA-S10CB01-DBPM220:Q1 + VA-S10CB01-DBPM420:Q1 + VA-S10CB02-DBPM220:Q1 + VA-S10CB02-DBPM420:Q1 + VA-S10DI01-DBPM110:Q1 + VA-S10CB03-DBPM220:Q1 + VA-S10CB03-DBPM420:Q1 + VA-S10CB04-DBPM220:Q1 + VA-S10CB04-DBPM420:Q1 + VA-S10CB05-DBPM220:Q1 + VA-S10CB05-DBPM420:Q1 + VA-S10CB06-DBPM220:Q1 + VA-S10CB06-DBPM420:Q1 + VA-S10CB07-DBPM220:Q1 + VA-S10CB07-DBPM420:Q1 + VA-S10CB08-DBPM220:Q1 + VA-S10CB08-DBPM420:Q1 + VA-S10CB09-DBPM220:Q1 + VA-S10BC01-DBPM010:Q1 + VA-S10BC01-DBPM050:Q1 + VA-S10BC01-DBPM090:Q1 + VA-S10BC02-DBPM140:Q1 + VA-S10BC02-DBPM320:Q1 + VA-S10MA01-DBPM010:Q1 + VA-S10MA01-DBPM060:Q1 + VA-S10MA01-DBPM120:Q1 + VA-S20CB01-DBPM420:Q1 + VA-S20CB02-DBPM420:Q1 + VA-S20CB03-DBPM420:Q1 + VA-S20SY01-DBPM010:Q1 + VA-S20SY01-DBPM040:Q1 + VA-S20SY01-DBPM060:Q1 + VA-S20SY02-DBPM080:Q1 + VA-S20SY02-DBPM120:Q1 + VA-S20SY02-DBPM150:Q1 + VA-S20SY03-DBPM010:Q1 + VA-S20SY03-DBPM040:Q1 + VA-S20SY03-DBPM080:Q1 + VA-S30CB01-DBPM420:Q1 + VA-S30CB02-DBPM420:Q1 + VA-S30CB03-DBPM420:Q1 + VA-S30CB04-DBPM420:Q1 + VA-S30CB05-DBPM420:Q1 + VA-S30CB06-DBPM420:Q1 + VA-S30CB07-DBPM420:Q1 + VA-S30CB08-DBPM420:Q1 + VA-S30CB09-DBPM420:Q1 + VA-S30CB10-DBPM420:Q1 + VA-S30CB11-DBPM420:Q1 + VA-S30CB12-DBPM420:Q1 + VA-S30CB13-DBPM420:Q1 + VA-S30CB14-DBPM420:Q1 + VA-S30CB15-DBPM420:Q1 + VA-SARCL01-DBPM010:Q1 + VA-SARCL01-DBPM060:Q1 + VA-SARCL01-DBPM120:Q1 + VA-SARCL01-DBPM150:Q1 + VA-SARCL02-DBPM110:Q1 + VA-SARCL02-DBPM220:Q1 + VA-SARCL02-DBPM260:Q1 + VA-SARCL02-DBPM330:Q1 + VA-SARCL02-DBPM470:Q1 + VA-SARMA01-DBPM040:Q1 + VA-SARMA01-DBPM100:Q1 + VA-SARMA02-DBPM010:Q1 + VA-SARMA02-DBPM020:Q1 + VA-SARMA02-DBPM040:Q1 + VA-SARMA02-DBPM110:Q1 + VA-SARUN01-DBPM070:Q1 + VA-SARUN02-DBPM070:Q1 + VA-SARUN03-DBPM070:Q1 + VA-SARUN04-DBPM070:Q1 + VA-SARUN05-DBPM070:Q1 + VA-SARUN06-DBPM070:Q1 + VA-SARUN07-DBPM070:Q1 + VA-SARUN08-DBPM070:Q1 + VA-SARUN09-DBPM070:Q1 + VA-SARUN10-DBPM070:Q1 + VA-SARUN11-DBPM070:Q1 + VA-SARUN12-DBPM070:Q1 + VA-SARUN13-DBPM070:Q1 + VA-SARUN14-DBPM070:Q1 + VA-SARUN15-DBPM070:Q1 + VA-SARUN16-DBPM070:Q1 + VA-SARUN17-DBPM070:Q1 + VA-SARUN18-DBPM070:Q1 + VA-SARUN19-DBPM070:Q1 + VA-SARUN20-DBPM070:Q1 + VA-SARBD01-DBPM040:Q1 + VA-SATSY01-DBPM010:Q1 + VA-SATSY01-DBPM060:Q1 + VA-SATSY01-DBPM100:Q1 + VA-SATSY01-DBPM240:Q1 + VA-SATSY01-DBPM290:Q1 + VA-SATSY02-DBPM020:Q1 + VA-SATSY02-DBPM210:Q1 + VA-SATSY03-DBPM030:Q1 + VA-SATSY03-DBPM060:Q1 + VA-SATSY03-DBPM090:Q1 + VA-SATSY03-DBPM120:Q1 + VA-SATCL01-DBPM140:Q1 + VA-SATDI01-DBPM030:Q1 + VA-SATDI01-DBPM060:Q1 + VA-SATDI01-DBPM110:Q1 + VA-SATDI01-DBPM240:Q1 + VA-SATDI01-DBPM270:Q1 + VA-SATDI01-DBPM310:Q1 + VA-SATMA01-DBPM010:Q1 + VA-SATMA01-DBPM020:Q1 + VA-SATMA01-DBPM040:Q1 + VA-S10BD01-DBPM020:Q1 + VA-SARBD02-DBPM010:Q1 + VA-SARBD02-DBPM040:Q1 + + + + VA-SINEG01-RSYS:SET-VSUM-PHASE + VA-SINSB01-RSYS:SET-VSUM-PHASE + VA-SINSB02-RSYS:SET-VSUM-PHASE + VA-SINSB03-RSYS:SET-VSUM-PHASE + VA-SINSB04-RSYS:SET-VSUM-PHASE + VA-SINXB01-RSYS:SET-VSUM-PHASE + VA-SINDI01-RSYS:SET-VSUM-PHASE + VA-S10CB01-RSYS:SET-VSUM-PHASE + VA-S10CB02-RSYS:SET-VSUM-PHASE + VA-S10CB03-RSYS:SET-VSUM-PHASE + VA-S10CB04-RSYS:SET-VSUM-PHASE + VA-S10CB05-RSYS:SET-VSUM-PHASE + VA-S10CB06-RSYS:SET-VSUM-PHASE + VA-S10CB07-RSYS:SET-VSUM-PHASE + VA-S10CB08-RSYS:SET-VSUM-PHASE + VA-S10CB09-RSYS:SET-VSUM-PHASE + VA-S20CB01-RSYS:SET-VSUM-PHASE + VA-S20CB02-RSYS:SET-VSUM-PHASE + VA-S20CB03-RSYS:SET-VSUM-PHASE + VA-S20CB04-RSYS:SET-VSUM-PHASE + VA-S30CB01-RSYS:SET-VSUM-PHASE + VA-S30CB02-RSYS:SET-VSUM-PHASE + VA-S30CB03-RSYS:SET-VSUM-PHASE + VA-S30CB04-RSYS:SET-VSUM-PHASE + VA-S30CB05-RSYS:SET-VSUM-PHASE + VA-S30CB06-RSYS:SET-VSUM-PHASE + VA-S30CB07-RSYS:SET-VSUM-PHASE + VA-S30CB08-RSYS:SET-VSUM-PHASE + VA-S30CB09-RSYS:SET-VSUM-PHASE + VA-S30CB10-RSYS:SET-VSUM-PHASE + VA-S30CB11-RSYS:SET-VSUM-PHASE + VA-S30CB12-RSYS:SET-VSUM-PHASE + VA-S30CB13-RSYS:SET-VSUM-PHASE + VA-S30CB14-RSYS:SET-VSUM-PHASE + + + + VA-SINEG01-DBPM340:Y2-VALID + VA-SINSB01-DBPM150:Y2-VALID + VA-SINSB02-DBPM150:Y2-VALID + VA-SINLH01-DBPM060:Y2-VALID + VA-SINLH02-DBPM210:Y2-VALID + VA-SINLH02-DBPM240:Y2-VALID + VA-SINLH03-DBPM010:Y2-VALID + VA-SINLH03-DBPM050:Y2-VALID + VA-SINLH03-DBPM090:Y2-VALID + VA-SINSB03-DBPM120:Y2-VALID + VA-SINSB03-DBPM220:Y2-VALID + VA-SINSB04-DBPM120:Y2-VALID + VA-SINSB04-DBPM220:Y2-VALID + VA-SINSB05-DBPM120:Y2-VALID + VA-SINSB05-DBPM220:Y2-VALID + VA-SINXB01-DBPM120:Y2-VALID + VA-SINBC01-DBPM010:Y2-VALID + VA-SINBC01-DBPM030:Y2-VALID + VA-SINBC01-DBPM080:Y2-VALID + VA-SINBC01-DBPM100:Y2-VALID + VA-SINBC02-DBPM140:Y2-VALID + VA-SINBC02-DBPM320:Y2-VALID + VA-SINDI01-DBPM010:Y2-VALID + VA-SINDI01-DBPM060:Y2-VALID + VA-SINDI02-DBPM010:Y2-VALID + VA-SINDI02-DBPM040:Y2-VALID + VA-SINDI02-DBPM080:Y2-VALID + VA-S10CB01-DBPM220:Y2-VALID + VA-S10CB01-DBPM420:Y2-VALID + VA-S10CB02-DBPM220:Y2-VALID + VA-S10CB02-DBPM420:Y2-VALID + VA-S10DI01-DBPM110:Y2-VALID + VA-S10CB03-DBPM220:Y2-VALID + VA-S10CB03-DBPM420:Y2-VALID + VA-S10CB04-DBPM220:Y2-VALID + VA-S10CB04-DBPM420:Y2-VALID + VA-S10CB05-DBPM220:Y2-VALID + VA-S10CB05-DBPM420:Y2-VALID + VA-S10CB06-DBPM220:Y2-VALID + VA-S10CB06-DBPM420:Y2-VALID + VA-S10CB07-DBPM220:Y2-VALID + VA-S10CB07-DBPM420:Y2-VALID + VA-S10CB08-DBPM220:Y2-VALID + VA-S10CB08-DBPM420:Y2-VALID + VA-S10CB09-DBPM220:Y2-VALID + VA-S10BC01-DBPM010:Y2-VALID + VA-S10BC01-DBPM050:Y2-VALID + VA-S10BC01-DBPM090:Y2-VALID + VA-S10BC02-DBPM140:Y2-VALID + VA-S10BC02-DBPM320:Y2-VALID + VA-S10MA01-DBPM010:Y2-VALID + VA-S10MA01-DBPM060:Y2-VALID + VA-S10MA01-DBPM120:Y2-VALID + VA-S20CB01-DBPM420:Y2-VALID + VA-S20CB02-DBPM420:Y2-VALID + VA-S20CB03-DBPM420:Y2-VALID + VA-S20SY01-DBPM010:Y2-VALID + VA-S20SY01-DBPM040:Y2-VALID + VA-S20SY01-DBPM060:Y2-VALID + VA-S20SY02-DBPM080:Y2-VALID + VA-S20SY02-DBPM120:Y2-VALID + VA-S20SY02-DBPM150:Y2-VALID + VA-S20SY03-DBPM010:Y2-VALID + VA-S20SY03-DBPM040:Y2-VALID + VA-S20SY03-DBPM080:Y2-VALID + VA-S30CB01-DBPM420:Y2-VALID + VA-S30CB02-DBPM420:Y2-VALID + VA-S30CB03-DBPM420:Y2-VALID + VA-S30CB04-DBPM420:Y2-VALID + VA-S30CB05-DBPM420:Y2-VALID + VA-S30CB06-DBPM420:Y2-VALID + VA-S30CB07-DBPM420:Y2-VALID + VA-S30CB08-DBPM420:Y2-VALID + VA-S30CB09-DBPM420:Y2-VALID + VA-S30CB10-DBPM420:Y2-VALID + VA-S30CB11-DBPM420:Y2-VALID + VA-S30CB12-DBPM420:Y2-VALID + VA-S30CB13-DBPM420:Y2-VALID + VA-S30CB14-DBPM420:Y2-VALID + VA-S30CB15-DBPM420:Y2-VALID + VA-SARCL01-DBPM010:Y2-VALID + VA-SARCL01-DBPM060:Y2-VALID + VA-SARCL01-DBPM120:Y2-VALID + VA-SARCL01-DBPM150:Y2-VALID + VA-SARCL02-DBPM110:Y2-VALID + VA-SARCL02-DBPM220:Y2-VALID + VA-SARCL02-DBPM260:Y2-VALID + VA-SARCL02-DBPM330:Y2-VALID + VA-SARCL02-DBPM470:Y2-VALID + VA-SARMA01-DBPM040:Y2-VALID + VA-SARMA01-DBPM100:Y2-VALID + VA-SARMA02-DBPM010:Y2-VALID + VA-SARMA02-DBPM020:Y2-VALID + VA-SARMA02-DBPM040:Y2-VALID + VA-SARMA02-DBPM110:Y2-VALID + VA-SARUN01-DBPM070:Y2-VALID + VA-SARUN02-DBPM070:Y2-VALID + VA-SARUN03-DBPM070:Y2-VALID + VA-SARUN04-DBPM070:Y2-VALID + VA-SARUN05-DBPM070:Y2-VALID + VA-SARUN06-DBPM070:Y2-VALID + VA-SARUN07-DBPM070:Y2-VALID + VA-SARUN08-DBPM070:Y2-VALID + VA-SARUN09-DBPM070:Y2-VALID + VA-SARUN10-DBPM070:Y2-VALID + VA-SARUN11-DBPM070:Y2-VALID + VA-SARUN12-DBPM070:Y2-VALID + VA-SARUN13-DBPM070:Y2-VALID + VA-SARUN14-DBPM070:Y2-VALID + VA-SARUN15-DBPM070:Y2-VALID + VA-SARUN16-DBPM070:Y2-VALID + VA-SARUN17-DBPM070:Y2-VALID + VA-SARUN18-DBPM070:Y2-VALID + VA-SARUN19-DBPM070:Y2-VALID + VA-SARUN20-DBPM070:Y2-VALID + VA-SARBD01-DBPM040:Y2-VALID + VA-SATSY01-DBPM010:Y2-VALID + VA-SATSY01-DBPM060:Y2-VALID + VA-SATSY01-DBPM100:Y2-VALID + VA-SATSY01-DBPM240:Y2-VALID + VA-SATSY01-DBPM290:Y2-VALID + VA-SATSY02-DBPM020:Y2-VALID + VA-SATSY02-DBPM210:Y2-VALID + VA-SATSY03-DBPM030:Y2-VALID + VA-SATSY03-DBPM060:Y2-VALID + VA-SATSY03-DBPM090:Y2-VALID + VA-SATSY03-DBPM120:Y2-VALID + VA-SATCL01-DBPM140:Y2-VALID + VA-SATDI01-DBPM030:Y2-VALID + VA-SATDI01-DBPM060:Y2-VALID + VA-SATDI01-DBPM110:Y2-VALID + VA-SATDI01-DBPM240:Y2-VALID + VA-SATDI01-DBPM270:Y2-VALID + VA-SATDI01-DBPM310:Y2-VALID + VA-SATMA01-DBPM010:Y2-VALID + VA-SATMA01-DBPM020:Y2-VALID + VA-SATMA01-DBPM040:Y2-VALID + VA-S10BD01-DBPM020:Y2-VALID + VA-SARBD02-DBPM010:Y2-VALID + VA-SARBD02-DBPM040:Y2-VALID + + + + VA-SINEG01-DBPM340:X2 + VA-SINSB01-DBPM150:X2 + VA-SINSB02-DBPM150:X2 + VA-SINLH01-DBPM060:X2 + VA-SINLH02-DBPM210:X2 + VA-SINLH02-DBPM240:X2 + VA-SINLH03-DBPM010:X2 + VA-SINLH03-DBPM050:X2 + VA-SINLH03-DBPM090:X2 + VA-SINSB03-DBPM120:X2 + VA-SINSB03-DBPM220:X2 + VA-SINSB04-DBPM120:X2 + VA-SINSB04-DBPM220:X2 + VA-SINSB05-DBPM120:X2 + VA-SINSB05-DBPM220:X2 + VA-SINXB01-DBPM120:X2 + VA-SINBC01-DBPM010:X2 + VA-SINBC01-DBPM030:X2 + VA-SINBC01-DBPM080:X2 + VA-SINBC01-DBPM100:X2 + VA-SINBC02-DBPM140:X2 + VA-SINBC02-DBPM320:X2 + VA-SINDI01-DBPM010:X2 + VA-SINDI01-DBPM060:X2 + VA-SINDI02-DBPM010:X2 + VA-SINDI02-DBPM040:X2 + VA-SINDI02-DBPM080:X2 + VA-S10CB01-DBPM220:X2 + VA-S10CB01-DBPM420:X2 + VA-S10CB02-DBPM220:X2 + VA-S10CB02-DBPM420:X2 + VA-S10DI01-DBPM110:X2 + VA-S10CB03-DBPM220:X2 + VA-S10CB03-DBPM420:X2 + VA-S10CB04-DBPM220:X2 + VA-S10CB04-DBPM420:X2 + VA-S10CB05-DBPM220:X2 + VA-S10CB05-DBPM420:X2 + VA-S10CB06-DBPM220:X2 + VA-S10CB06-DBPM420:X2 + VA-S10CB07-DBPM220:X2 + VA-S10CB07-DBPM420:X2 + VA-S10CB08-DBPM220:X2 + VA-S10CB08-DBPM420:X2 + VA-S10CB09-DBPM220:X2 + VA-S10BC01-DBPM010:X2 + VA-S10BC01-DBPM050:X2 + VA-S10BC01-DBPM090:X2 + VA-S10BC02-DBPM140:X2 + VA-S10BC02-DBPM320:X2 + VA-S10MA01-DBPM010:X2 + VA-S10MA01-DBPM060:X2 + VA-S10MA01-DBPM120:X2 + VA-S20CB01-DBPM420:X2 + VA-S20CB02-DBPM420:X2 + VA-S20CB03-DBPM420:X2 + VA-S20SY01-DBPM010:X2 + VA-S20SY01-DBPM040:X2 + VA-S20SY01-DBPM060:X2 + VA-S20SY02-DBPM080:X2 + VA-S20SY02-DBPM120:X2 + VA-S20SY02-DBPM150:X2 + VA-S20SY03-DBPM010:X2 + VA-S20SY03-DBPM040:X2 + VA-S20SY03-DBPM080:X2 + VA-S30CB01-DBPM420:X2 + VA-S30CB02-DBPM420:X2 + VA-S30CB03-DBPM420:X2 + VA-S30CB04-DBPM420:X2 + VA-S30CB05-DBPM420:X2 + VA-S30CB06-DBPM420:X2 + VA-S30CB07-DBPM420:X2 + VA-S30CB08-DBPM420:X2 + VA-S30CB09-DBPM420:X2 + VA-S30CB10-DBPM420:X2 + VA-S30CB11-DBPM420:X2 + VA-S30CB12-DBPM420:X2 + VA-S30CB13-DBPM420:X2 + VA-S30CB14-DBPM420:X2 + VA-S30CB15-DBPM420:X2 + VA-SARCL01-DBPM010:X2 + VA-SARCL01-DBPM060:X2 + VA-SARCL01-DBPM120:X2 + VA-SARCL01-DBPM150:X2 + VA-SARCL02-DBPM110:X2 + VA-SARCL02-DBPM220:X2 + VA-SARCL02-DBPM260:X2 + VA-SARCL02-DBPM330:X2 + VA-SARCL02-DBPM470:X2 + VA-SARMA01-DBPM040:X2 + VA-SARMA01-DBPM100:X2 + VA-SARMA02-DBPM010:X2 + VA-SARMA02-DBPM020:X2 + VA-SARMA02-DBPM040:X2 + VA-SARMA02-DBPM110:X2 + VA-SARUN01-DBPM070:X2 + VA-SARUN02-DBPM070:X2 + VA-SARUN03-DBPM070:X2 + VA-SARUN04-DBPM070:X2 + VA-SARUN05-DBPM070:X2 + VA-SARUN06-DBPM070:X2 + VA-SARUN07-DBPM070:X2 + VA-SARUN08-DBPM070:X2 + VA-SARUN09-DBPM070:X2 + VA-SARUN10-DBPM070:X2 + VA-SARUN11-DBPM070:X2 + VA-SARUN12-DBPM070:X2 + VA-SARUN13-DBPM070:X2 + VA-SARUN14-DBPM070:X2 + VA-SARUN15-DBPM070:X2 + VA-SARUN16-DBPM070:X2 + VA-SARUN17-DBPM070:X2 + VA-SARUN18-DBPM070:X2 + VA-SARUN19-DBPM070:X2 + VA-SARUN20-DBPM070:X2 + VA-SARBD01-DBPM040:X2 + VA-SATSY01-DBPM010:X2 + VA-SATSY01-DBPM060:X2 + VA-SATSY01-DBPM100:X2 + VA-SATSY01-DBPM240:X2 + VA-SATSY01-DBPM290:X2 + VA-SATSY02-DBPM020:X2 + VA-SATSY02-DBPM210:X2 + VA-SATSY03-DBPM030:X2 + VA-SATSY03-DBPM060:X2 + VA-SATSY03-DBPM090:X2 + VA-SATSY03-DBPM120:X2 + VA-SATCL01-DBPM140:X2 + VA-SATDI01-DBPM030:X2 + VA-SATDI01-DBPM060:X2 + VA-SATDI01-DBPM110:X2 + VA-SATDI01-DBPM240:X2 + VA-SATDI01-DBPM270:X2 + VA-SATDI01-DBPM310:X2 + VA-SATMA01-DBPM010:X2 + VA-SATMA01-DBPM020:X2 + VA-SATMA01-DBPM040:X2 + VA-S10BD01-DBPM020:X2 + VA-SARBD02-DBPM010:X2 + VA-SARBD02-DBPM040:X2 + + + + VA-SINEG01-DBPM340:ENERGY + VA-SINSB01-DBPM150:ENERGY + VA-SINSB02-DBPM150:ENERGY + VA-SINLH01-DBPM060:ENERGY + VA-SINLH02-DBPM210:ENERGY + VA-SINLH02-DBPM240:ENERGY + VA-SINLH03-DBPM010:ENERGY + VA-SINLH03-DBPM050:ENERGY + VA-SINLH03-DBPM090:ENERGY + VA-SINSB03-DBPM120:ENERGY + VA-SINSB03-DBPM220:ENERGY + VA-SINSB04-DBPM120:ENERGY + VA-SINSB04-DBPM220:ENERGY + VA-SINSB05-DBPM120:ENERGY + VA-SINSB05-DBPM220:ENERGY + VA-SINXB01-DBPM120:ENERGY + VA-SINBC01-DBPM010:ENERGY + VA-SINBC01-DBPM030:ENERGY + VA-SINBC01-DBPM080:ENERGY + VA-SINBC01-DBPM100:ENERGY + VA-SINBC02-DBPM140:ENERGY + VA-SINBC02-DBPM320:ENERGY + VA-SINDI01-DBPM010:ENERGY + VA-SINDI01-DBPM060:ENERGY + VA-SINDI02-DBPM010:ENERGY + VA-SINDI02-DBPM040:ENERGY + VA-SINDI02-DBPM080:ENERGY + VA-S10CB01-DBPM220:ENERGY + VA-S10CB01-DBPM420:ENERGY + VA-S10CB02-DBPM220:ENERGY + VA-S10CB02-DBPM420:ENERGY + VA-S10DI01-DBPM110:ENERGY + VA-S10CB03-DBPM220:ENERGY + VA-S10CB03-DBPM420:ENERGY + VA-S10CB04-DBPM220:ENERGY + VA-S10CB04-DBPM420:ENERGY + VA-S10CB05-DBPM220:ENERGY + VA-S10CB05-DBPM420:ENERGY + VA-S10CB06-DBPM220:ENERGY + VA-S10CB06-DBPM420:ENERGY + VA-S10CB07-DBPM220:ENERGY + VA-S10CB07-DBPM420:ENERGY + VA-S10CB08-DBPM220:ENERGY + VA-S10CB08-DBPM420:ENERGY + VA-S10CB09-DBPM220:ENERGY + VA-S10BC01-DBPM010:ENERGY + VA-S10BC01-DBPM050:ENERGY + VA-S10BC01-DBPM090:ENERGY + VA-S10BC02-DBPM140:ENERGY + VA-S10BC02-DBPM320:ENERGY + VA-S10MA01-DBPM010:ENERGY + VA-S10MA01-DBPM060:ENERGY + VA-S10MA01-DBPM120:ENERGY + VA-S20CB01-DBPM420:ENERGY + VA-S20CB02-DBPM420:ENERGY + VA-S20CB03-DBPM420:ENERGY + VA-S20SY01-DBPM010:ENERGY + VA-S20SY01-DBPM040:ENERGY + VA-S20SY01-DBPM060:ENERGY + VA-S20SY02-DBPM080:ENERGY + VA-S20SY02-DBPM120:ENERGY + VA-S20SY02-DBPM150:ENERGY + VA-S20SY03-DBPM010:ENERGY + VA-S20SY03-DBPM040:ENERGY + VA-S20SY03-DBPM080:ENERGY + VA-S30CB01-DBPM420:ENERGY + VA-S30CB02-DBPM420:ENERGY + VA-S30CB03-DBPM420:ENERGY + VA-S30CB04-DBPM420:ENERGY + VA-S30CB05-DBPM420:ENERGY + VA-S30CB06-DBPM420:ENERGY + VA-S30CB07-DBPM420:ENERGY + VA-S30CB08-DBPM420:ENERGY + VA-S30CB09-DBPM420:ENERGY + VA-S30CB10-DBPM420:ENERGY + VA-S30CB11-DBPM420:ENERGY + VA-S30CB12-DBPM420:ENERGY + VA-S30CB13-DBPM420:ENERGY + VA-S30CB14-DBPM420:ENERGY + VA-S30CB15-DBPM420:ENERGY + VA-SARCL01-DBPM010:ENERGY + VA-SARCL01-DBPM060:ENERGY + VA-SARCL01-DBPM120:ENERGY + VA-SARCL01-DBPM150:ENERGY + VA-SARCL02-DBPM110:ENERGY + VA-SARCL02-DBPM220:ENERGY + VA-SARCL02-DBPM260:ENERGY + VA-SARCL02-DBPM330:ENERGY + VA-SARCL02-DBPM470:ENERGY + VA-SARMA01-DBPM040:ENERGY + VA-SARMA01-DBPM100:ENERGY + VA-SARMA02-DBPM010:ENERGY + VA-SARMA02-DBPM020:ENERGY + VA-SARMA02-DBPM040:ENERGY + VA-SARMA02-DBPM110:ENERGY + VA-SARUN01-DBPM070:ENERGY + VA-SARUN02-DBPM070:ENERGY + VA-SARUN03-DBPM070:ENERGY + VA-SARUN04-DBPM070:ENERGY + VA-SARUN05-DBPM070:ENERGY + VA-SARUN06-DBPM070:ENERGY + VA-SARUN07-DBPM070:ENERGY + VA-SARUN08-DBPM070:ENERGY + VA-SARUN09-DBPM070:ENERGY + VA-SARUN10-DBPM070:ENERGY + VA-SARUN11-DBPM070:ENERGY + VA-SARUN12-DBPM070:ENERGY + VA-SARUN13-DBPM070:ENERGY + VA-SARUN14-DBPM070:ENERGY + VA-SARUN15-DBPM070:ENERGY + VA-SARUN16-DBPM070:ENERGY + VA-SARUN17-DBPM070:ENERGY + VA-SARUN18-DBPM070:ENERGY + VA-SARUN19-DBPM070:ENERGY + VA-SARUN20-DBPM070:ENERGY + VA-SARBD01-DBPM040:ENERGY + VA-SATSY01-DBPM010:ENERGY + VA-SATSY01-DBPM060:ENERGY + VA-SATSY01-DBPM100:ENERGY + VA-SATSY01-DBPM240:ENERGY + VA-SATSY01-DBPM290:ENERGY + VA-SATSY02-DBPM020:ENERGY + VA-SATSY02-DBPM210:ENERGY + VA-SATSY03-DBPM030:ENERGY + VA-SATSY03-DBPM060:ENERGY + VA-SATSY03-DBPM090:ENERGY + VA-SATSY03-DBPM120:ENERGY + VA-SATCL01-DBPM140:ENERGY + VA-SATDI01-DBPM030:ENERGY + VA-SATDI01-DBPM060:ENERGY + VA-SATDI01-DBPM110:ENERGY + VA-SATDI01-DBPM240:ENERGY + VA-SATDI01-DBPM270:ENERGY + VA-SATDI01-DBPM310:ENERGY + VA-SATMA01-DBPM010:ENERGY + VA-SATMA01-DBPM020:ENERGY + VA-SATMA01-DBPM040:ENERGY + VA-S10BD01-DBPM020:ENERGY + VA-SARBD02-DBPM010:ENERGY + VA-SARBD02-DBPM040:ENERGY + VA-SINEG01-DSCR190:ENERGY + VA-SINEG01-DSCR350:ENERGY + VA-SINLH01-DSCR080:ENERGY + VA-SINLH02-DSCR220:ENERGY + VA-SINLH02-DSCR250:ENERGY + VA-SINLH03-DSCR070:ENERGY + VA-SINSB03-DSCR110:ENERGY + VA-SINBC01-DSCR040:ENERGY + VA-SINBC02-DSCR220:ENERGY + VA-SINDI01-DSCR080:ENERGY + VA-S10DI01-DSCR020:ENERGY + VA-S10BC02-DSCR220:ENERGY + VA-S10MA01-DSCR090:ENERGY + VA-SARCL01-DSCR170:ENERGY + VA-SARCL02-DSCR280:ENERGY + VA-SARMA02-DSCR030:ENERGY + VA-SARBD01-DSCR050:ENERGY + VA-SARBD01-DSCR110:ENERGY + VA-SATCL01-DSCR150:ENERGY + VA-SATMA01-DSCR030:ENERGY + VA-SINBD01-DSCR010:ENERGY + VA-S10BD01-DSCR030:ENERGY + VA-SARBD02-DSCR050:ENERGY + VA-SINEG01-MSOL010:ENERGY + VA-SINEG01-MSOL130:ENERGY + VA-SINSB01-MSOL110:ENERGY + VA-SINSB01-MSOL120:ENERGY + VA-SINSB01-MSOL130:ENERGY + VA-SINSB01-MSOL140:ENERGY + VA-SINSB02-MSOL110:ENERGY + VA-SINSB02-MSOL120:ENERGY + VA-SINSB02-MSOL130:ENERGY + VA-SINSB02-MSOL140:ENERGY + VA-SINEG01-MBND300:ENERGY + VA-SINLH02-MBND100:ENERGY + VA-SINLH02-MBND200:ENERGY + VA-SINLH02-MBND300:ENERGY + VA-SINLH02-MBND400:ENERGY + VA-SINBC02-MBND100:ENERGY + VA-SINBC02-MBND200:ENERGY + VA-SINBC02-MBND300:ENERGY + VA-SINBC02-MBND400:ENERGY + VA-S10DI01-MBND100:ENERGY + VA-S10BC02-MBND100:ENERGY + VA-S10BC02-MBND200:ENERGY + VA-S10BC02-MBND300:ENERGY + VA-S10BC02-MBND400:ENERGY + VA-S10MA01-MBND100:ENERGY + VA-S20SY02-MBND200:ENERGY + VA-SARCL02-MBND100:ENERGY + VA-SARCL02-MBND200:ENERGY + VA-SARCL02-MBND400:ENERGY + VA-SARCL02-MBND500:ENERGY + VA-SARMA02-MBND100:ENERGY + VA-SARBD01-MBND100:ENERGY + VA-SARBD01-MBND200:ENERGY + VA-SATSY01-MBND200:ENERGY + VA-SATSY01-MBND400:ENERGY + VA-SATSY02-MBND100:ENERGY + VA-SATSY02-MBND200:ENERGY + VA-SATCL01-MBND100:ENERGY + VA-SATCL01-MBND300:ENERGY + VA-SATMA01-MBND100:ENERGY + VA-SINEG01-MQUA140:ENERGY + VA-SINEG01-MQUA150:ENERGY + VA-SINEG01-MQUA310:ENERGY + VA-SINEG01-MQUA320:ENERGY + VA-SINLH01-MQUA020:ENERGY + VA-SINLH01-MQUA030:ENERGY + VA-SINLH01-MQUA040:ENERGY + VA-SINLH01-MQUA050:ENERGY + VA-SINLH01-MQUA070:ENERGY + VA-SINLH02-MQUA010:ENERGY + VA-SINLH02-MQUA410:ENERGY + VA-SINLH03-MQUA030:ENERGY + VA-SINLH03-MQUA040:ENERGY + VA-SINLH03-MQUA060:ENERGY + VA-SINLH03-MQUA080:ENERGY + VA-SINSB03-MQUA130:ENERGY + VA-SINSB03-MQUA230:ENERGY + VA-SINSB04-MQUA130:ENERGY + VA-SINSB04-MQUA230:ENERGY + VA-SINSB05-MQUA130:ENERGY + VA-SINSB05-MQUA230:ENERGY + VA-SINBC01-MQUA020:ENERGY + VA-SINBC01-MQUA050:ENERGY + VA-SINBC01-MQUA070:ENERGY + VA-SINBC01-MQUA090:ENERGY + VA-SINBC01-MQUA110:ENERGY + VA-SINBC02-MQUA110:ENERGY + VA-SINBC02-MQUA120:ENERGY + VA-SINBC02-MQUA340:ENERGY + VA-SINBC02-MQUA350:ENERGY + VA-SINDI01-MQUA020:ENERGY + VA-SINDI01-MQUA030:ENERGY + VA-SINDI01-MQUA070:ENERGY + VA-SINDI02-MQUA020:ENERGY + VA-SINDI02-MQUA030:ENERGY + VA-SINDI02-MQUA050:ENERGY + VA-SINDI02-MQUA060:ENERGY + VA-SINDI02-MQUA070:ENERGY + VA-SINDI02-MQUA090:ENERGY + VA-S10CB01-MQUA230:ENERGY + VA-S10CB01-MQUA430:ENERGY + VA-S10CB02-MQUA230:ENERGY + VA-S10CB02-MQUA430:ENERGY + VA-S10DI01-MQUA030:ENERGY + VA-S10DI01-MQUA120:ENERGY + VA-S10CB03-MQUA230:ENERGY + VA-S10CB03-MQUA430:ENERGY + VA-S10CB04-MQUA230:ENERGY + VA-S10CB04-MQUA430:ENERGY + VA-S10CB05-MQUA230:ENERGY + VA-S10CB05-MQUA430:ENERGY + VA-S10CB06-MQUA230:ENERGY + VA-S10CB06-MQUA430:ENERGY + VA-S10CB07-MQUA230:ENERGY + VA-S10CB07-MQUA430:ENERGY + VA-S10CB08-MQUA230:ENERGY + VA-S10CB08-MQUA430:ENERGY + VA-S10CB09-MQUA230:ENERGY + VA-S10BC01-MQUA020:ENERGY + VA-S10BC01-MQUA040:ENERGY + VA-S10BC01-MQUA060:ENERGY + VA-S10BC01-MQUA080:ENERGY + VA-S10BC01-MQUA100:ENERGY + VA-S10BC02-MQUA110:ENERGY + VA-S10BC02-MQUA120:ENERGY + VA-S10BC02-MQUA340:ENERGY + VA-S10BC02-MQUA350:ENERGY + VA-S10MA01-MQUA020:ENERGY + VA-S10MA01-MQUA050:ENERGY + VA-S10MA01-MQUA070:ENERGY + VA-S10MA01-MQUA110:ENERGY + VA-S10MA01-MQUA130:ENERGY + VA-S20CB01-MQUA430:ENERGY + VA-S20CB02-MQUA430:ENERGY + VA-S20CB03-MQUA430:ENERGY + VA-S20SY01-MQUA020:ENERGY + VA-S20SY01-MQUA030:ENERGY + VA-S20SY01-MQUA050:ENERGY + VA-S20SY01-MQUA080:ENERGY + VA-S20SY02-MQUA070:ENERGY + VA-S20SY02-MQUA100:ENERGY + VA-S20SY02-MQUA140:ENERGY + VA-S20SY02-MQUA180:ENERGY + VA-S20SY03-MQUA020:ENERGY + VA-S20SY03-MQUA030:ENERGY + VA-S20SY03-MQUA050:ENERGY + VA-S20SY03-MQUA060:ENERGY + VA-S20SY03-MQUA100:ENERGY + VA-S30CB01-MQUA430:ENERGY + VA-S30CB02-MQUA430:ENERGY + VA-S30CB03-MQUA430:ENERGY + VA-S30CB04-MQUA430:ENERGY + VA-S30CB05-MQUA430:ENERGY + VA-S30CB06-MQUA430:ENERGY + VA-S30CB07-MQUA430:ENERGY + VA-S30CB08-MQUA430:ENERGY + VA-S30CB09-MQUA430:ENERGY + VA-S30CB10-MQUA430:ENERGY + VA-S30CB11-MQUA430:ENERGY + VA-S30CB12-MQUA430:ENERGY + VA-S30CB13-MQUA430:ENERGY + VA-S30CB14-MQUA430:ENERGY + VA-S30CB15-MQUA430:ENERGY + VA-SARCL01-MQUA020:ENERGY + VA-SARCL01-MQUA050:ENERGY + VA-SARCL01-MQUA080:ENERGY + VA-SARCL01-MQUA100:ENERGY + VA-SARCL01-MQUA140:ENERGY + VA-SARCL01-MQUA190:ENERGY + VA-SARCL02-MQUA130:ENERGY + VA-SARCL02-MQUA150:ENERGY + VA-SARCL02-MQUA160:ENERGY + VA-SARCL02-MQUA210:ENERGY + VA-SARCL02-MQUA250:ENERGY + VA-SARCL02-MQUA300:ENERGY + VA-SARCL02-MQUA310:ENERGY + VA-SARCL02-MQUA350:ENERGY + VA-SARCL02-MQUA420:ENERGY + VA-SARCL02-MQUA430:ENERGY + VA-SARCL02-MQUA460:ENERGY + VA-SARMA01-MQUA010:ENERGY + VA-SARMA01-MQUA060:ENERGY + VA-SARMA01-MQUA080:ENERGY + VA-SARMA01-MQUA120:ENERGY + VA-SARMA01-MQUA140:ENERGY + VA-SARMA02-MQUA050:ENERGY + VA-SARMA02-MQUA120:ENERGY + VA-SARUN01-MQUA080:ENERGY + VA-SARUN02-MQUA080:ENERGY + VA-SARUN03-MQUA080:ENERGY + VA-SARUN04-MQUA080:ENERGY + VA-SARUN05-MQUA080:ENERGY + VA-SARUN06-MQUA080:ENERGY + VA-SARUN07-MQUA080:ENERGY + VA-SARUN08-MQUA080:ENERGY + VA-SARUN09-MQUA080:ENERGY + VA-SARUN10-MQUA080:ENERGY + VA-SARUN11-MQUA080:ENERGY + VA-SARUN12-MQUA080:ENERGY + VA-SARUN13-MQUA080:ENERGY + VA-SARUN14-MQUA080:ENERGY + VA-SARUN15-MQUA080:ENERGY + VA-SARUN16-MQUA080:ENERGY + VA-SARUN17-MQUA080:ENERGY + VA-SARUN18-MQUA080:ENERGY + VA-SARUN19-MQUA080:ENERGY + VA-SARUN20-MQUA080:ENERGY + VA-SARBD01-MQUA020:ENERGY + VA-SATSY01-MQUA020:ENERGY + VA-SATSY01-MQUA030:ENERGY + VA-SATSY01-MQUA040:ENERGY + VA-SATSY01-MQUA070:ENERGY + VA-SATSY01-MQUA090:ENERGY + VA-SATSY01-MQUA210:ENERGY + VA-SATSY01-MQUA230:ENERGY + VA-SATSY01-MQUA260:ENERGY + VA-SATSY01-MQUA270:ENERGY + VA-SATSY01-MQUA280:ENERGY + VA-SATSY01-MQUA300:ENERGY + VA-SATSY02-MQUA010:ENERGY + VA-SATSY02-MQUA110:ENERGY + VA-SATSY02-MQUA120:ENERGY + VA-SATSY02-MQUA230:ENERGY + VA-SATSY03-MQUA010:ENERGY + VA-SATSY03-MQUA040:ENERGY + VA-SATSY03-MQUA070:ENERGY + VA-SATSY03-MQUA100:ENERGY + VA-SATSY03-MQUA130:ENERGY + VA-SATCL01-MQUA120:ENERGY + VA-SATCL01-MQUA130:ENERGY + VA-SATCL01-MQUA180:ENERGY + VA-SATCL01-MQUA190:ENERGY + VA-SATDI01-MQUA040:ENERGY + VA-SATDI01-MQUA050:ENERGY + VA-SATDI01-MQUA220:ENERGY + VA-SATDI01-MQUA230:ENERGY + VA-SATDI01-MQUA250:ENERGY + VA-SATDI01-MQUA260:ENERGY + VA-SATDI01-MQUA280:ENERGY + VA-SATDI01-MQUA300:ENERGY + VA-SATMA01-MQUA050:ENERGY + VA-S10BD01-MQUA010:ENERGY + VA-SARBD02-MQUA030:ENERGY + VA-SARUN03-MQUA020:ENERGY + VA-SARUN03-MQUA050:ENERGY + VA-SARUN04-MQUA020:ENERGY + VA-SARUN04-MQUA050:ENERGY + VA-SARUN05-MQUA020:ENERGY + VA-SARUN05-MQUA050:ENERGY + VA-SARUN06-MQUA020:ENERGY + VA-SARUN06-MQUA050:ENERGY + VA-SARUN07-MQUA020:ENERGY + VA-SARUN07-MQUA050:ENERGY + VA-SARUN08-MQUA020:ENERGY + VA-SARUN08-MQUA050:ENERGY + VA-SARUN09-MQUA020:ENERGY + VA-SARUN09-MQUA050:ENERGY + VA-SARUN10-MQUA020:ENERGY + VA-SARUN10-MQUA050:ENERGY + VA-SARUN11-MQUA020:ENERGY + VA-SARUN11-MQUA050:ENERGY + VA-SARUN12-MQUA020:ENERGY + VA-SARUN12-MQUA050:ENERGY + VA-SARUN13-MQUA020:ENERGY + VA-SARUN13-MQUA050:ENERGY + VA-SARUN14-MQUA020:ENERGY + VA-SARUN14-MQUA050:ENERGY + VA-SARUN15-MQUA020:ENERGY + VA-SARUN15-MQUA050:ENERGY + VA-SINBC02-MSEX130:ENERGY + VA-SINBC02-MSEX330:ENERGY + VA-S10BC02-MSEX130:ENERGY + VA-S10BC02-MSEX330:ENERGY + VA-SARCL02-MSEX140:ENERGY + VA-SARCL02-MSEX440:ENERGY + VA-SATSY01-MSEX050:ENERGY + VA-SATSY01-MSEX080:ENERGY + VA-SATSY01-MSEX220:ENERGY + VA-SATSY01-MSEX250:ENERGY + VA-SATCL01-MSEX110:ENERGY + VA-SATCL01-MSEX160:ENERGY + VA-SATCL01-MSEX200:ENERGY + VA-SINEG01-MCRX120:ENERGY + VA-SINEG01-MCRY120:ENERGY + VA-SINEG01-MCRX160:ENERGY + VA-SINEG01-MCRY160:ENERGY + VA-SINEG01-MCRX180:ENERGY + VA-SINEG01-MCRY180:ENERGY + VA-SINEG01-MCRX200:ENERGY + VA-SINEG01-MCRY200:ENERGY + VA-SINEG01-MCRX220:ENERGY + VA-SINEG01-MCRY220:ENERGY + VA-SINSB01-MCRX010:ENERGY + VA-SINSB01-MCRY010:ENERGY + VA-SINSB02-MCRX010:ENERGY + VA-SINSB02-MCRY010:ENERGY + VA-SINLH01-MCRX020:ENERGY + VA-SINLH01-MCRY020:ENERGY + VA-SINLH01-MCRX050:ENERGY + VA-SINLH01-MCRY050:ENERGY + VA-SINLH02-MCRX010:ENERGY + VA-SINLH02-MCRY010:ENERGY + VA-SINLH02-MCRX100:ENERGY + VA-SINLH02-MCRX200:ENERGY + VA-SINLH02-MCRX300:ENERGY + VA-SINLH02-MCRX400:ENERGY + VA-SINLH02-MCRX410:ENERGY + VA-SINLH02-MCRY410:ENERGY + VA-SINLH03-MCRX040:ENERGY + VA-SINLH03-MCRY040:ENERGY + VA-SINLH03-MCRX080:ENERGY + VA-SINLH03-MCRY080:ENERGY + VA-SINSB03-MCRX130:ENERGY + VA-SINSB03-MCRY130:ENERGY + VA-SINSB03-MCRX230:ENERGY + VA-SINSB03-MCRY230:ENERGY + VA-SINSB04-MCRX130:ENERGY + VA-SINSB04-MCRY130:ENERGY + VA-SINSB04-MCRX230:ENERGY + VA-SINSB04-MCRY230:ENERGY + VA-SINSB05-MCRX130:ENERGY + VA-SINSB05-MCRY130:ENERGY + VA-SINSB05-MCRX230:ENERGY + VA-SINSB05-MCRY230:ENERGY + VA-SINBC01-MCRX020:ENERGY + VA-SINBC01-MCRY020:ENERGY + VA-SINBC01-MCRX050:ENERGY + VA-SINBC01-MCRY050:ENERGY + VA-SINBC01-MCRX070:ENERGY + VA-SINBC01-MCRY070:ENERGY + VA-SINBC01-MCRX090:ENERGY + VA-SINBC01-MCRY090:ENERGY + VA-SINBC01-MCRX110:ENERGY + VA-SINBC01-MCRY110:ENERGY + VA-SINBC02-MCRX100:ENERGY + VA-SINBC02-MCRX200:ENERGY + VA-SINBC02-MCRX300:ENERGY + VA-SINBC02-MCRX400:ENERGY + VA-SINDI01-MCRX020:ENERGY + VA-SINDI01-MCRY020:ENERGY + VA-SINDI01-MCRX070:ENERGY + VA-SINDI01-MCRY070:ENERGY + VA-SINDI02-MCRX020:ENERGY + VA-SINDI02-MCRY020:ENERGY + VA-SINDI02-MCRX030:ENERGY + VA-SINDI02-MCRY030:ENERGY + VA-SINDI02-MCRX050:ENERGY + VA-SINDI02-MCRY050:ENERGY + VA-SINDI02-MCRX060:ENERGY + VA-SINDI02-MCRY060:ENERGY + VA-SINDI02-MCRX090:ENERGY + VA-SINDI02-MCRY090:ENERGY + VA-S10CB01-MCRX230:ENERGY + VA-S10CB01-MCRY230:ENERGY + VA-S10CB01-MCRX430:ENERGY + VA-S10CB01-MCRY430:ENERGY + VA-S10CB02-MCRX230:ENERGY + VA-S10CB02-MCRY230:ENERGY + VA-S10CB02-MCRX430:ENERGY + VA-S10CB02-MCRY430:ENERGY + VA-S10DI01-MCRX100:ENERGY + VA-S10DI01-MCRX120:ENERGY + VA-S10DI01-MCRY120:ENERGY + VA-S10CB03-MCRX230:ENERGY + VA-S10CB03-MCRY230:ENERGY + VA-S10CB03-MCRX430:ENERGY + VA-S10CB03-MCRY430:ENERGY + VA-S10CB04-MCRX230:ENERGY + VA-S10CB04-MCRY230:ENERGY + VA-S10CB04-MCRX430:ENERGY + VA-S10CB04-MCRY430:ENERGY + VA-S10CB05-MCRX230:ENERGY + VA-S10CB05-MCRY230:ENERGY + VA-S10CB05-MCRX430:ENERGY + VA-S10CB05-MCRY430:ENERGY + VA-S10CB06-MCRX230:ENERGY + VA-S10CB06-MCRY230:ENERGY + VA-S10CB06-MCRX430:ENERGY + VA-S10CB06-MCRY430:ENERGY + VA-S10CB07-MCRX230:ENERGY + VA-S10CB07-MCRY230:ENERGY + VA-S10CB07-MCRX430:ENERGY + VA-S10CB07-MCRY430:ENERGY + VA-S10CB08-MCRX230:ENERGY + VA-S10CB08-MCRY230:ENERGY + VA-S10CB08-MCRX430:ENERGY + VA-S10CB08-MCRY430:ENERGY + VA-S10CB09-MCRX230:ENERGY + VA-S10CB09-MCRY230:ENERGY + VA-S10BC01-MCRX020:ENERGY + VA-S10BC01-MCRY020:ENERGY + VA-S10BC01-MCRX040:ENERGY + VA-S10BC01-MCRY040:ENERGY + VA-S10BC01-MCRX060:ENERGY + VA-S10BC01-MCRY060:ENERGY + VA-S10BC01-MCRX080:ENERGY + VA-S10BC01-MCRY080:ENERGY + VA-S10BC01-MCRX100:ENERGY + VA-S10BC01-MCRY100:ENERGY + VA-S10BC02-MCRX100:ENERGY + VA-S10BC02-MCRX200:ENERGY + VA-S10BC02-MCRX300:ENERGY + VA-S10BC02-MCRX400:ENERGY + VA-S10MA01-MCRX020:ENERGY + VA-S10MA01-MCRY020:ENERGY + VA-S10MA01-MCRX050:ENERGY + VA-S10MA01-MCRY050:ENERGY + VA-S10MA01-MCRX070:ENERGY + VA-S10MA01-MCRY070:ENERGY + VA-S10MA01-MCRX100:ENERGY + VA-S10MA01-MCRX110:ENERGY + VA-S10MA01-MCRY110:ENERGY + VA-S10MA01-MCRX130:ENERGY + VA-S10MA01-MCRY130:ENERGY + VA-S20CB01-MCRX430:ENERGY + VA-S20CB01-MCRY430:ENERGY + VA-S20CB02-MCRX430:ENERGY + VA-S20CB02-MCRY430:ENERGY + VA-S20CB03-MCRX430:ENERGY + VA-S20CB03-MCRY430:ENERGY + VA-S20SY01-MCRX020:ENERGY + VA-S20SY01-MCRY020:ENERGY + VA-S20SY01-MCRX030:ENERGY + VA-S20SY01-MCRY030:ENERGY + VA-S20SY01-MCRX050:ENERGY + VA-S20SY01-MCRY050:ENERGY + VA-S20SY01-MCRX080:ENERGY + VA-S20SY01-MCRY080:ENERGY + VA-S20SY02-MKDC010:ENERGY + VA-S20SY02-MKAC020:ENERGY + VA-S20SY02-MKDC030:ENERGY + VA-S20SY02-MKAC040:ENERGY + VA-S20SY02-MKDC050:ENERGY + VA-S20SY02-MCRX060:ENERGY + VA-S20SY02-MCRY060:ENERGY + VA-S20SY02-MCRX090:ENERGY + VA-S20SY02-MCRY090:ENERGY + VA-S20SY02-MCRX130:ENERGY + VA-S20SY02-MCRY130:ENERGY + VA-S20SY02-MCRX170:ENERGY + VA-S20SY02-MCRY170:ENERGY + VA-S20SY03-MCRX020:ENERGY + VA-S20SY03-MCRY020:ENERGY + VA-S20SY03-MCRX030:ENERGY + VA-S20SY03-MCRY030:ENERGY + VA-S20SY03-MCRX050:ENERGY + VA-S20SY03-MCRY050:ENERGY + VA-S20SY03-MCRX060:ENERGY + VA-S20SY03-MCRY060:ENERGY + VA-S20SY03-MCRX100:ENERGY + VA-S20SY03-MCRY100:ENERGY + VA-S30CB01-MCRX430:ENERGY + VA-S30CB01-MCRY430:ENERGY + VA-S30CB02-MCRX430:ENERGY + VA-S30CB02-MCRY430:ENERGY + VA-S30CB03-MCRX430:ENERGY + VA-S30CB03-MCRY430:ENERGY + VA-S30CB04-MCRX430:ENERGY + VA-S30CB04-MCRY430:ENERGY + VA-S30CB05-MCRX430:ENERGY + VA-S30CB05-MCRY430:ENERGY + VA-S30CB06-MCRX430:ENERGY + VA-S30CB06-MCRY430:ENERGY + VA-S30CB07-MCRX430:ENERGY + VA-S30CB07-MCRY430:ENERGY + VA-S30CB08-MCRX430:ENERGY + VA-S30CB08-MCRY430:ENERGY + VA-S30CB09-MCRX430:ENERGY + VA-S30CB09-MCRY430:ENERGY + VA-S30CB10-MCRX430:ENERGY + VA-S30CB10-MCRY430:ENERGY + VA-S30CB11-MCRX430:ENERGY + VA-S30CB11-MCRY430:ENERGY + VA-S30CB12-MCRX430:ENERGY + VA-S30CB12-MCRY430:ENERGY + VA-S30CB13-MCRX430:ENERGY + VA-S30CB13-MCRY430:ENERGY + VA-S30CB14-MCRX430:ENERGY + VA-S30CB14-MCRY430:ENERGY + VA-S30CB15-MCRX430:ENERGY + VA-S30CB15-MCRY430:ENERGY + VA-SARCL01-MCRX020:ENERGY + VA-SARCL01-MCRY020:ENERGY + VA-SARCL01-MCRX040:ENERGY + VA-SARCL01-MCRY040:ENERGY + VA-SARCL01-MCRX070:ENERGY + VA-SARCL01-MCRY070:ENERGY + VA-SARCL01-MCRX090:ENERGY + VA-SARCL01-MCRY090:ENERGY + VA-SARCL01-MCRX130:ENERGY + VA-SARCL01-MCRY130:ENERGY + VA-SARCL01-MCRX180:ENERGY + VA-SARCL01-MCRY180:ENERGY + VA-SARCL02-MCRX100:ENERGY + VA-SARCL02-MCRX120:ENERGY + VA-SARCL02-MCRY120:ENERGY + VA-SARCL02-MCRX200:ENERGY + VA-SARCL02-MCRX230:ENERGY + VA-SARCL02-MCRY230:ENERGY + VA-SARCL02-MCRX240:ENERGY + VA-SARCL02-MCRY240:ENERGY + VA-SARCL02-MCRX320:ENERGY + VA-SARCL02-MCRY320:ENERGY + VA-SARCL02-MCRX340:ENERGY + VA-SARCL02-MCRY340:ENERGY + VA-SARCL02-MCRX400:ENERGY + VA-SARCL02-MCRX450:ENERGY + VA-SARCL02-MCRY450:ENERGY + VA-SARCL02-MCRX480:ENERGY + VA-SARCL02-MCRY480:ENERGY + VA-SARCL02-MCRX500:ENERGY + VA-SARMA01-MCRX020:ENERGY + VA-SARMA01-MCRY020:ENERGY + VA-SARMA01-MCRX050:ENERGY + VA-SARMA01-MCRY050:ENERGY + VA-SARMA01-MCRX070:ENERGY + VA-SARMA01-MCRY070:ENERGY + VA-SARMA01-MCRX110:ENERGY + VA-SARMA01-MCRY110:ENERGY + VA-SARMA01-MCRX130:ENERGY + VA-SARMA01-MCRY130:ENERGY + VA-SARMA02-MCRX050:ENERGY + VA-SARMA02-MCRY050:ENERGY + VA-SARMA02-MCRX120:ENERGY + VA-SARMA02-MCRY120:ENERGY + VA-SARUN01-MCRX080:ENERGY + VA-SARUN01-MCRY080:ENERGY + VA-SARUN02-MCRX080:ENERGY + VA-SARUN02-MCRY080:ENERGY + VA-SARUN03-MCRX010:ENERGY + VA-SARUN03-MCRY010:ENERGY + VA-SARUN03-MCRX030:ENERGY + VA-SARUN03-MCRX040:ENERGY + VA-SARUN03-MCRY040:ENERGY + VA-SARUN03-MCRX080:ENERGY + VA-SARUN03-MCRY080:ENERGY + VA-SARUN04-MCRX010:ENERGY + VA-SARUN04-MCRY010:ENERGY + VA-SARUN04-MCRX030:ENERGY + VA-SARUN04-MCRX040:ENERGY + VA-SARUN04-MCRY040:ENERGY + VA-SARUN04-MCRX080:ENERGY + VA-SARUN04-MCRY080:ENERGY + VA-SARUN05-MCRX010:ENERGY + VA-SARUN05-MCRY010:ENERGY + VA-SARUN05-MCRX030:ENERGY + VA-SARUN05-MCRX040:ENERGY + VA-SARUN05-MCRY040:ENERGY + VA-SARUN05-MCRX080:ENERGY + VA-SARUN05-MCRY080:ENERGY + VA-SARUN06-MCRX010:ENERGY + VA-SARUN06-MCRY010:ENERGY + VA-SARUN06-MCRX030:ENERGY + VA-SARUN06-MCRX040:ENERGY + VA-SARUN06-MCRY040:ENERGY + VA-SARUN06-MCRX080:ENERGY + VA-SARUN06-MCRY080:ENERGY + VA-SARUN07-MCRX010:ENERGY + VA-SARUN07-MCRY010:ENERGY + VA-SARUN07-MCRX030:ENERGY + VA-SARUN07-MCRX040:ENERGY + VA-SARUN07-MCRY040:ENERGY + VA-SARUN07-MCRX080:ENERGY + VA-SARUN07-MCRY080:ENERGY + VA-SARUN08-MCRX010:ENERGY + VA-SARUN08-MCRY010:ENERGY + VA-SARUN08-MCRX030:ENERGY + VA-SARUN08-MCRX040:ENERGY + VA-SARUN08-MCRY040:ENERGY + VA-SARUN08-MCRX080:ENERGY + VA-SARUN08-MCRY080:ENERGY + VA-SARUN09-MCRX010:ENERGY + VA-SARUN09-MCRY010:ENERGY + VA-SARUN09-MCRX030:ENERGY + VA-SARUN09-MCRX040:ENERGY + VA-SARUN09-MCRY040:ENERGY + VA-SARUN09-MCRX080:ENERGY + VA-SARUN09-MCRY080:ENERGY + VA-SARUN10-MCRX010:ENERGY + VA-SARUN10-MCRY010:ENERGY + VA-SARUN10-MCRX030:ENERGY + VA-SARUN10-MCRX040:ENERGY + VA-SARUN10-MCRY040:ENERGY + VA-SARUN10-MCRX080:ENERGY + VA-SARUN10-MCRY080:ENERGY + VA-SARUN11-MCRX010:ENERGY + VA-SARUN11-MCRY010:ENERGY + VA-SARUN11-MCRX030:ENERGY + VA-SARUN11-MCRX040:ENERGY + VA-SARUN11-MCRY040:ENERGY + VA-SARUN11-MCRX080:ENERGY + VA-SARUN11-MCRY080:ENERGY + VA-SARUN12-MCRX010:ENERGY + VA-SARUN12-MCRY010:ENERGY + VA-SARUN12-MCRX030:ENERGY + VA-SARUN12-MCRX040:ENERGY + VA-SARUN12-MCRY040:ENERGY + VA-SARUN12-MCRX080:ENERGY + VA-SARUN12-MCRY080:ENERGY + VA-SARUN13-MCRX010:ENERGY + VA-SARUN13-MCRY010:ENERGY + VA-SARUN13-MCRX030:ENERGY + VA-SARUN13-MCRX040:ENERGY + VA-SARUN13-MCRY040:ENERGY + VA-SARUN13-MCRX080:ENERGY + VA-SARUN13-MCRY080:ENERGY + VA-SARUN14-MCRX010:ENERGY + VA-SARUN14-MCRY010:ENERGY + VA-SARUN14-MCRX030:ENERGY + VA-SARUN14-MCRX040:ENERGY + VA-SARUN14-MCRY040:ENERGY + VA-SARUN14-MCRX080:ENERGY + VA-SARUN14-MCRY080:ENERGY + VA-SARUN15-MCRX010:ENERGY + VA-SARUN15-MCRY010:ENERGY + VA-SARUN15-MCRX030:ENERGY + VA-SARUN15-MCRX040:ENERGY + VA-SARUN15-MCRY040:ENERGY + VA-SARUN15-MCRX080:ENERGY + VA-SARUN15-MCRY080:ENERGY + VA-SARUN16-MCRX080:ENERGY + VA-SARUN16-MCRY080:ENERGY + VA-SARUN17-MCRX080:ENERGY + VA-SARUN17-MCRY080:ENERGY + VA-SARUN18-MCRX080:ENERGY + VA-SARUN18-MCRY080:ENERGY + VA-SARUN19-MCRX080:ENERGY + VA-SARUN19-MCRY080:ENERGY + VA-SARUN20-MCRX080:ENERGY + VA-SARUN20-MCRY080:ENERGY + VA-SARBD01-MCRX020:ENERGY + VA-SARBD01-MCRY020:ENERGY + VA-SATSY01-MCRX020:ENERGY + VA-SATSY01-MCRY020:ENERGY + VA-SATSY01-MCRX040:ENERGY + VA-SATSY01-MCRY040:ENERGY + VA-SATSY01-MCRX070:ENERGY + VA-SATSY01-MCRY070:ENERGY + VA-SATSY01-MCRX090:ENERGY + VA-SATSY01-MCRY090:ENERGY + VA-SATSY01-MCRX210:ENERGY + VA-SATSY01-MCRY210:ENERGY + VA-SATSY01-MCRX230:ENERGY + VA-SATSY01-MCRY230:ENERGY + VA-SATSY01-MCRX260:ENERGY + VA-SATSY01-MCRY260:ENERGY + VA-SATSY01-MCRX280:ENERGY + VA-SATSY01-MCRY280:ENERGY + VA-SATSY01-MCRX300:ENERGY + VA-SATSY01-MCRY300:ENERGY + VA-SATSY02-MCRX010:ENERGY + VA-SATSY02-MCRY010:ENERGY + VA-SATSY02-MCRX100:ENERGY + VA-SATSY02-MCRX110:ENERGY + VA-SATSY02-MCRY110:ENERGY + VA-SATSY02-MCRX120:ENERGY + VA-SATSY02-MCRY120:ENERGY + VA-SATSY02-MCRX200:ENERGY + VA-SATSY02-MCRX230:ENERGY + VA-SATSY02-MCRY230:ENERGY + VA-SATSY03-MCRX010:ENERGY + VA-SATSY03-MCRY010:ENERGY + VA-SATSY03-MCRX040:ENERGY + VA-SATSY03-MCRY040:ENERGY + VA-SATSY03-MCRX070:ENERGY + VA-SATSY03-MCRY070:ENERGY + VA-SATSY03-MCRX100:ENERGY + VA-SATSY03-MCRY100:ENERGY + VA-SATSY03-MCRX130:ENERGY + VA-SATSY03-MCRY130:ENERGY + VA-SATCL01-MCRX100:ENERGY + VA-SATCL01-MCRX120:ENERGY + VA-SATCL01-MCRY120:ENERGY + VA-SATCL01-MCRX130:ENERGY + VA-SATCL01-MCRY130:ENERGY + VA-SATCL01-MCRX180:ENERGY + VA-SATCL01-MCRY180:ENERGY + VA-SATCL01-MCRX190:ENERGY + VA-SATCL01-MCRY190:ENERGY + VA-SATCL01-MCRX300:ENERGY + VA-SATDI01-MCRX040:ENERGY + VA-SATDI01-MCRY040:ENERGY + VA-SATDI01-MCRX050:ENERGY + VA-SATDI01-MCRY050:ENERGY + VA-SATDI01-MCRX220:ENERGY + VA-SATDI01-MCRY220:ENERGY + VA-SATDI01-MCRX230:ENERGY + VA-SATDI01-MCRY230:ENERGY + VA-SATDI01-MCRX250:ENERGY + VA-SATDI01-MCRY250:ENERGY + VA-SATDI01-MCRX260:ENERGY + VA-SATDI01-MCRY260:ENERGY + VA-SATDI01-MCRX280:ENERGY + VA-SATDI01-MCRY280:ENERGY + VA-SATDI01-MCRX300:ENERGY + VA-SATDI01-MCRY300:ENERGY + VA-SATMA01-MCRX050:ENERGY + VA-SATMA01-MCRY050:ENERGY + VA-SINEG01-RGUN100:ENERGY + VA-SINSB01-RACC100:ENERGY + VA-SINSB02-RACC100:ENERGY + VA-SINSB03-RACC100:ENERGY + VA-SINSB03-RACC200:ENERGY + VA-SINSB04-RACC100:ENERGY + VA-SINSB04-RACC200:ENERGY + VA-SINXB01-RACC100:ENERGY + VA-SINXB01-RACC200:ENERGY + VA-SINDI01-RTDS100:ENERGY + VA-S10CB01-RACC100:ENERGY + VA-S10CB01-RACC200:ENERGY + VA-S10CB01-RACC300:ENERGY + VA-S10CB01-RACC400:ENERGY + VA-S10CB02-RACC100:ENERGY + VA-S10CB02-RACC200:ENERGY + VA-S10CB02-RACC300:ENERGY + VA-S10CB02-RACC400:ENERGY + VA-S10CB03-RACC100:ENERGY + VA-S10CB03-RACC200:ENERGY + VA-S10CB03-RACC300:ENERGY + VA-S10CB03-RACC400:ENERGY + VA-S10CB04-RACC100:ENERGY + VA-S10CB04-RACC200:ENERGY + VA-S10CB04-RACC300:ENERGY + VA-S10CB04-RACC400:ENERGY + VA-S10CB05-RACC100:ENERGY + VA-S10CB05-RACC200:ENERGY + VA-S10CB05-RACC300:ENERGY + VA-S10CB05-RACC400:ENERGY + VA-S10CB06-RACC100:ENERGY + VA-S10CB06-RACC200:ENERGY + VA-S10CB06-RACC300:ENERGY + VA-S10CB06-RACC400:ENERGY + VA-S10CB07-RACC100:ENERGY + VA-S10CB07-RACC200:ENERGY + VA-S10CB07-RACC300:ENERGY + VA-S10CB07-RACC400:ENERGY + VA-S10CB08-RACC100:ENERGY + VA-S10CB08-RACC200:ENERGY + VA-S10CB08-RACC300:ENERGY + VA-S10CB08-RACC400:ENERGY + VA-S10CB09-RACC100:ENERGY + VA-S10CB09-RACC200:ENERGY + VA-S10CB09-RACC300:ENERGY + VA-S10CB09-RACC400:ENERGY + VA-S20CB01-RACC100:ENERGY + VA-S20CB01-RACC200:ENERGY + VA-S20CB01-RACC300:ENERGY + VA-S20CB01-RACC400:ENERGY + VA-S20CB02-RACC100:ENERGY + VA-S20CB02-RACC200:ENERGY + VA-S20CB02-RACC300:ENERGY + VA-S20CB02-RACC400:ENERGY + VA-S20CB03-RACC100:ENERGY + VA-S20CB03-RACC200:ENERGY + VA-S20CB03-RACC300:ENERGY + VA-S20CB03-RACC400:ENERGY + VA-S20CB04-RACC100:ENERGY + VA-S20CB04-RACC200:ENERGY + VA-S20CB04-RACC300:ENERGY + VA-S20CB04-RACC400:ENERGY + VA-S30CB01-RACC100:ENERGY + VA-S30CB01-RACC200:ENERGY + VA-S30CB01-RACC300:ENERGY + VA-S30CB01-RACC400:ENERGY + VA-S30CB02-RACC100:ENERGY + VA-S30CB02-RACC200:ENERGY + VA-S30CB02-RACC300:ENERGY + VA-S30CB02-RACC400:ENERGY + VA-S30CB03-RACC100:ENERGY + VA-S30CB03-RACC200:ENERGY + VA-S30CB03-RACC300:ENERGY + VA-S30CB03-RACC400:ENERGY + VA-S30CB04-RACC100:ENERGY + VA-S30CB04-RACC200:ENERGY + VA-S30CB04-RACC300:ENERGY + VA-S30CB04-RACC400:ENERGY + VA-S30CB05-RACC100:ENERGY + VA-S30CB05-RACC200:ENERGY + VA-S30CB05-RACC300:ENERGY + VA-S30CB05-RACC400:ENERGY + VA-S30CB06-RACC100:ENERGY + VA-S30CB06-RACC200:ENERGY + VA-S30CB06-RACC300:ENERGY + VA-S30CB06-RACC400:ENERGY + VA-S30CB07-RACC100:ENERGY + VA-S30CB07-RACC200:ENERGY + VA-S30CB07-RACC300:ENERGY + VA-S30CB07-RACC400:ENERGY + VA-S30CB08-RACC100:ENERGY + VA-S30CB08-RACC200:ENERGY + VA-S30CB08-RACC300:ENERGY + VA-S30CB08-RACC400:ENERGY + VA-S30CB09-RACC100:ENERGY + VA-S30CB09-RACC200:ENERGY + VA-S30CB09-RACC300:ENERGY + VA-S30CB09-RACC400:ENERGY + VA-S30CB10-RACC100:ENERGY + VA-S30CB10-RACC200:ENERGY + VA-S30CB10-RACC300:ENERGY + VA-S30CB10-RACC400:ENERGY + VA-S30CB11-RACC100:ENERGY + VA-S30CB11-RACC200:ENERGY + VA-S30CB11-RACC300:ENERGY + VA-S30CB11-RACC400:ENERGY + VA-S30CB12-RACC100:ENERGY + VA-S30CB12-RACC200:ENERGY + VA-S30CB12-RACC300:ENERGY + VA-S30CB12-RACC400:ENERGY + VA-S30CB13-RACC100:ENERGY + VA-S30CB13-RACC200:ENERGY + VA-S30CB13-RACC300:ENERGY + VA-S30CB13-RACC400:ENERGY + VA-S30CB14-RTDS100:ENERGY + VA-S30CB14-RTDS200:ENERGY + VA-SINLH02-UIND230:ENERGY + VA-SARUN03-UIND030:ENERGY + VA-SARUN04-UIND030:ENERGY + VA-SARUN05-UIND030:ENERGY + VA-SARUN06-UIND030:ENERGY + VA-SARUN07-UIND030:ENERGY + VA-SARUN08-UIND030:ENERGY + VA-SARUN09-UIND030:ENERGY + VA-SARUN10-UIND030:ENERGY + VA-SARUN11-UIND030:ENERGY + VA-SARUN12-UIND030:ENERGY + VA-SARUN13-UIND030:ENERGY + VA-SARUN14-UIND030:ENERGY + VA-SARUN15-UIND030:ENERGY + VA-S10MA01-SSTP115:ENERGY + VA-SARMA02-SSTP105:ENERGY + VA-SATMA01-SSTP105:ENERGY + + + + VA-SINEG01-RSYS:GET-VSUM-AMPLT + VA-SINSB01-RSYS:GET-VSUM-AMPLT + VA-SINSB02-RSYS:GET-VSUM-AMPLT + VA-SINSB03-RSYS:GET-VSUM-AMPLT + VA-SINSB04-RSYS:GET-VSUM-AMPLT + VA-SINXB01-RSYS:GET-VSUM-AMPLT + VA-SINDI01-RSYS:GET-VSUM-AMPLT + VA-S10CB01-RSYS:GET-VSUM-AMPLT + VA-S10CB02-RSYS:GET-VSUM-AMPLT + VA-S10CB03-RSYS:GET-VSUM-AMPLT + VA-S10CB04-RSYS:GET-VSUM-AMPLT + VA-S10CB05-RSYS:GET-VSUM-AMPLT + VA-S10CB06-RSYS:GET-VSUM-AMPLT + VA-S10CB07-RSYS:GET-VSUM-AMPLT + VA-S10CB08-RSYS:GET-VSUM-AMPLT + VA-S10CB09-RSYS:GET-VSUM-AMPLT + VA-S20CB01-RSYS:GET-VSUM-AMPLT + VA-S20CB02-RSYS:GET-VSUM-AMPLT + VA-S20CB03-RSYS:GET-VSUM-AMPLT + VA-S20CB04-RSYS:GET-VSUM-AMPLT + VA-S30CB01-RSYS:GET-VSUM-AMPLT + VA-S30CB02-RSYS:GET-VSUM-AMPLT + VA-S30CB03-RSYS:GET-VSUM-AMPLT + VA-S30CB04-RSYS:GET-VSUM-AMPLT + VA-S30CB05-RSYS:GET-VSUM-AMPLT + VA-S30CB06-RSYS:GET-VSUM-AMPLT + VA-S30CB07-RSYS:GET-VSUM-AMPLT + VA-S30CB08-RSYS:GET-VSUM-AMPLT + VA-S30CB09-RSYS:GET-VSUM-AMPLT + VA-S30CB10-RSYS:GET-VSUM-AMPLT + VA-S30CB11-RSYS:GET-VSUM-AMPLT + VA-S30CB12-RSYS:GET-VSUM-AMPLT + VA-S30CB13-RSYS:GET-VSUM-AMPLT + VA-S30CB14-RSYS:GET-VSUM-AMPLT + + + + VA-SINLH02-UIND230-MOT:NACQ + VA-SARUN03-UIND030-MOT:NACQ + VA-SARUN04-UIND030-MOT:NACQ + VA-SARUN05-UIND030-MOT:NACQ + VA-SARUN06-UIND030-MOT:NACQ + VA-SARUN07-UIND030-MOT:NACQ + VA-SARUN08-UIND030-MOT:NACQ + VA-SARUN09-UIND030-MOT:NACQ + VA-SARUN10-UIND030-MOT:NACQ + VA-SARUN11-UIND030-MOT:NACQ + VA-SARUN12-UIND030-MOT:NACQ + VA-SARUN13-UIND030-MOT:NACQ + VA-SARUN14-UIND030-MOT:NACQ + VA-SARUN15-UIND030-MOT:NACQ + + + + S30CB03-RSYS:SET-ACC-VOLT + S30CB03-RSYS:SET-BEAM-PHASE + S30CB03-RSYS:SET-KLY-POWER + S30CB03-RSYS:SET-VSUM-PHASE + S30CB03-RSYS:SET-STATION-STATE + S30CB03-RSYS:SET-VSUM-AMPLT-SCALE + S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB03-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB03-RSYS:SET-VOLT-POWER-SCALE + S30CB03-RSYS:GET-ACC-VOLT + S30CB03-RSYS:GET-BEAM-PHASE + S30CB03-RSYS:GET-KLY-POWER + S30CB03-RSYS:GET-VSUM-PHASE + S30CB03-RSYS:GET-STATION-MODE + S30CB03-RSYS:GET-STATION-STATE + S30CB03-RSYS:GET-VSUM-AMPLT + S30CB03-RSYS:GET-RF-READY-STATUS + S30CB03-RSYS:GET-BEAM-CALIB-STATUS + S30CB03-RSYS:GET-VSUM-PHASE-OFFSET + + + + VA-SINEG01-DBPM340:Y2 + VA-SINSB01-DBPM150:Y2 + VA-SINSB02-DBPM150:Y2 + VA-SINLH01-DBPM060:Y2 + VA-SINLH02-DBPM210:Y2 + VA-SINLH02-DBPM240:Y2 + VA-SINLH03-DBPM010:Y2 + VA-SINLH03-DBPM050:Y2 + VA-SINLH03-DBPM090:Y2 + VA-SINSB03-DBPM120:Y2 + VA-SINSB03-DBPM220:Y2 + VA-SINSB04-DBPM120:Y2 + VA-SINSB04-DBPM220:Y2 + VA-SINSB05-DBPM120:Y2 + VA-SINSB05-DBPM220:Y2 + VA-SINXB01-DBPM120:Y2 + VA-SINBC01-DBPM010:Y2 + VA-SINBC01-DBPM030:Y2 + VA-SINBC01-DBPM080:Y2 + VA-SINBC01-DBPM100:Y2 + VA-SINBC02-DBPM140:Y2 + VA-SINBC02-DBPM320:Y2 + VA-SINDI01-DBPM010:Y2 + VA-SINDI01-DBPM060:Y2 + VA-SINDI02-DBPM010:Y2 + VA-SINDI02-DBPM040:Y2 + VA-SINDI02-DBPM080:Y2 + VA-S10CB01-DBPM220:Y2 + VA-S10CB01-DBPM420:Y2 + VA-S10CB02-DBPM220:Y2 + VA-S10CB02-DBPM420:Y2 + VA-S10DI01-DBPM110:Y2 + VA-S10CB03-DBPM220:Y2 + VA-S10CB03-DBPM420:Y2 + VA-S10CB04-DBPM220:Y2 + VA-S10CB04-DBPM420:Y2 + VA-S10CB05-DBPM220:Y2 + VA-S10CB05-DBPM420:Y2 + VA-S10CB06-DBPM220:Y2 + VA-S10CB06-DBPM420:Y2 + VA-S10CB07-DBPM220:Y2 + VA-S10CB07-DBPM420:Y2 + VA-S10CB08-DBPM220:Y2 + VA-S10CB08-DBPM420:Y2 + VA-S10CB09-DBPM220:Y2 + VA-S10BC01-DBPM010:Y2 + VA-S10BC01-DBPM050:Y2 + VA-S10BC01-DBPM090:Y2 + VA-S10BC02-DBPM140:Y2 + VA-S10BC02-DBPM320:Y2 + VA-S10MA01-DBPM010:Y2 + VA-S10MA01-DBPM060:Y2 + VA-S10MA01-DBPM120:Y2 + VA-S20CB01-DBPM420:Y2 + VA-S20CB02-DBPM420:Y2 + VA-S20CB03-DBPM420:Y2 + VA-S20SY01-DBPM010:Y2 + VA-S20SY01-DBPM040:Y2 + VA-S20SY01-DBPM060:Y2 + VA-S20SY02-DBPM080:Y2 + VA-S20SY02-DBPM120:Y2 + VA-S20SY02-DBPM150:Y2 + VA-S20SY03-DBPM010:Y2 + VA-S20SY03-DBPM040:Y2 + VA-S20SY03-DBPM080:Y2 + VA-S30CB01-DBPM420:Y2 + VA-S30CB02-DBPM420:Y2 + VA-S30CB03-DBPM420:Y2 + VA-S30CB04-DBPM420:Y2 + VA-S30CB05-DBPM420:Y2 + VA-S30CB06-DBPM420:Y2 + VA-S30CB07-DBPM420:Y2 + VA-S30CB08-DBPM420:Y2 + VA-S30CB09-DBPM420:Y2 + VA-S30CB10-DBPM420:Y2 + VA-S30CB11-DBPM420:Y2 + VA-S30CB12-DBPM420:Y2 + VA-S30CB13-DBPM420:Y2 + VA-S30CB14-DBPM420:Y2 + VA-S30CB15-DBPM420:Y2 + VA-SARCL01-DBPM010:Y2 + VA-SARCL01-DBPM060:Y2 + VA-SARCL01-DBPM120:Y2 + VA-SARCL01-DBPM150:Y2 + VA-SARCL02-DBPM110:Y2 + VA-SARCL02-DBPM220:Y2 + VA-SARCL02-DBPM260:Y2 + VA-SARCL02-DBPM330:Y2 + VA-SARCL02-DBPM470:Y2 + VA-SARMA01-DBPM040:Y2 + VA-SARMA01-DBPM100:Y2 + VA-SARMA02-DBPM010:Y2 + VA-SARMA02-DBPM020:Y2 + VA-SARMA02-DBPM040:Y2 + VA-SARMA02-DBPM110:Y2 + VA-SARUN01-DBPM070:Y2 + VA-SARUN02-DBPM070:Y2 + VA-SARUN03-DBPM070:Y2 + VA-SARUN04-DBPM070:Y2 + VA-SARUN05-DBPM070:Y2 + VA-SARUN06-DBPM070:Y2 + VA-SARUN07-DBPM070:Y2 + VA-SARUN08-DBPM070:Y2 + VA-SARUN09-DBPM070:Y2 + VA-SARUN10-DBPM070:Y2 + VA-SARUN11-DBPM070:Y2 + VA-SARUN12-DBPM070:Y2 + VA-SARUN13-DBPM070:Y2 + VA-SARUN14-DBPM070:Y2 + VA-SARUN15-DBPM070:Y2 + VA-SARUN16-DBPM070:Y2 + VA-SARUN17-DBPM070:Y2 + VA-SARUN18-DBPM070:Y2 + VA-SARUN19-DBPM070:Y2 + VA-SARUN20-DBPM070:Y2 + VA-SARBD01-DBPM040:Y2 + VA-SATSY01-DBPM010:Y2 + VA-SATSY01-DBPM060:Y2 + VA-SATSY01-DBPM100:Y2 + VA-SATSY01-DBPM240:Y2 + VA-SATSY01-DBPM290:Y2 + VA-SATSY02-DBPM020:Y2 + VA-SATSY02-DBPM210:Y2 + VA-SATSY03-DBPM030:Y2 + VA-SATSY03-DBPM060:Y2 + VA-SATSY03-DBPM090:Y2 + VA-SATSY03-DBPM120:Y2 + VA-SATCL01-DBPM140:Y2 + VA-SATDI01-DBPM030:Y2 + VA-SATDI01-DBPM060:Y2 + VA-SATDI01-DBPM110:Y2 + VA-SATDI01-DBPM240:Y2 + VA-SATDI01-DBPM270:Y2 + VA-SATDI01-DBPM310:Y2 + VA-SATMA01-DBPM010:Y2 + VA-SATMA01-DBPM020:Y2 + VA-SATMA01-DBPM040:Y2 + VA-S10BD01-DBPM020:Y2 + VA-SARBD02-DBPM010:Y2 + VA-SARBD02-DBPM040:Y2 + + + + VA-SINLH01-DSCR080:ROI-XMAX + VA-SINLH01-DSCR080:ROI-XMIN + VA-SINLH01-DSCR080:ROI-YMAX + VA-SINLH01-DSCR080:ROI-YMIN + VA-SINLH01-DSCR080:pipeline-x_stats_gr-g_stddiv_egu + VA-SINLH01-DSCR080:pipeline-y_stats_gr-g_stddiv_egu + VA-SINLH01-DSCR080:pipeline-slice_h_stats-g_stddiv_egu + VA-SINLH01-DSCR080:pipeline-slice_v_stats-g_stddiv_egu + + + + VA-SARMA02-MQUA120:Y + VA-SARUN01-MQUA080:Y + VA-SARUN02-MQUA080:Y + VA-SARUN03-MQUA080:Y + VA-SARUN04-MQUA080:Y + VA-SARUN05-MQUA080:Y + VA-SARUN06-MQUA080:Y + VA-SARUN07-MQUA080:Y + VA-SARUN08-MQUA080:Y + VA-SARUN09-MQUA080:Y + VA-SARUN10-MQUA080:Y + VA-SARUN11-MQUA080:Y + VA-SARUN12-MQUA080:Y + VA-SARUN13-MQUA080:Y + VA-SARUN14-MQUA080:Y + VA-SARUN15-MQUA080:Y + VA-SARUN16-MQUA080:Y + VA-SARUN17-MQUA080:Y + VA-SARUN18-MQUA080:Y + VA-SARUN19-MQUA080:Y + + + + VA-SINEG01-MSOL010:PS-MODE + VA-SINEG01-MSOL130:PS-MODE + VA-SINSB01-MSOL110:PS-MODE + VA-SINSB01-MSOL120:PS-MODE + VA-SINSB01-MSOL130:PS-MODE + VA-SINSB01-MSOL140:PS-MODE + VA-SINSB02-MSOL110:PS-MODE + VA-SINSB02-MSOL120:PS-MODE + VA-SINSB02-MSOL130:PS-MODE + VA-SINSB02-MSOL140:PS-MODE + + + + VA-SARUN03-MQUA020-MOT:IN-OUT + VA-SARUN03-MQUA050-MOT:IN-OUT + VA-SARUN04-MQUA020-MOT:IN-OUT + VA-SARUN04-MQUA050-MOT:IN-OUT + VA-SARUN05-MQUA020-MOT:IN-OUT + VA-SARUN05-MQUA050-MOT:IN-OUT + VA-SARUN06-MQUA020-MOT:IN-OUT + VA-SARUN06-MQUA050-MOT:IN-OUT + VA-SARUN07-MQUA020-MOT:IN-OUT + VA-SARUN07-MQUA050-MOT:IN-OUT + VA-SARUN08-MQUA020-MOT:IN-OUT + VA-SARUN08-MQUA050-MOT:IN-OUT + VA-SARUN09-MQUA020-MOT:IN-OUT + VA-SARUN09-MQUA050-MOT:IN-OUT + VA-SARUN10-MQUA020-MOT:IN-OUT + VA-SARUN10-MQUA050-MOT:IN-OUT + VA-SARUN11-MQUA020-MOT:IN-OUT + VA-SARUN11-MQUA050-MOT:IN-OUT + VA-SARUN12-MQUA020-MOT:IN-OUT + VA-SARUN12-MQUA050-MOT:IN-OUT + VA-SARUN13-MQUA020-MOT:IN-OUT + VA-SARUN13-MQUA050-MOT:IN-OUT + VA-SARUN14-MQUA020-MOT:IN-OUT + VA-SARUN14-MQUA050-MOT:IN-OUT + VA-SARUN15-MQUA020-MOT:IN-OUT + VA-SARUN15-MQUA050-MOT:IN-OUT + + + + VA-SINLH02-UIND230-MOT:GAP-SET + VA-SARUN03-UIND030-MOT:GAP-SET + VA-SARUN04-UIND030-MOT:GAP-SET + VA-SARUN05-UIND030-MOT:GAP-SET + VA-SARUN06-UIND030-MOT:GAP-SET + VA-SARUN07-UIND030-MOT:GAP-SET + VA-SARUN08-UIND030-MOT:GAP-SET + VA-SARUN09-UIND030-MOT:GAP-SET + VA-SARUN10-UIND030-MOT:GAP-SET + VA-SARUN11-UIND030-MOT:GAP-SET + VA-SARUN12-UIND030-MOT:GAP-SET + VA-SARUN13-UIND030-MOT:GAP-SET + VA-SARUN14-UIND030-MOT:GAP-SET + VA-SARUN15-UIND030-MOT:GAP-SET + + + + VA-SINEG01-RSYS:GET-STATION-STATE + VA-SINSB01-RSYS:GET-STATION-STATE + VA-SINSB02-RSYS:GET-STATION-STATE + VA-SINSB03-RSYS:GET-STATION-STATE + VA-SINSB04-RSYS:GET-STATION-STATE + VA-SINXB01-RSYS:GET-STATION-STATE + VA-SINDI01-RSYS:GET-STATION-STATE + VA-S10CB01-RSYS:GET-STATION-STATE + VA-S10CB02-RSYS:GET-STATION-STATE + VA-S10CB03-RSYS:GET-STATION-STATE + VA-S10CB04-RSYS:GET-STATION-STATE + VA-S10CB05-RSYS:GET-STATION-STATE + VA-S10CB06-RSYS:GET-STATION-STATE + VA-S10CB07-RSYS:GET-STATION-STATE + VA-S10CB08-RSYS:GET-STATION-STATE + VA-S10CB09-RSYS:GET-STATION-STATE + VA-S20CB01-RSYS:GET-STATION-STATE + VA-S20CB02-RSYS:GET-STATION-STATE + VA-S20CB03-RSYS:GET-STATION-STATE + VA-S20CB04-RSYS:GET-STATION-STATE + VA-S30CB01-RSYS:GET-STATION-STATE + VA-S30CB02-RSYS:GET-STATION-STATE + VA-S30CB03-RSYS:GET-STATION-STATE + VA-S30CB04-RSYS:GET-STATION-STATE + VA-S30CB05-RSYS:GET-STATION-STATE + VA-S30CB06-RSYS:GET-STATION-STATE + VA-S30CB07-RSYS:GET-STATION-STATE + VA-S30CB08-RSYS:GET-STATION-STATE + VA-S30CB09-RSYS:GET-STATION-STATE + VA-S30CB10-RSYS:GET-STATION-STATE + VA-S30CB11-RSYS:GET-STATION-STATE + VA-S30CB12-RSYS:GET-STATION-STATE + VA-S30CB13-RSYS:GET-STATION-STATE + VA-S30CB14-RSYS:GET-STATION-STATE + + + + S30CB13-RSYS:SET-ACC-VOLT + S30CB13-RSYS:SET-BEAM-PHASE + S30CB13-RSYS:SET-KLY-POWER + S30CB13-RSYS:SET-VSUM-PHASE + S30CB13-RSYS:SET-STATION-STATE + S30CB13-RSYS:SET-VSUM-AMPLT-SCALE + S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB13-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB13-RSYS:SET-VOLT-POWER-SCALE + S30CB13-RSYS:GET-ACC-VOLT + S30CB13-RSYS:GET-BEAM-PHASE + S30CB13-RSYS:GET-KLY-POWER + S30CB13-RSYS:GET-VSUM-PHASE + S30CB13-RSYS:GET-STATION-MODE + S30CB13-RSYS:GET-STATION-STATE + S30CB13-RSYS:GET-VSUM-AMPLT + S30CB13-RSYS:GET-RF-READY-STATUS + S30CB13-RSYS:GET-BEAM-CALIB-STATUS + S30CB13-RSYS:GET-VSUM-PHASE-OFFSET + + + + S30CB01-RSYS:SET-ACC-VOLT + S30CB01-RSYS:SET-BEAM-PHASE + S30CB01-RSYS:SET-KLY-POWER + S30CB01-RSYS:SET-VSUM-PHASE + S30CB01-RSYS:SET-STATION-STATE + S30CB01-RSYS:SET-VSUM-AMPLT-SCALE + S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-BASE + S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRLH + S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC1 + S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRBC2 + S30CB01-RSYS:SET-VSUM-PHASE-OFFSET-CORRENA + S30CB01-RSYS:SET-VOLT-POWER-SCALE + S30CB01-RSYS:GET-ACC-VOLT + S30CB01-RSYS:GET-BEAM-PHASE + S30CB01-RSYS:GET-KLY-POWER + S30CB01-RSYS:GET-VSUM-PHASE + S30CB01-RSYS:GET-STATION-MODE + S30CB01-RSYS:GET-STATION-STATE + S30CB01-RSYS:GET-VSUM-AMPLT + S30CB01-RSYS:GET-RF-READY-STATUS + S30CB01-RSYS:GET-BEAM-CALIB-STATUS + S30CB01-RSYS:GET-VSUM-PHASE-OFFSET + + diff --git a/examples/cafeTest/testVSUP.xml b/examples/cafeTest/testVSUP.xml new file mode 100644 index 0000000..88f58ae --- /dev/null +++ b/examples/cafeTest/testVSUP.xml @@ -0,0 +1,1557 @@ + + + Collection of Nodes at SwissFEL + + X + Y + X0 + Y0 + REF-X + REF-Y + REFOFF-X + REFOFF-Y + REFORB-X + REFORB-Y + SET-GAIN + I + FB-STAT + FB-ENABLE + STAT + ENABLE + + + VA-SINEG01-DBPM340 + + + VA-SINSB01-DBPM150 + + + VA-SINSB02-DBPM150 + + + VA-SINLH01-DBPM060 + + + VA-SINLH02-DBPM210 + + + VA-SINLH02-DBPM240 + + + VA-SINLH03-DBPM010 + + + VA-SINLH03-DBPM050 + + + VA-SINLH03-DBPM090 + + + VA-SINSB03-DBPM120 + + + VA-SINSB03-DBPM220 + + + VA-SINSB04-DBPM120 + + + VA-SINSB04-DBPM220 + + + VA-SINSB05-DBPM120 + + + VA-SINSB05-DBPM220 + + + VA-SINXB01-DBPM120 + + + VA-SINBC01-DBPM010 + + + VA-SINBC01-DBPM030 + + + VA-SINBC01-DBPM080 + + + VA-SINBC01-DBPM100 + + + VA-SINBC02-DBPM140 + + + VA-SINBC02-DBPM320 + + + VA-SINDI01-DBPM010 + + + VA-SINDI01-DBPM060 + + + VA-SINDI02-DBPM010 + + + VA-SINDI02-DBPM040 + + + VA-SINDI02-DBPM080 + + + VA-S10CB01-DBPM220 + + + VA-S10CB01-DBPM420 + + + VA-S10CB02-DBPM220 + + + VA-S10CB02-DBPM420 + + + VA-S10DI01-DBPM110 + + + VA-S10CB03-DBPM220 + + + VA-S10CB03-DBPM420 + + + VA-S10CB04-DBPM220 + + + VA-S10CB04-DBPM420 + + + VA-S10CB05-DBPM220 + + + VA-S10CB05-DBPM420 + + + VA-S10CB06-DBPM220 + + + VA-S10CB06-DBPM420 + + + VA-S10CB07-DBPM220 + + + VA-S10CB07-DBPM420 + + + VA-S10CB08-DBPM220 + + + VA-S10CB08-DBPM420 + + + VA-S10CB09-DBPM220 + + + VA-S10BC01-DBPM010 + + + VA-S10BC01-DBPM050 + + + VA-S10BC01-DBPM090 + + + VA-S10BC02-DBPM140 + + + VA-S10BC02-DBPM320 + + + VA-S10MA01-DBPM010 + + + VA-S10MA01-DBPM060 + + + VA-S10MA01-DBPM120 + + + VA-S20CB01-DBPM420 + + + VA-S20CB02-DBPM420 + + + VA-S20CB03-DBPM420 + + + VA-S20SY01-DBPM010 + + + VA-S20SY01-DBPM040 + + + VA-S20SY01-DBPM060 + + + VA-S20SY02-DBPM080 + + + VA-S20SY02-DBPM120 + + + VA-S20SY02-DBPM150 + + + VA-S20SY03-DBPM010 + + + VA-S20SY03-DBPM040 + + + VA-S20SY03-DBPM080 + + + VA-S30CB01-DBPM420 + + + VA-S30CB02-DBPM420 + + + VA-S30CB03-DBPM420 + + + VA-S30CB04-DBPM420 + + + VA-S30CB05-DBPM420 + + + VA-S30CB06-DBPM420 + + + VA-S30CB07-DBPM420 + + + VA-S30CB08-DBPM420 + + + VA-S30CB09-DBPM420 + + + VA-S30CB10-DBPM420 + + + VA-S30CB11-DBPM420 + + + VA-S30CB12-DBPM420 + + + VA-S30CB13-DBPM420 + + + VA-S30CB14-DBPM420 + + + VA-S30CB15-DBPM420 + + + VA-SARCL01-DBPM010 + + + VA-SARCL01-DBPM060 + + + VA-SARCL01-DBPM120 + + + VA-SARCL01-DBPM150 + + + VA-SARCL02-DBPM110 + + + VA-SARCL02-DBPM220 + + + VA-SARCL02-DBPM260 + + + VA-SARCL02-DBPM330 + + + VA-SARCL02-DBPM470 + + + VA-SARMA01-DBPM040 + + + VA-SARMA01-DBPM100 + + + VA-SARMA02-DBPM010 + + + VA-SARMA02-DBPM020 + + + VA-SARMA02-DBPM040 + + + VA-SARMA02-DBPM110 + + + VA-SARUN01-DBPM070 + + + VA-SARUN02-DBPM070 + + + VA-SARUN03-DBPM070 + + + VA-SARUN04-DBPM070 + + + VA-SARUN05-DBPM070 + + + VA-SARUN06-DBPM070 + + + VA-SARUN07-DBPM070 + + + VA-SARUN08-DBPM070 + + + VA-SARUN09-DBPM070 + + + VA-SARUN10-DBPM070 + + + VA-SARUN11-DBPM070 + + + VA-SARUN12-DBPM070 + + + VA-SARUN13-DBPM070 + + + VA-SARUN14-DBPM070 + + + VA-SARUN15-DBPM070 + + + VA-SARUN16-DBPM070 + + + VA-SARUN17-DBPM070 + + + VA-SARUN18-DBPM070 + + + VA-SARUN19-DBPM070 + + + VA-SARUN20-DBPM070 + + + VA-SATSY01-DBPM010 + + + VA-SATSY01-DBPM060 + + + VA-SATSY01-DBPM100 + + + VA-SATSY01-DBPM240 + + + VA-SATSY01-DBPM290 + + + VA-SATSY02-DBPM020 + + + VA-SATSY02-DBPM210 + + + VA-SATSY03-DBPM030 + + + VA-SATSY03-DBPM060 + + + VA-SATSY03-DBPM090 + + + VA-SATSY03-DBPM120 + + + VA-SATCL01-DBPM140 + + + VA-SATDI01-DBPM030 + + + VA-SATDI01-DBPM060 + + + VA-SATDI01-DBPM210 + + + VA-SATDI01-DBPM240 + + + VA-SATDI01-DBPM270 + + + VA-SATDI01-DBPM310 + + + VA-SATCB01-DBPM220 + + + VA-SATCB01-DBPM420 + + + VA-SATCB02-DBPM220 + + + VA-SATCB02-DBPM420 + + + VA-SATMA01-DBPM010 + + + VA-SATMA01-DBPM020 + + + VA-SATMA01-DBPM040 + + + VA-S10BD01-DBPM020 + + + VA-SARBD01-DBPM040 + + + VA-SARBD02-DBPM010 + + + VA-SARBD02-DBPM040 + + + + Collection of Nodes at SwissFEL + + + VA-SINEG01-VSUP-A010 + + + VA-SINEG01-VSUP-A020 + + + VA-SINSB01-VSUP-B010 + + + VA-SINSB02-VSUP-A010 + + + VA-SINLH01-VSUP-010 + + + VA-SINLH01-VSUP-020 + + + VA-SINSB03-VSUP-A010 + + + VA-SINSB03-VSUP-A020 + + + VA-SINSB03-VSUP-C030 + + + VA-SINSB03-VSUP-C040 + + + VA-SINSB04-VSUP-A010 + + + VA-SINSB04-VSUP-A020 + + + VA-SINSB04-VSUP-C030 + + + VA-SINSB04-VSUP-C040 + + + VA-SINSB05-VSUP-010 + + + VA-SINSB05-VSUP-A020 + + + VA-SINSB05-VSUP-A030 + + + VA-SINSB05-VSUP-A040 + + + VA-SINSB05-VSUP-A050 + + + VA-SINSB05-VSUP-A060 + + + VA-SINSB05-VSUP-A070 + + + VA-SINSB05-VSUP-A080 + + + VA-SINSB05-VSUP-A090 + + + VA-SINSB05-VSUP-A100 + + + VA-SINSB05-VSUP-A110 + + + VA-SINSB05-VSUP-A120 + + + VA-SINSB05-VSUP-A130 + + + VA-SINXB01-VSUP-A010 + + + VA-SINXB01-VSUP-A020 + + + VA-SINBC01-VSUP-A010 + + + VA-SINBC01-VSUP-A020 + + + VA-SINBC01-VSUP-A030 + + + VA-SINBC01-VSUP-A040 + + + VA-SINBC01-VSUP-A050 + + + VA-SINBC01-VSUP-A060 + + + VA-SINBC01-VSUP-A070 + + + VA-SINBC02-VSUP-A010 + + + VA-SINBC02-VSUP-A020 + + + VA-SINBC02-VSUP-A030 + + + VA-SINBC02-VSUP-A040 + + + VA-SINBC02-VSUP-A050 + + + VA-SINBC02-VSUP-A060 + + + VA-SINDI01-VSUP-A010 + + + VA-SINDI01-VSUP-A020 + + + VA-SINDI01-VSUP-A030 + + + VA-SINDI02-VSUP-010 + + + VA-SINDI02-VSUP-A020 + + + VA-SINDI02-VSUP-A030 + + + VA-SINDI02-VSUP-A040 + + + VA-SINDI02-VSUP-C050 + + + VA-S10DI01-VSUP-A010 + + + VA-S10DI01-VSUP-A020 + + + VA-S10DI01-VSUP-A030 + + + VA-S10DI01-VSUP-A040 + + + VA-S10BC01-VSUP-A010 + + + VA-S10BC01-VSUP-A020 + + + VA-S10BC01-VSUP-A030 + + + VA-S10BC01-VSUP-A040 + + + VA-S10BC01-VSUP-A050 + + + VA-S10BC01-VSUP-A060 + + + VA-S10BC01-VSUP-A070 + + + VA-S10BC01-VSUP-A080 + + + VA-S10BC01-VSUP-A090 + + + VA-S10BC01-VSUP-A100 + + + VA-S10BC02-VSUP-A010 + + + VA-S10BC02-VSUP-A020 + + + VA-S10BC02-VSUP-A030 + + + VA-S10BC02-VSUP-A040 + + + VA-S10BC02-VSUP-A050 + + + VA-S10BC02-VSUP-A060 + + + VA-S10BC02-VSUP-A070 + + + VA-S10MA01-VSUP-A010 + + + VA-S10MA01-VSUP-A020 + + + VA-S10MA01-VSUP-A030 + + + VA-S10MA01-VSUP-A040 + + + VA-S10MA01-VSUP-A050 + + + VA-S10MA01-VSUP-A060 + + + VA-S20SY01-VSUP-010 + + + VA-S20SY01-VSUP-A020 + + + VA-S20SY01-VSUP-A030 + + + VA-S20SY01-VSUP-A040 + + + VA-S20SY01-VSUP-A050 + + + VA-S20SY01-VSUP-A060 + + + VA-S20SY01-VSUP-A070 + + + VA-S20SY01-VSUP-A080 + + + VA-S20SY01-VSUP-A090 + + + VA-S20SY02-VSUP-A010 + + + VA-S20SY02-VSUP-A020 + + + VA-S20SY02-VSUP-A030 + + + VA-S20SY02-VSUP-A040 + + + VA-S20SY02-VSUP-A050 + + + VA-S20SY02-VSUP-A060 + + + VA-S20SY02-VSUP-A070 + + + VA-S20SY02-VSUP-A080 + + + VA-S20SY02-VSUP-A090 + + + VA-S20SY02-VSUP-A100 + + + VA-S20SY02-VSUP-A110 + + + VA-S20SY02-VSUP-B120 + + + VA-S20SY02-VSUP-B130 + + + VA-S20SY02-VSUP-B140 + + + VA-S20SY03-VSUP-010 + + + VA-S20SY03-VSUP-020 + + + VA-S20SY03-VSUP-A030 + + + VA-S20SY03-VSUP-A040 + + + VA-S20SY03-VSUP-A050 + + + VA-S20SY03-VSUP-A060 + + + VA-S20SY03-VSUP-A070 + + + VA-S20SY03-VSUP-A080 + + + VA-S20SY03-VSUP-A090 + + + VA-S20SY03-VSUP-A100 + + + VA-S20SY03-VSUP-A110 + + + VA-S20SY03-VSUP-A120 + + + VA-S20SY03-VSUP-A130 + + + VA-S30CB02-VSUP-A010 + + + VA-S30CB03-VSUP-A010 + + + VA-S30CB04-VSUP-A010 + + + VA-S30CB06-VSUP-A010 + + + VA-S30CB07-VSUP-A010 + + + VA-S30CB11-VSUP-A010 + + + VA-S30CB14-VSUP-A010 + + + VA-S30CB14-VSUP-A020 + + + VA-S30CB14-VSUP-A030 + + + VA-S30CB14-VSUP-A040 + + + VA-S30CB14-VSUP-A050 + + + VA-S30CB14-VSUP-A060 + + + VA-S30CB14-VSUP-A070 + + + VA-S30CB14-VSUP-A080 + + + VA-S30CB14-VSUP-A090 + + + VA-S30CB15-VSUP-A010 + + + VA-S30CB15-VSUP-A020 + + + VA-S30CB15-VSUP-A030 + + + VA-S30CB15-VSUP-A040 + + + VA-S30CB15-VSUP-A050 + + + VA-S30CB15-VSUP-A060 + + + VA-S30CB15-VSUP-A070 + + + VA-S30CB15-VSUP-A080 + + + VA-S30CB15-VSUP-A090 + + + VA-S30CB15-VSUP-A100 + + + VA-S30CB16-VSUP-A010 + + + VA-S30CB16-VSUP-A020 + + + VA-S30CB16-VSUP-A030 + + + VA-S30CB16-VSUP-A040 + + + VA-S30CB16-VSUP-A050 + + + VA-S30CB16-VSUP-A060 + + + VA-S30CB16-VSUP-A070 + + + VA-S30CB16-VSUP-A080 + + + VA-S30CB16-VSUP-A090 + + + VA-SARCL01-VSUP-010 + + + VA-SARCL01-VSUP-A020 + + + VA-SARCL01-VSUP-A030 + + + VA-SARCL01-VSUP-A040 + + + VA-SARCL01-VSUP-A050 + + + VA-SARCL01-VSUP-A060 + + + VA-SARCL01-VSUP-A070 + + + VA-SARCL01-VSUP-A080 + + + VA-SARCL01-VSUP-A090 + + + VA-SARCL01-VSUP-A100 + + + VA-SARCL01-VSUP-A110 + + + VA-SARCL01-VSUP-A120 + + + VA-SARCL01-VSUP-A130 + + + VA-SARCL01-VSUP-A140 + + + VA-SARCL01-VSUP-A150 + + + VA-SARCL01-VSUP-A160 + + + VA-SARCL02-VSUP-A010 + + + VA-SARCL02-VSUP-A020 + + + VA-SARCL02-VSUP-A030 + + + VA-SARCL02-VSUP-A040 + + + VA-SARCL02-VSUP-A050 + + + VA-SARCL02-VSUP-A060 + + + VA-SARCL02-VSUP-A070 + + + VA-SARCL02-VSUP-A080 + + + VA-SARCL02-VSUP-A090 + + + VA-SARCL02-VSUP-A100 + + + VA-SARCL02-VSUP-A110 + + + VA-SARCL02-VSUP-A120 + + + VA-SARCL02-VSUP-A130 + + + VA-SARCL02-VSUP-A140 + + + VA-SARCL02-VSUP-A150 + + + VA-SARCL02-VSUP-A160 + + + VA-SARCL02-VSUP-A170 + + + VA-SARCL02-VSUP-A180 + + + VA-SARCL02-VSUP-A190 + + + VA-SARCL02-VSUP-A200 + + + VA-SARCL02-VSUP-A210 + + + VA-SARCL02-VSUP-A220 + + + VA-SARCL02-VSUP-A230 + + + VA-SARCL02-VSUP-A240 + + + VA-SARCL02-VSUP-A250 + + + VA-SARCL02-VSUP-B260 + + + VA-SARMA01-VSUP-010 + + + VA-SARMA01-VSUP-020 + + + VA-SARMA01-VSUP-030 + + + VA-SARMA01-VSUP-040 + + + VA-SARMA01-VSUP-050 + + + VA-SARMA01-VSUP-060 + + + VA-SARMA01-VSUP-070 + + + VA-SARMA01-VSUP-080 + + + VA-SARMA01-VSUP-090 + + + VA-SARMA01-VSUP-100 + + + VA-SARMA01-VSUP-110 + + + VA-SARMA01-VSUP-120 + + + VA-SARMA01-VSUP-130 + + + VA-SARMA01-VSUP-140 + + + VA-SARMA01-VSUP-150 + + + VA-SARMA02-VSUP-010 + + + VA-SARMA02-VSUP-A020 + + + VA-SARMA02-VSUP-A030 + + + VA-SARMA02-VSUP-A040 + + + VA-SARMA02-VSUP-A050 + + + VA-SARMA02-VSUP-A060 + + + VA-SARMA02-VSUP-A070 + + + VA-SARMA02-VSUP-A080 + + + VA-SARMA02-VSUP-A090 + + + VA-SARUN01-VSUP-010 + + + VA-SARUN01-VSUP-A020 + + + VA-SARUN01-VSUP-A030 + + + VA-SARUN02-VSUP-A010 + + + VA-SARUN02-VSUP-A020 + + + VA-SARUN02-VSUP-A030 + + + VA-SARUN16-VSUP-010 + + + VA-SARUN16-VSUP-A020 + + + VA-SARUN17-VSUP-A010 + + + VA-SARUN17-VSUP-A020 + + + VA-SARUN18-VSUP-A010 + + + VA-SARUN18-VSUP-A020 + + + VA-SARUN19-VSUP-A010 + + + VA-SARUN19-VSUP-A020 + + + VA-SARUN20-VSUP-A010 + + + VA-SARUN20-VSUP-A020 + + + VA-SATSY01-VSUP-010 + + + VA-SATSY01-VSUP-A020 + + + VA-SATSY01-VSUP-A030 + + + VA-SATSY01-VSUP-A040 + + + VA-SATSY01-VSUP-A050 + + + VA-SATSY01-VSUP-A060 + + + VA-SATSY01-VSUP-A070 + + + VA-SATSY01-VSUP-A080 + + + VA-SATSY01-VSUP-A090 + + + VA-SATSY01-VSUP-A100 + + + VA-SATSY01-VSUP-A110 + + + VA-SATSY01-VSUP-A120 + + + VA-SATSY01-VSUP-A140 + + + VA-SATSY01-VSUP-A130 + + + VA-SATSY01-VSUP-A150 + + + VA-SATSY01-VSUP-A160 + + + VA-SATSY01-VSUP-A170 + + + VA-SATSY01-VSUP-A180 + + + VA-SATSY01-VSUP-A190 + + + VA-SATSY01-VSUP-A200 + + + VA-SATSY01-VSUP-A210 + + + VA-SATSY01-VSUP-A220 + + + VA-SATSY01-VSUP-A230 + + + VA-SATSY01-VSUP-A240 + + + VA-SATSY01-VSUP-A250 + + + VA-SATSY01-VSUP-A260 + + + VA-SATSY01-VSUP-A270 + + + VA-SATSY01-VSUP-A280 + + + VA-SATSY01-VSUP-A290 + + + VA-SATSY01-VSUP-A300 + + + VA-SATSY01-VSUP-A310 + + + VA-SATSY02-VSUP-A010 + + + VA-SATSY02-VSUP-A020 + + + VA-SATSY02-VSUP-A030 + + + VA-SATSY02-VSUP-A040 + + + VA-SATSY02-VSUP-A050 + + + VA-SATSY02-VSUP-A060 + + + VA-SATSY02-VSUP-A070 + + + VA-SATSY02-VSUP-A080 + + + VA-SATSY02-VSUP-A090 + + + VA-SATSY02-VSUP-A100 + + + VA-SATSY02-VSUP-A110 + + + VA-SATSY02-VSUP-A120 + + + VA-SATSY02-VSUP-A130 + + + VA-SATSY03-VSUP-A010 + + + VA-SATSY03-VSUP-A020 + + + VA-SATSY03-VSUP-A030 + + + VA-SATSY03-VSUP-A040 + + + VA-SATSY03-VSUP-A050 + + + VA-SATSY03-VSUP-A060 + + + VA-SATSY03-VSUP-A070 + + + VA-SATSY03-VSUP-A080 + + + VA-SATSY03-VSUP-A090 + + + VA-SATSY03-VSUP-A100 + + + VA-SATSY03-VSUP-A110 + + + VA-SATSY03-VSUP-A120 + + + VA-SATSY03-VSUP-A130 + + + VA-SATSY03-VSUP-A140 + + + VA-SATSY03-VSUP-A150 + + + VA-SATCL01-VSUP-A010 + + + VA-SATCL01-VSUP-A020 + + + VA-SATCL01-VSUP-A030 + + + VA-SATCL01-VSUP-B040 + + + VA-SATCL01-VSUP-B050 + + + VA-SATCL01-VSUP-C060 + + + VA-SATCL01-VSUP-C070 + + + VA-SATCL01-VSUP-C080 + + + VA-SATCL01-VSUP-C090 + + + VA-SATCL01-VSUP-C100 + + + VA-SATDI01-VSUP-A010 + + + VA-SATDI01-VSUP-A020 + + + VA-SATDI01-VSUP-A030 + + + VA-SATDI01-VSUP-A040 + + + VA-SATDI01-VSUP-B050 + + + VA-SATDI01-VSUP-B060 + + + VA-SATDI01-VSUP-B070 + + + VA-SATDI01-VSUP-B080 + + + VA-SATDI01-VSUP-B090 + + + VA-SATDI01-VSUP-B100 + + + VA-SATDI01-VSUP-B110 + + + VA-SATDI01-VSUP-B120 + + + VA-SATDI01-VSUP-B130 + + + VA-SATDI01-VSUP-B140 + + + VA-SATDI01-VSUP-B150 + + + VA-SATDI01-VSUP-B160 + + + VA-SATDI01-VSUP-B170 + + + VA-SATDI01-VSUP-B180 + + + VA-SATCB01-VSUP-A010 + + + VA-SATCB01-VSUP-A020 + + + VA-SATCB01-VSUP-A030 + + + VA-SATCB01-VSUP-A040 + + + VA-SATCB01-VSUP-A050 + + + VA-SATCB01-VSUP-A060 + + + VA-SATCB01-VSUP-A070 + + + VA-SATCB01-VSUP-A080 + + + VA-SATCB01-VSUP-A090 + + + VA-SATCB01-VSUP-A100 + + + VA-SATCB01-VSUP-A110 + + + VA-SATCB02-VSUP-A010 + + + VA-SATCB02-VSUP-A020 + + + VA-SATCB02-VSUP-A030 + + + VA-SATCB02-VSUP-A040 + + + VA-SATCB02-VSUP-A050 + + + VA-SATCB02-VSUP-A060 + + + VA-SATCB02-VSUP-A070 + + + VA-SATCB02-VSUP-A080 + + + VA-SATCB02-VSUP-A090 + + + VA-SATCB02-VSUP-A100 + + + VA-SATCB02-VSUP-A110 + + + VA-SATMA01-VSUP-010 + + + VA-SATMA01-VSUP-A020 + + + VA-SATMA01-VSUP-A030 + + + VA-SATMA01-VSUP-A040 + + + VA-SATMA01-VSUP-A050 + + + VA-SATMA01-VSUP-A060 + + + VA-SATMA01-VSUP-A070 + + + VA-SATMA01-VSUP-A080 + + + VA-SATMA01-VSUP-A090 + + + VA-S10BD01-VSUP-010 + + + VA-S10BD01-VSUP-020 + + + VA-S10BD01-VSUP-030 + + + VA-SARBD01-VSUP-A010 + + + VA-SARBD01-VSUP-A020 + + + VA-SARBD01-VSUP-A030 + + + VA-SARBD01-VSUP-A040 + + + VA-SARBD01-VSUP-A050 + + + VA-SARBD01-VSUP-B060 + + + VA-SARBD01-VSUP-B070 + + + VA-SARBD01-VSUP-B080 + + + VA-SARBD01-VSUP-B090 + + + VA-SARBD01-VSUP-B100 + + + VA-SARBD02-VSUP-010 + + + VA-SARBD02-VSUP-A020 + + + VA-SARBD02-VSUP-A030 + + + VA-SARBD02-VSUP-A040 + + + VA-SARBD02-VSUP-A050 + + + VA-SARBD02-VSUP-A060 + + + diff --git a/examples/cafeTest/zhelpers.h b/examples/cafeTest/zhelpers.h new file mode 100644 index 0000000..cffb8b8 --- /dev/null +++ b/examples/cafeTest/zhelpers.h @@ -0,0 +1,174 @@ +/* ===================================================================== + zhelpers.h + + Helper header file for example applications. + ===================================================================== +*/ + +#ifndef __ZHELPERS_H_INCLUDED__ +#define __ZHELPERS_H_INCLUDED__ + +// Include a bunch of headers that we will need in the examples + +#include + +#include +#include +#include +#include +#include + +#if (defined (WIN32)) +# include +#else +# include +#endif + +#include +#include + +// Version checking, and patch up missing constants to match 2.1 +#if ZMQ_VERSION_MAJOR == 2 +# error "Please upgrade to ZeroMQ/3.2 for these examples" +#endif + +// Provide random number from 0..(num-1) +#if (defined (WIN32)) +# define randof(num) (int) ((float) (num) * rand () / (RAND_MAX + 1.0)) +#else +# define randof(num) (int) ((float) (num) * random () / (RAND_MAX + 1.0)) +#endif + + +// Receive 0MQ string from socket and convert into C string +// Caller must free returned string. Returns NULL if the context +// is being terminated. +static char * +s_recv (void *socket) { + char buffer [256]; + int size = zmq_recv (socket, buffer, 255, 0); //ZMQ_DONTWAIT); + if (size == -1) + return NULL; + if (size > 255) + size = 255; + buffer [size] = 0; + return strdup (buffer); +} + +// Convert C string to 0MQ string and send to socket +static int +s_send (void *socket, char *string) { + int size = zmq_send (socket, string, strlen (string), 0); + return size; +} + +// Sends string as 0MQ string, as multipart non-terminal +static int +s_sendmore (void *socket, char *string) { + int size = zmq_send (socket, string, strlen (string), ZMQ_SNDMORE); + return size; +} + +// Receives all message parts from socket, prints neatly +// +static void +s_dump (void *socket) +{ + puts ("----------------------------------------"); + while (1) { + // Process all parts of the message + zmq_msg_t message; + zmq_msg_init (&message); + int size = zmq_msg_recv (&message, socket, 0); + + // Dump the message as text or binary + char *data = (char*)zmq_msg_data (&message); + int is_text = 1; + int char_nbr; + for (char_nbr = 0; char_nbr < size; char_nbr++) + if ((unsigned char) data [char_nbr] < 32 + || (unsigned char) data [char_nbr] > 127) + is_text = 0; + + printf ("[%03d] ", size); + for (char_nbr = 0; char_nbr < size; char_nbr++) { + if (is_text) + printf ("%c", data [char_nbr]); + else + printf ("%02X", (unsigned char) data [char_nbr]); + } + printf ("\n"); + + int64_t more; // Multipart detection + more = 0; + size_t more_size = sizeof (more); + zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); + zmq_msg_close (&message); + if (!more) + break; // Last message part + } +} + +// Set simple random printable identity on socket +// +static void +s_set_id (void *socket) +{ + char identity [10]; + sprintf (identity, "%04X-%04X", randof (0x10000), randof (0x10000)); + zmq_setsockopt (socket, ZMQ_IDENTITY, identity, strlen (identity)); +} + +/* +// Sleep for a number of milliseconds +static void +s_sleep (int msecs) +{ +#if (defined (WIN32)) + Sleep (msecs); +#else + struct timespec t; + t.tv_sec = msecs / 1000; + t.tv_nsec = (msecs % 1000) * 1000000; + nanosleep (&t, NULL); +#endif +} +*/ + +// Return current system clock as milliseconds +static int64_t +s_clock (void) +{ +#if (defined (WIN32)) + SYSTEMTIME st; + GetSystemTime (&st); + return (int64_t) st.wSecond * 1000 + st.wMilliseconds; +#else + struct timeval tv; + gettimeofday (&tv, NULL); + return (int64_t) (tv.tv_sec * 1000 + tv.tv_usec / 1000); +#endif +} + +// Print formatted string to stdout, prefixed by date/time and +// terminated with a newline. + +/* +static void +s_console (const char *format, ...) +{ + time_t curtime = time (NULL); + struct tm *loctime = localtime (&curtime); + char *formatted = (char*)malloc (20); + strftime (formatted, 20, "%y-%m-%d %H:%M:%S ", loctime); + printf ("%s", formatted); + free (formatted); + + va_list argptr; + va_start (argptr, format); + vprintf (format, argptr); + va_end (argptr); + printf ("\n"); +} +*/ +#endif // __ZHELPERS_H_INCLUDED__ diff --git a/include/PVCtrlHolder.h b/include/PVCtrlHolder.h new file mode 100644 index 0000000..74e6fd0 --- /dev/null +++ b/include/PVCtrlHolder.h @@ -0,0 +1,299 @@ +/// +/// \file PVCtrlHolder.h +/// \author Jan Chrin, PSI +/// \date November 2014 +/// \version CAFE 1.0.0 +/// + +#ifndef PVCTRLHOLDER_H +#define PVCTRLHOLDER_H + +#include + + +/** +* \class PVCtrlHolder +* \brief This class is the holder of values associated with the +* EPICS DBR_CTRL_(dataType) control structure of a given handle/pv +*/ +class PVCtrlHolder : public PVHolder { + + friend class CAFE; + friend class Connect; + friend class Conduit; + friend struct change_dataBufferPVCtrlHolder; + friend struct change_dataBufferSize_CTRL; + friend struct change_connectionHandlerArgs; + friend struct change_pvAlias; + +private: + + short precision; + char units[MAX_UNITS_SIZE]; + + CAFE_DATATYPE_UNION RISC_pad; + CAFE_DATATYPE_UNION upperDispLimit; + CAFE_DATATYPE_UNION lowerDispLimit; + CAFE_DATATYPE_UNION upperAlarmLimit; + CAFE_DATATYPE_UNION upperWarningLimit; + CAFE_DATATYPE_UNION lowerWarningLimit; + CAFE_DATATYPE_UNION lowerAlarmLimit; + CAFE_DATATYPE_UNION upperCtrlLimit; + CAFE_DATATYPE_UNION lowerCtrlLimit; + + Helper helper; + + public: + + PVCtrlHolder(){ + alarmStatus=0; alarmSeverity=0; precision=0; status=ECA_NORMAL; + nelem=1; size=1; rule=true; beamEventNo=0; + hasAlarm=true; + noStr=0; dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS; + dataTypeNative=(CAFE_DATATYPE) CAFE_NO_ACCESS; + strcpy(pv,""); strcpy(pvAlias,"");strcpy(device,""); strcpy(attrib,""); strcpy(units,""); + + val.reset( new CAFE_DATATYPE_UNION[nelem] ); + val[0].d=0.00; + }; + + PVCtrlHolder(unsigned int _sizeOfArray) { + alarmStatus=0; alarmSeverity=0; precision=0; status=ECA_NORMAL; + nelem=_sizeOfArray; size=_sizeOfArray; rule=true; beamEventNo=0; + hasAlarm=true; + noStr=0; dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS; + dataTypeNative=(CAFE_DATATYPE) CAFE_NO_ACCESS; + strcpy(pv,""); strcpy(pvAlias,"");strcpy(device,""); strcpy(attrib,""); strcpy(units,""); + + val.reset( new CAFE_DATATYPE_UNION[nelem] ); + + for (unsigned int i=0; i0 ? nelem=_nelem : nelem=1; + + if (_nelem>size) { + + size=_nelem; + + val.reset( new CAFE_DATATYPE_UNION[size] ); + } + + return nelem; + }; + + short getPrecision() const {return precision;} + + const char * getUnits() const {return units;} + string getUnitsAsString() const {return (string) units;} + short getNoEnumStrings () const {return noStr;}; + char * getEnumString(short indx) const {return (char *) strs[indx];}; + + + vector getEnumStrings() const { + + vector vEnumStrings; + + vEnumStrings.reserve(noStr>0?noStr:1); + for ( short i=0; i + +/** +* \class PVDataHolder +* \brief This class is the holder of data values associated with +* the EPICS DBR_TIME_(dataType) structure of a given handle/pv +*/ +class PVDataHolder : public PVHolder { + + friend class CAFE; + friend class PVGroup; + friend class Connect; + friend class Conduit; + //if HAVE_LIBQTXML + friend class loadCollectionXMLParser; + friend class restorePVGroupXMLParser; + //endif + friend struct change_dataBufferPVDataHolder; + friend struct change_dataBufferSize_TIME; + friend struct change_connectionHandlerArgs; + friend struct change_pvAlias; + +//private: + //epicsTimeStamp ts; + //bool hasTS; + + + +public: + + epicsTimeStamp ts; + bool hasTS; + + + //Derived class does not inherit constructors + PVDataHolder(unsigned int _sizeOfArray) { + + alarmStatus=0; alarmSeverity=0; status=ECAFE_NODATA; + nelem= _sizeOfArray > 0 ? _sizeOfArray : 1; + size = _sizeOfArray > 0 ? _sizeOfArray : 1; + + dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS; + dataTypeNative=(CAFE_DATATYPE) CAFE_NO_ACCESS; + rule=true; beamEventNo=0; userNo=0; ts.nsec=0; ts.secPastEpoch=0; + hasAlarm=true; hasTS=true; + strcpy(pv,""); strcpy(pvAlias,""); strcpy(device,""); strcpy(attrib,""); + + val.reset( new CAFE_DATATYPE_UNION[nelem] ); + + for (unsigned int i=0; i0 ? nelem=_nelem : nelem=1; + + if (nelem>size) { + size=nelem; + val.reset( new CAFE_DATATYPE_UNION[size] ); + } + + return nelem; + }; + + epicsTimeStamp getEpicsTimeStamp() const {return ts;}; + + struct etsNorm{ unsigned int secPastEpoch; unsigned int nsec;} _etsNorm; + struct etsDate{ unsigned short year; unsigned short mon; unsigned short day; + unsigned short hour; unsigned short min; unsigned short sec; unsigned int nsec;} _etsDate ; + + etsNorm getEpicsTimeStampAsUInt32() { + _etsNorm.secPastEpoch=ts.secPastEpoch; + _etsNorm.nsec=(unsigned long) ts.nsec; + return _etsNorm;}; + + etsDate getEpicsTimeStampAsDate() { + + ts.nsec=(unsigned int) ts.nsec; + + //This may happen in timeouts; epicsTime convertor will report overflow error + //However this possibility is now captured in conduitFriend.h and other + if(ts.nsec >= 1000000000) { + cout << "OVERFLOW IN gets.nsec CORRECTED for epicsTime converter " << endl; ts.nsec=0; + } + + epicsTime time(ts); + + local_tm_nano_sec local = (local_tm_nano_sec) time; + _etsDate.year = local.ansi_tm.tm_year + 1900; + _etsDate.mon = local.ansi_tm.tm_mon + 1; + _etsDate.day = local.ansi_tm.tm_mday; + _etsDate.hour = local.ansi_tm.tm_hour; + _etsDate.min = local.ansi_tm.tm_min; + _etsDate.sec = local.ansi_tm.tm_sec; + _etsDate.nsec = (unsigned long) ts.nsec; + return _etsDate; + } + + void print() { + print(nelem) ; + } + + void print(unsigned int nelemToPrint) { + nelemToPrint=min(nelemToPrint,nelem); + if (pv==NULL) { + std::cout << "Process Variable NOT ASSIGNED!" << std::endl; + std::cout << "Variable has not been applied to a get operation!" << std::endl; + return; + } + std::cout << "------------------------------------------" << std::endl; + //std::cout << "PVDataHolder:" << std::endl; + + + std::cout << "processVariable= " << pv << std::endl; + if (strcmp(pvAlias,pv) && strcmp(pvAlias,"")) { + std::cout << "pvAlias = " << pvAlias << std::endl; + } + std::cout << "device = " << device << std::endl; + std::cout << "attrib = " << attrib << std::endl; + std::cout << "dataType = " << cafeDataTypeCode.message(dataType).c_str() + << " (" << dataType << ") " << std::endl; + std::cout << "dbrTypeRequest = " << dbr_type_to_text(dbrDataType)<< std::endl; + + //std::cout << "dataType = " << CAFEDataTypeCode.message(dataType).c_str() << std::endl; + + if (dataType != CAFE_NO_ACCESS && dataType != CAFE_TYPENOTCONN) { + std::cout << "nelem = "; + } + else { + std::cout << "nelem = "; + } + std::cout << nelem; std::cout << std::endl; + if(!rule) { + std::cout << "rule (0=false) = " << rule < + + +/** + * class MemberMap + * maps string to index + */ +class MemberMap { + typedef std::map mapLongString; +private: + mapLongString mapNameIndex; + mapLongString::iterator pos; + Helper helper; + +public: + MemberMap(){}; + ~MemberMap(){}; + +void insert(int a, std::string _Name) { + mapNameIndex.insert(std::make_pair(a, _Name)); +}; + +std::string getPV (int i) { + + pos = mapNameIndex.find(i); + if (pos != mapNameIndex.end()) return pos->second; + cout << "Index " << i << " not found! Size of group vector is " << mapNameIndex.size() << endl; + return ""; +}; + +int getIndex (std::string _Name) { + char pvStripped[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(_Name.c_str(), pvStripped); + string Name=pvStripped; + + for (pos=mapNameIndex.begin(); pos != mapNameIndex.end(); ++pos) { + + if (pos->second==Name) {return pos->first;} + // String searches such as s.find(s1) return string::npos on failure + //else if ( (pos->second).find(Name) != std::string::npos) return pos->first; + } + cout << "PV: " << Name << " IS NOT A MEMBER OF THIS LIST " << endl; + return -1; +}; +}; + + +/** +* class PVGroup +* This class is the holder of PVDataHolder objects associated with +* of group of handles +*/ +class PVGroup { + friend class Connect; + friend class CAFE; + //if HAVE_LIBQTXML + friend class restorePVGroupXMLParser; + //endif +private: + PVDataHolder * pvdata; + unsigned int npv; + char name [PVGROUP_PSEUDO_SIZE]; + int statusGroup; + unsigned int groupHandle; + bool isIndexOutOfRange (unsigned int idx) { + return (idx >= npv) ? true:false; + }; + MemberMap memberMap; + +public: + //Initialize 1st two to avoid compiler warning messages + PVGroup(){npv=0; pvdata=NULL; statusGroup=ICAFE_NORMAL; groupHandle=0; strcpy(name,"");}; + ~PVGroup(){}; + MemberMap getMemberMap() const {return memberMap;}; + PVDataHolder * getPVData() const {return pvdata;}; + PVDataHolder getPVData(unsigned int idx) throw(std::out_of_range){ + if(isIndexOutOfRange(idx)) { + std::ostringstream oss; + oss << "Exception! Index " << idx << + " to PVGroup.pvdata() is out of range. Valid range is from 0 to " << npv-1; + throw std::out_of_range(oss.str()); + } + return pvdata[idx]; + }; + void setHasAlarm(bool h){ for (unsigned int i=0; i +#include +#include +#include +#include +#include +#include +#include +#include +//include boost 1.57 +//include +#include + + +/** +* \class PVHolder +* \brief The base class from which the PVDataHolder and PVCtrlHolder +* classes are derived +*/ +class PVHolder { + +protected: + char pv [PVNAME_SIZE]; + char pvAlias[PVNAME_SIZE]; + char device [PVNAME_SIZE]; + char attrib [PVNAME_SIZE]; + + CAFE_DATATYPE dataTypeNative; //enum + CAFE_DATATYPE dataType; //enum + CAFEDataTypeCode cafeDataTypeCode; //class enum<->string mapping + CAFEStatusCode cafeStatusCode; + + chtype dbrDataType; //dbrTypeRequest_DataBuffer; + + unsigned int size; + unsigned int nelem; + //unsigned int nelemNative; + short alarmStatus; //alarm.h 0-22 0=NO_ALARM + short alarmSeverity; //alarm.h 0=NO_ALARM 1=MINOR 2=MAJOR 3=INVALID + + unsigned int userNo; //e.g. add handle + + unsigned int beamEventNo; + //rule is used for synchronous groups only + bool rule; // to set/get or not to set/get channel; default: true (i.e. set) + bool hasAlarm; + int status; + + short noStr; // for enum + char strs [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]; + + CAFEConvert renderDouble; + CAFEConvert renderFloat; + CAFEConvert renderShort; + CAFEConvert renderLong; + CAFEConvert renderEnum; + CAFEConvert renderUChar; + CAFEConvert renderString; + + CAFEConvert renderChar; + CAFEConvert renderULong; + CAFEConvert renderLongLong; + CAFEConvert renderULongLong; + + CAFEConvert renderInt; + CAFEConvert renderUInt; + + + void verifyIndex(unsigned int idx) { + if(idx >= size) { + std::ostringstream oss; + oss << "Exception! Index " << idx + << " to PVHolder method is out of range. Valid range is from 0 to " << size-1; + throw std::out_of_range(oss.str()); + } + }; + + bool isIndexOutOfRange (unsigned int idx) { + return (idx >= size) ? true:false; + }; + + +public: + + typedef boost::shared_ptr ValPtr; + + ValPtr val; + + boost::shared_ptr > ValVD_ptr; + boost::shared_ptr > ValVF_ptr; + //boost::shared_ptr > ValVS_ptr; + boost::shared_ptr > ValVI_ptr; + //boost::shared_ptr > ValVC_ptr; + //boost::shared_ptr > ValVUS_ptr; + boost::shared_ptr > ValVStr_ptr; + + typedef boost::shared_ptr ValDPtr; + typedef boost::shared_ptr ValFPtr; + typedef boost::shared_ptr ValSPtr; + typedef boost::shared_ptr ValIPtr; + typedef boost::shared_ptr ValChPtr; + typedef boost::shared_ptr ValUSPtr; + typedef boost::shared_ptr ValStrPtr; + + ValDPtr ValD_ptr; + ValFPtr ValF_ptr; + ValSPtr ValS_ptr; + ValIPtr ValI_ptr; + ValChPtr ValCh_ptr; + ValUSPtr ValUS_ptr; + ValStrPtr ValStr_ptr; + + void setUserNo(unsigned int un) { + userNo=un; + return; + } + + unsigned int getUserNo() { + return userNo; + } + + + void setRule(bool r) { + rule=r; + return; + }; + + + + const char * getPV() const {return pv;}; + const char * getPVName() const {return pv;}; + const char * getPVAlias() const {return pvAlias;}; + const char * getDevice() const {return device;}; + const char * getAttribute() const {return attrib;}; + unsigned int getNelem() const {return nelem;}; + //unsigned int getNelemNative() const {return nelemNative;}; + const unsigned int getSize() const {return size;}; + CAFE_DATATYPE_UNION_SEQ getVal() const {return val.get();}; + + + short getAlarmStatus() const {return alarmStatus;}; + short getAlarmSeverity() const {return alarmSeverity;}; + + unsigned int getBeamEventNo() const {return beamEventNo;}; + bool getRule() const {return rule;}; + bool getHasAlarm() const{return hasAlarm;}; + int getStatus() const {return status;}; + CAFE_DATATYPE getDataTypeClient() const {return dataType;}; + CAFE_DATATYPE getDataType() const {return dataType;}; + + CAFEStatusCode getStatusCode() const {return cafeStatusCode;}; + + short getNoEnumStrings () const {return noStr;}; + char * getEnumString(short indx) const {return (char *) strs[indx]; } + + void setDataType(CAFE_DATATYPE cdt){ + if (cdt > CAFE_DOUBLE || cdt < CAFE_STRING) { + cout << "WARNING: INPUT VALUE NOT A VALID CAFE DATATYPE " << endl; + return; + } else {dataType=cdt; return;}}; + + void set(double d) {val[0].d=d; dataType=CAFE_DOUBLE;}; + void set(float f) {val[0].f=f; dataType=CAFE_FLOAT;}; + void set(short s) {val[0].s=s; dataType=CAFE_SHORT;}; + void set(long long l) { + if (l > std::numeric_limits::max()) { + cout << "WARNING: INPUT VALUE GREATER THAN MAX LIMIT OF dbr_long_t " << endl; + cout << "TYPE CASTING TO DOUBLE! " << endl; + val[0].d= (double) l; dataType=CAFE_DOUBLE;} + else { + val[0].l= (int) l; dataType=CAFE_LONG;}; + } + void set(int l) {val[0].l=l; dataType=CAFE_LONG;}; + void set(unsigned long long l) { + if (l > (unsigned long long) std::numeric_limits::max()) { + cout << "WARNING: INPUT VALUE GREATER THAN MAX LIMIT OF dbr_long_t " << endl; + cout << "TYPE CASTING TO DOUBLE! " << endl; + val[0].d= (double) l; dataType=CAFE_DOUBLE;} + else { + val[0].l= (int) l; dataType=CAFE_LONG;}; + } + + //For Cython + void setString(std::string str) {strcpy(val[0].str,str.c_str()); dataType=CAFE_STRING;}; + void setDouble(double d) {val[0].d=d; dataType=CAFE_DOUBLE;}; + void setInt(int l) {val[0].l=l; dataType=CAFE_LONG;}; + void setVString(vector Vstr) { + if(Vstr.size()!=nelem) {nelem=Vstr.size();} + for (unsigned int i=0; i Vd) { + if(Vd.size()!=nelem) {nelem=Vd.size();} + for (unsigned int i=0; i Vl) { + if(Vl.size()!=nelem) {nelem=Vl.size();} + for (unsigned int i=0; i > getAsVDouble(){ + #define __METHOD__ "PVHolder::getVDouble " + + ValVD_ptr.reset(new vector()); + + switch (dataType) + { + case CAFE_DOUBLE: + for (unsigned i=0; ipush_back(val[i].d);} + break; + case CAFE_FLOAT: + for (unsigned i=0; ipush_back(val[i].f);} + break; + case CAFE_LONG: + for (unsigned i=0; ipush_back(val[i].l);} + break; + case CAFE_SHORT: + for (unsigned i=0; ipush_back(val[i].s);} + break; + case CAFE_ENUM: + for (unsigned i=0; ipush_back(val[i].us);} + break; + case CAFE_CHAR: + for (unsigned i=0; ipush_back(val[i].ch);} + break; + case CAFE_STRING: + default: + for (unsigned i=0; ipush_back( getAsDouble(i));} + break; + } + + return ValVD_ptr; + #undef __METHOD__ + } + + boost::shared_ptr > getAsVFloat(){ + #define __METHOD__ "PVHolder::getVFloat " + + ValVF_ptr.reset(new vector()); + + switch (dataType) + { + case CAFE_DOUBLE: + for (unsigned i=0; ipush_back((float) val[i].d);} + break; + case CAFE_FLOAT: + for (unsigned i=0; ipush_back(val[i].f);} + break; + case CAFE_LONG: + for (unsigned i=0; ipush_back(val[i].l);} + break; + case CAFE_SHORT: + for (unsigned i=0; ipush_back(val[i].s);} + break; + case CAFE_ENUM: + for (unsigned i=0; ipush_back(val[i].us);} + break; + case CAFE_CHAR: + for (unsigned i=0; ipush_back(val[i].ch);} + break; + case CAFE_STRING: + default: + for (unsigned i=0; ipush_back( getAsFloat(i));} + break; + } + + //How to index shared pointer for > + //vector * vf= ValVF_ptr.get(); + //cout << "size/// " << vf[0].size() << endl; + //cout << vf[0][0] << " val " << val[0].f << endl; + //cout << vf[0][1] << " val " << val[1].f << endl; + + return ValVF_ptr; + #undef __METHOD__ + } + + + boost::shared_ptr > getAsVInt(){ + #define __METHOD__ "PVHolder::getVInt " + + ValVI_ptr.reset(new vector()); + + switch (dataType) + { + case CAFE_DOUBLE: + for (unsigned i=0; ipush_back((int) val[i].d);} + break; + case CAFE_FLOAT: + for (unsigned i=0; ipush_back((int) val[i].f);} + break; + case CAFE_LONG: + for (unsigned i=0; ipush_back(val[i].l);} + break; + case CAFE_SHORT: + for (unsigned i=0; ipush_back(val[i].s);} + break; + case CAFE_ENUM: + for (unsigned i=0; ipush_back(val[i].us);} + break; + case CAFE_CHAR: + for (unsigned i=0; ipush_back(val[i].ch);} + break; + case CAFE_STRING: + default: + for (unsigned i=0; ipush_back( getAsInt(i));} + break; + } + + return ValVI_ptr; + #undef __METHOD__ + } + + boost::shared_ptr > getAsVString(){ + #define __METHOD__ "PVHolder::getVString " + + ValVStr_ptr.reset(new vector()); + for (unsigned i=0; ipush_back( getAsString(i));} + + return ValVStr_ptr; + #undef __METHOD__ + } + + ValDPtr getDouble(){ + #define __METHOD__ "PVHolder::getDouble " + if (dataType!=CAFE_DOUBLE) { + cout << "******* WARNING *******" << endl; + cout << __METHOD__ << __LINE__ << endl; + cout << "DataType is " << (cafeDataTypeCode.message((CAFE_DATATYPE)dataType)).c_str() << + " hence getDouble method is invalid! " << endl; + cout << "Use getAsDouble method if you wish to retrieve the data as a double! " << endl; + cout << "**********************" << endl; + } + + ValD_ptr.reset(new double[nelem]); + + for (unsigned i=0; i= 0x02070000 + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); +#else + {const char *desc, *s1, *s2; + desc = (const char *)PyCObject_GetDesc(cobj); + if (!desc) + goto bad; + s1 = desc; s2 = sig; + while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } + if (*s1 != *s2) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, desc); + goto bad; + } + tmp.p = PyCObject_AsVoidPtr(cobj);} +#endif + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(d); + return -1; +} +#endif + + +static int import_PyCafe(void) { + PyObject *module = 0; + module = __Pyx_ImportModule("PyCafe"); + if (!module) goto bad; + if (__Pyx_ImportFunction(module, "py_cb_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_wrapper, "void (PVDataHolder, unsigned int, std::string)") < 0) goto bad; + if (__Pyx_ImportFunction(module, "py_cb_ctrl_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_ctrl_wrapper, "void (PVCtrlHolder, unsigned int, std::string)") < 0) goto bad; + if (__Pyx_ImportFunction(module, "py_cb_handle_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_wrapper, "void (unsigned int)") < 0) goto bad; + if (__Pyx_ImportFunction(module, "py_cb_handle_monid_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper, "void (unsigned int, unsigned long)") < 0) goto bad; + if (__Pyx_ImportFunction(module, "py_cb_handle_get_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_get_wrapper, "void (unsigned int)") < 0) goto bad; + if (__Pyx_ImportFunction(module, "py_cb_handle_put_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_put_wrapper, "void (unsigned int)") < 0) goto bad; + Py_DECREF(module); module = 0; + return 0; + bad: + Py_XDECREF(module); + return -1; +} + +#endif /* !__PYX_HAVE_API__PyCafe */ diff --git a/include/PyCafe_api.h b/include/PyCafe_api.h new file mode 120000 index 0000000..02f9085 --- /dev/null +++ b/include/PyCafe_api.h @@ -0,0 +1 @@ +PyCafe3_api.h \ No newline at end of file diff --git a/include/cafe.h b/include/cafe.h new file mode 100644 index 0000000..89f0e2d --- /dev/null +++ b/include/cafe.h @@ -0,0 +1,1033 @@ +/// +/// \file cafe.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 + + + +#ifndef CAFE_H +#define CAFE_H + +#include +#include +#include +#include +#include +#if HAVE_PYTHON_H +#include +#endif + +#if HAVE_ZEROMQ +#include +#endif + +/** +* \class CAFE +* \brief Methods for synchronous and asynchronous interactions +*/ +class CAFE : public Connect +{ +private: + Instant cafeSoluble; + Instant cafeFrappuccino; + Instant cafeSchale; + Instant cafeEspresso; + Instant cafeCappuccino; + Instant cafeLatte; + Instant cafeDoppio; + + Transpose renderString; // 0 + Transpose renderShort; // 1 + Transpose renderFloat; // 2 + Transpose renderEnum; // 3 + Transpose renderChar; // 4 + Transpose renderLong; // 5 + Transpose renderDouble; // 6 + + Granules cafeGranules; + + ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy; + + ChannelRequestStatus channelRequestStatusGet; + ChannelRequestStatus channelRequestStatusGetCtrl; + + ChannelRequestMetaDataClient channelRequestMetaDataClient; //used for PVDataHolder + ChannelRequestMetaDataClient channelRequestMetaCtrlClient; //used for PVCtrlHolder + + CAFENUM::DBR_TYPE vectorDbrType; + + //Groups + ChannelTimeoutPolicy channelTimeoutPolicySGGet; + ChannelTimeoutPolicy channelTimeoutPolicySGPut; + + +public: + + CAFE(){vectorDbrType=CAFENUM::DBR_NONE; + //Put in default values + + //make no wait + channelRequestPolicyMasterPut.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::NO_WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITHOUT_CALLBACK) + /* + channelRequestPolicyMasterGet.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITHOUT_CALLBACK); + + channelRequestPolicyMasterGetCtrl.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITH_CALLBACK_DEFAULT); + */ + + }; //cafeVectors.h + + + //28 May 2017 + CAFE( ChannelRequestPolicy _channelRequestPolicyMasterPut, + ChannelRequestPolicy _channelRequestPolicyMasterGet, + ChannelGetActionWhenMonitorPolicy _channelGetActionWhenMonitorPolicyMaster) { + channelRequestPolicyMasterPut = _channelRequestPolicyMasterPut; + channelRequestPolicyMasterGet = _channelRequestPolicyMasterGet; + channelRequestPolicyMasterGetCtrl = _channelRequestPolicyMasterGet; + channelGetActionWhenMonitorPolicyMaster = _channelGetActionWhenMonitorPolicyMaster; + + vectorDbrType=CAFENUM::DBR_NONE; + } + + //28 May 2017 + CAFE(ChannelRequestPolicy _channelRequestPolicyMasterPut, ChannelRequestPolicy _channelRequestPolicyMasterGet) { + channelRequestPolicyMasterPut = _channelRequestPolicyMasterPut; + channelRequestPolicyMasterGet = _channelRequestPolicyMasterGet; + channelRequestPolicyMasterGetCtrl = _channelRequestPolicyMasterGet; + vectorDbrType=CAFENUM::DBR_NONE; + } + + //28 May 2017 + CAFE(ChannelRequestPolicy _channelRequestPolicyMasterPut) { + channelRequestPolicyMasterPut = _channelRequestPolicyMasterPut; + + //channelRequestPolicyMasterGet.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + // CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITHOUT_CALLBACK); + + //channelRequestPolicyMasterGetCtrl.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + // CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITH_CALLBACK_DEFAULT); + + vectorDbrType=CAFENUM::DBR_NONE; + } + + + + #include "cafeCache.h" + #include "cafeVectors.h" + #include "cafeRoast.h" +//if HAVE_LIBQTXML + //only if qt xml activated + #include "cafeXML.h" + // if HAVE_LIBQTXML moved to within header file +//endif + + + //get NON_BLOCKING + int getNonBlocking(const unsigned int handle){return get(handle);}; + + int get (const unsigned int handle); + int get (const unsigned int *handleArray, unsigned int nelem, int *statusArray); + int get (const unsigned int *handleArray, unsigned int nHandles, vector &statusV); + + int getCtrl (const unsigned int handle); + + //get BLOCKING + int get (const unsigned int handle, PVDataHolder & pvd); + int get (const unsigned int *handleArray, unsigned int nelem, PVDataHolder * pvd); + + int waitForBundledEvents(vector handleV, vector &vRB); + int waitForBundledEvents(unsigned int *handleArray, unsigned int nHandles, vector &vRB); + + int waitForGetEvent(unsigned int handle); + + + int getCtrl (const unsigned int handle, PVCtrlHolder & pvc); + int getCtrl (const unsigned int *handleArray, unsigned int nelem, PVCtrlHolder * pvc); + + //pvName + //NON_BLOCKING + int get (const char * pv); + int getCtrl (const char * pv); + + //BLOCKING + int get (const char * pv, PVDataHolder & pvd); + int getCtrl(const char * pv, PVCtrlHolder & pvc); + + //Special + int getWFAsString(unsigned int handle, string & message); + int getWFAsString(const char * pv, string & message){ + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) { return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) {status=getWFAsString(handle, message);} + return status; + } + + int getWFAsStringCache(unsigned int handle, string & message); + int getWFAsStringCache(const char * pv, string & message){ + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) { return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) {status=getWFAsStringCache(handle, message);} + return status; + } + + string getChannelIDAsString(chid _chid) { + stringstream ss; + ss << _chid; + return ss.str(); + } + + //cafeService.h + #if HAVE_ZEROMQ + int calcDBPMStatus(int, int, string); + + + int getDBPM(DBPMKeeper &dbpm); + int readDBPMOffsets(DBPMKeeper &dbpm); + + int prepareDBPM(vector &_glist, vector &_hV, std::vector &dev, std::vector &pos) ; + int prepareDBPM(vector &_glist, vector &_hV, std::map &posDev) ; + #endif + + + + //Standard BLOCKING get + + //0+ + int get(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + + unsigned int nn=handleHelper.getNelemClient(handle); + if (nn==0) {return ECAFE_INVALID_HANDLE;} + //check on handle number before proceeding! + dbr_string_t * _val = new dbr_string_t[nn]; + status=cafeSoluble.get(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; + }; + int get(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int nn=handleHelper.getNelemClient(handle); + if (nn==0) {return ECAFE_INVALID_HANDLE;} + dbr_string_t * _val = new dbr_string_t[nn]; + status=cafeSoluble.get(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; + }; + int get(const unsigned int handle, string * valStr){ + unsigned int nn=handleHelper.getNelemClient(handle); + if (nn==0) {return ECAFE_INVALID_HANDLE;} + dbr_string_t * _val = new dbr_string_t[nn]; + status=cafeSoluble.get(handle, DBR_STRING, _val); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {valStr[i]=_val[i];} + delete [] _val; return status; + }; + + //0 + int get(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeSoluble.get(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); + }; + int get(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeSoluble.get(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); + }; + int get(const unsigned int handle, dbr_string_t * _val){ + return cafeSoluble.get(handle, DBR_STRING, _val); + }; + //1 + int get(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeSchale.get (handle, DBR_TIME_SHORT, _val, alarmStatus, alarmSeverity, ts); + }; + int get(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeSchale.get (handle, DBR_STS_SHORT, _val, alarmStatus, alarmSeverity); + }; + int get(const unsigned int handle, dbr_short_t * _val){ + return cafeSchale.get (handle, DBR_SHORT, _val); + }; + //2 + int get(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeFrappuccino.get(handle, DBR_TIME_FLOAT, _val, alarmStatus, alarmSeverity, ts); + }; + int get(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeFrappuccino.get(handle, DBR_STS_FLOAT, _val, alarmStatus, alarmSeverity); + }; + int get(const unsigned int handle, dbr_float_t * _val){ + return cafeFrappuccino.get (handle, DBR_FLOAT, _val); + }; + //3 + int get(const unsigned int handle, dbr_ushort_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeEspresso.get (handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); + }; + int get(const unsigned int handle, dbr_ushort_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeEspresso.get (handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); + }; + int get(const unsigned int handle, dbr_ushort_t * _val){ + return cafeEspresso.get (handle, DBR_ENUM, _val); + }; + + + //4 + int get(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeCappuccino.get (handle, DBR_TIME_CHAR, _val, alarmStatus, alarmSeverity, ts); + }; + int get(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeCappuccino.get (handle, DBR_STS_CHAR, _val, alarmStatus, alarmSeverity); + }; + int get(const unsigned int handle, dbr_char_t * _val){ + return cafeCappuccino.get (handle, DBR_CHAR, _val); + }; + //5 + int get(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeLatte.get (handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts); + }; + int get(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeLatte.get (handle, DBR_STS_LONG, _val, alarmStatus, alarmSeverity); + }; + int get(const unsigned int handle, dbr_long_t * _val){ + return cafeLatte.get (handle, DBR_LONG, _val); + }; + //5+ long long + int get(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, \ + epicsTimeStamp &ts); + int get(const unsigned int handle, long long * _val, \ + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); + int get(const unsigned int handle, long long * _val); + + //6 + int get(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeDoppio.get (handle, DBR_TIME_DOUBLE, _val, alarmStatus, alarmSeverity, ts); + }; + int get(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeDoppio.get (handle, DBR_STS_DOUBLE, _val, alarmStatus, alarmSeverity); + }; + int get(const unsigned int handle, dbr_double_t * _val){ + return cafeDoppio.get (handle, DBR_DOUBLE, _val); + }; + + //Arrays + int getCharArray(const unsigned int handle, dbr_char_t * _val){ + return cafeCappuccino.get (handle, DBR_CHAR, _val); + }; + int getShortArray(const unsigned int handle, dbr_short_t * _val){ + return cafeSchale.get (handle, DBR_SHORT, _val); + }; + int getUShortArray(const unsigned int handle, dbr_ushort_t * _val){ + return cafeEspresso.get (handle, DBR_ENUM, _val); + }; + int getDoubleArray(const unsigned int handle, dbr_double_t * _val){ + return cafeDoppio.get (handle, DBR_DOUBLE, _val); + }; + int getFloatArray(const unsigned int handle, dbr_float_t * _val){ + return cafeFrappuccino.get (handle, DBR_FLOAT, _val); + }; + int getLongArray(const unsigned int handle, dbr_long_t * _val){ + return cafeLatte.get (handle, DBR_LONG, _val); + }; + int getLongLongArray(const unsigned int handle, long long * _val){ + return get (handle, _val); + }; + int getStringArray(const unsigned int handle, string * valStr){ + return get(handle, valStr); + }; + int getDbrStringArray(const unsigned int handle, dbr_string_t * _val){ + return cafeSoluble.get(handle, DBR_STRING, _val); + }; + + //0 + + //single values + int getString(const unsigned int handle, string & valStr) { //0+ + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_STRING, val); + if (status==ICAFE_NORMAL) {valStr=val[0];} + CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, string & valStr) { //0+ + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_STRING, val); + if (status==ICAFE_NORMAL) {valStr=val[0];} + CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + int get(const unsigned int handle, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) {//0 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + int getStringTS(const unsigned int handle, string & valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //0 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + int get(const unsigned int handle, string & valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //0 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + + int get(const unsigned int handle, dbr_string_t & _val) { //0 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_STRING, val); + if (status==ICAFE_NORMAL) {sprintf(_val, val[0]);} + CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_string_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) {//0 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {sprintf(_val, val[0]);} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_string_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //0 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]={""}; + status=cafeSoluble.get(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {sprintf(_val, val[0]);} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_short_t & _val){ //1 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_short_t val[1]={0}; + status=cafeSchale.get(handle, DBR_SHORT, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_short_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //1 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_short_t val[1]={0}; + status=cafeSchale.get(handle, DBR_STS_SHORT, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_short_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //1 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_short_t val[1]={0}; + status=cafeSchale.get(handle, DBR_TIME_SHORT, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_float_t &_val){ //2 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_float_t val[1]={0}; + status=cafeFrappuccino.get(handle, DBR_FLOAT, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_float_t &_val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //2 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_float_t val[1]={0}; + status=cafeFrappuccino.get(handle, DBR_STS_FLOAT, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_float_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //2 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_float_t val[1]={0}; + status=cafeFrappuccino.get(handle, DBR_TIME_FLOAT, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_enum_t & _val){ //3 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_enum_t val[1]={0}; + status=cafeEspresso.get(handle, DBR_ENUM, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_enum_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //3 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_enum_t val[1]={0}; + status=cafeEspresso.get(handle, DBR_STS_ENUM, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_enum_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //3 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_enum_t val[1]={0}; + status=cafeEspresso.get(handle, DBR_TIME_ENUM, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_char_t & _val){ //4 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_char_t val[1]={0}; + status=cafeCappuccino.get(handle, DBR_CHAR, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_char_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //4 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_char_t val[1]={0}; + status=cafeCappuccino.get(handle, DBR_STS_CHAR, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_char_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //4 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_char_t val[1]={0}; + status=cafeCappuccino.get(handle, DBR_TIME_CHAR, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int getLong(const unsigned int handle, dbr_long_t & _val){ //5 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_long_t val[1]={0}; + status=cafeLatte.get(handle, DBR_LONG, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_long_t & _val){ //5 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_long_t val[1]={0}; + status=cafeLatte.get(handle, DBR_LONG, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_long_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //5 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_long_t val[1]={0}; + status=cafeLatte.get(handle, DBR_STS_LONG, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_long_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //5 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_long_t val[1]={0}; + status=cafeLatte.get(handle, DBR_TIME_LONG, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + int get(const unsigned int handle, long long & _val){ //5+ long long + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + long long val[1]={0}; + status=CAFE::get(handle, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, long long & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //5+ long long + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + long long val[1]={0}; + status=CAFE::get(handle, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, long long & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //5+ long long + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + long long val[1]={0}; + status=CAFE::get(handle, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + int getDouble(const unsigned int handle, dbr_double_t & _val){ //6 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_double_t val[1]={0}; + status=cafeDoppio.get(handle, DBR_DOUBLE, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_double_t & _val){ //6 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_double_t val[1]={0}; + status=cafeDoppio.get(handle, DBR_DOUBLE, val); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_double_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //6 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_double_t val[1]={0}; + status=cafeDoppio.get(handle, DBR_STS_DOUBLE, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + int get(const unsigned int handle, dbr_double_t & _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //6 + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_double_t val[1]={0}; + status=cafeDoppio.get(handle, DBR_TIME_DOUBLE, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {_val=val[0];} CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + + + + ////////////////////////////////////////////// by PV name /////////////////////////////////// + + int get(const char * pv, string * valStr); //0+ + int get(const char * pv, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0+ + int get(const char * pv, string * valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0+ + + int get(const char * pv, dbr_string_t * val); //0 + int get(const char * pv, dbr_string_t * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0 + int get(const char * pv, dbr_string_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0 + int get(const char * pv, dbr_short_t * val);//1 + int get(const char * pv, dbr_short_t * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1 + int get(const char * pv, dbr_short_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1 + int get(const char * pv, dbr_float_t * val);//2 + int get(const char * pv, dbr_float_t * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2 + int get(const char * pv, dbr_float_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2 + int get(const char * pv, dbr_enum_t * val); //3 + int get(const char * pv, dbr_enum_t * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3 + int get(const char * pv, dbr_enum_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3 + int get(const char * pv, dbr_char_t * val); //4 + int get(const char * pv, dbr_char_t * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4 + int get(const char * pv, dbr_char_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4 + int get(const char * pv, dbr_long_t * val); //5 + int get(const char * pv, dbr_long_t * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5 + int get(const char * pv, dbr_long_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5 + + int get(const char * pv, long long * val); //5+ long long + int get(const char * pv, long long * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5+ long long + int get(const char * pv, long long * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5+ long long + + int get(const char * pv, dbr_double_t * val);//6 + int get(const char * pv, dbr_double_t * val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6 + int get(const char * pv, dbr_double_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6 + + + int get(const char * pv, string & valStr); //0+ + int get(const char * pv, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0 + int get(const char * pv, string & valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0 + + int get(const char * pv, dbr_string_t & val); //0 + int get(const char * pv, dbr_string_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0 + int get(const char * pv, dbr_string_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0 + int get(const char * pv, dbr_short_t & val); //1 + int get(const char * pv, dbr_short_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1 + int get(const char * pv, dbr_short_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1 + int get(const char * pv, dbr_float_t & val); //2 + int get(const char * pv, dbr_float_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2 + int get(const char * pv, dbr_float_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2 + int get(const char * pv, dbr_enum_t & val); //3 + int get(const char * pv, dbr_enum_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3 + int get(const char * pv, dbr_enum_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3 + int get(const char * pv, dbr_char_t & val); //4 + int get(const char * pv, dbr_char_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4 + int get(const char * pv, dbr_char_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4 + + int get(const char * pv, dbr_long_t & val); //5 + int get(const char * pv, dbr_long_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5 + int get(const char * pv, dbr_long_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5 + + int get(const char * pv, long long & val); //5+ long long + int get(const char * pv, long long & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5+ long long + int get(const char * pv, long long & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5+ long long + + int get(const char * pv, dbr_double_t & val); //6 + int get(const char * pv, dbr_double_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6 + int get(const char * pv, dbr_double_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6 + + + + ///////////////////////////////////////////////////////////////////////////////////////////// + + int waitForPut (const unsigned int *h, const unsigned int nelem); + + ///////////////////////////////////////////////////////////////////////////////////////////// + + + int set(const unsigned int handle, PVDataHolder & pvd); //Yes + int set(const unsigned int * handleArray, const unsigned int nelem, PVDataHolder * pvd); + int set(const char *, PVDataHolder & pvd); + + //0 + int set(const unsigned int handle, const dbr_string_t * _val){ + return cafeSoluble.set (handle, DBR_STRING, _val); + }; + //1 + int set(const unsigned int handle, const dbr_short_t * _val){ + return cafeSchale.set (handle, DBR_SHORT, _val); + }; + //2 + int set(const unsigned int handle, const dbr_float_t * _val){ + return cafeFrappuccino.set (handle, DBR_FLOAT, _val); + }; + //3 + int set(const unsigned int handle, const dbr_enum_t * _val){ + return cafeEspresso.set (handle, DBR_ENUM, _val); + }; + //4 + int set(const unsigned int handle, const dbr_char_t * _val){ + return cafeCappuccino.set (handle, DBR_CHAR, _val); + }; + //5 + int set(const unsigned int handle, const dbr_long_t * _val){ + return cafeLatte.set (handle, DBR_LONG, _val); + }; + //5+ long long + int set(const unsigned int handle, const long long * _val); + //6 + int set(const unsigned int handle, const dbr_double_t * _val){ + return cafeDoppio.set (handle, DBR_DOUBLE, _val); + }; + + + //set for PythonTypes + //0 + int setStringArray(const unsigned int handle, const dbr_string_t * _val){ + return cafeSoluble.set (handle, DBR_STRING, _val); + }; + + //4 + int setCharArray(const unsigned int handle, const dbr_char_t * _val){ + return cafeCappuccino.set (handle, DBR_CHAR, _val); + }; + //5 + int setLongArray(const unsigned int handle, const dbr_long_t * _val){ + return cafeLatte.set (handle, DBR_LONG, _val); + }; + //6 + int setDoubleArray(const unsigned int handle, const dbr_double_t * _val){ + return cafeDoppio.set (handle, DBR_DOUBLE, _val); + }; + + //0 + int setString(const unsigned int handle, const string _val){ + return set (handle, _val); + }; + //1 + int setShort(const unsigned int handle, const dbr_short_t _val){ + return set (handle, _val); + }; + //2 + int setFloat(const unsigned int handle, const dbr_float_t _val){ + return set (handle, _val); + }; + //3 + int setUShort(const unsigned int handle, const dbr_enum_t _val){ + return set (handle, _val); + }; + //4 + int setChar(const unsigned int handle, const dbr_char_t _val){ + return set (handle, _val); + }; + //5 + int setLong(const unsigned int handle, const dbr_long_t _val){ + return set (handle, _val); + }; + //5+ + int setLongLong(const unsigned int handle, const long long _val){ + return set (handle, _val); + }; + //6 + int setDouble(const unsigned int handle, const dbr_double_t _val){ + return set (handle, _val); + }; + + + //0 + int set(const unsigned int handle, string _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]; + //remove leading and trailing blanks; + char mess[MAX_STRING_SIZE]; + handleHelper.removeLeadingAndTrailingSpacesDbrString((char *) _val.c_str(),mess); + sprintf(val[0],"%s",mess); + + status=cafeSoluble.set(handle, DBR_STRING, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //0 + int set(const unsigned int handle, const dbr_string_t _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_string_t val[1]; + sprintf(val[0],"%s",_val); status=cafeSoluble.set(handle, DBR_STRING, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //1 + int set(const unsigned int handle, const dbr_short_t _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_short_t val[1]; + val[0]=_val; status=cafeSchale.set(handle, DBR_SHORT, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //2 + int set(const unsigned int handle, const dbr_float_t _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_float_t val[1]; + val[0]=_val; status=cafeFrappuccino.set(handle, DBR_FLOAT, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //3 + int set(const unsigned int handle, const dbr_enum_t _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_enum_t val[1]; + val[0]=_val; status=cafeEspresso.set(handle, DBR_ENUM, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //4 + int set(const unsigned int handle, const dbr_char_t _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_char_t val[1]; + val[0]=_val; status=cafeCappuccino.set(handle, DBR_CHAR, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //5 + int set(const unsigned int handle, const dbr_long_t _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_long_t val[1]; + val[0]=_val; status=cafeLatte.set(handle, DBR_LONG, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //5+ long long + int set(const unsigned int handle, const long long _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + if (_val <= LONG_MAX) { + dbr_long_t val[1]; + val[0]=_val; + status=CAFE::set(handle, val); + } + else { + dbr_double_t val[1]; + val[0]=_val; + status=CAFE::set(handle, val); + } + CAFE::setNelemToPrevious(handle, nelemPrevious); return status; + } + //6 + int set(const unsigned int handle, const dbr_double_t _val) { + unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + if (nelemPrevious==0) { return ECAFE_INVALID_HANDLE;} + dbr_double_t val[1]; + val[0]=_val; status=cafeDoppio.set(handle, DBR_DOUBLE, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + return status; + } + + + //0 non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const dbr_string_t * _val, int *statusArray) { + return cafeSoluble.set (handleArray, nelem, DBR_STRING, _val, statusArray); + } + //1 non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const dbr_short_t * _val, int *statusArray) { + return cafeSchale.set (handleArray, nelem, DBR_SHORT, _val, statusArray); + } + //2 non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const dbr_float_t * _val, int *statusArray) { + return cafeFrappuccino.set (handleArray, nelem, DBR_FLOAT, _val, statusArray); + } + //3 non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const dbr_enum_t * _val, int *statusArray) { + return cafeEspresso.set (handleArray, nelem, DBR_ENUM, _val, statusArray); + } + //4 non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const dbr_char_t * _val, int *statusArray) { + return cafeCappuccino.set (handleArray, nelem, DBR_CHAR, _val, statusArray); + } + //5 non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const dbr_long_t * _val, int *statusArray) { + return cafeLatte.set (handleArray, nelem, DBR_LONG, _val, statusArray); + } + //5+ long long non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const long long * _val, int *statusArray); + + //6 non-blocking, flush at end + int set(const unsigned int *handleArray, const unsigned int nelem, const dbr_double_t * _val, int *statusArray) { + return cafeDoppio.set (handleArray, nelem, DBR_DOUBLE, _val, statusArray); + } + + //0 + int set(const char *, const dbr_string_t * _val); + //1 + int set(const char *, const dbr_short_t * _val); + //2 + int set(const char *, const dbr_float_t * _val); + //3 + int set(const char *, const dbr_enum_t * _val); + //4 + int set(const char *, const dbr_char_t * _val); + //5 + int set(const char *, const dbr_long_t * _val); + //5+ long long + int set(const char *, const long long * _val); + //6 + int set(const char *, const dbr_double_t * _val); + //0 + int set(const char *, const dbr_string_t _val); + //1 + int set(const char *, const dbr_short_t _val); + //2 + int set(const char *, const dbr_float_t _val); + //3 + int set(const char *, const dbr_enum_t _val); + //4 + int set(const char *, const dbr_char_t _val); + //5 + int set(const char *, const dbr_long_t _val); + //5+ long long + int set(const char *, const long long _val); + //6 + int set(const char *, const dbr_double_t _val); + + + //helper functions for &val methods + unsigned int setNelemToOne(const unsigned int handle); + unsigned int setNelemToPrevious(const unsigned int handle, unsigned int nelemPrevious); + + unsigned int setNelemToRetrieveFromCacheToOne(const unsigned int handle); + unsigned int setNelemToRetrieveFromCacheToPrevious(const unsigned int handle, unsigned int nelemPrevious); + + // group functions + int groupAttach (const unsigned int groupHandle, PVGroup &pvgroup); + int groupFetch(const unsigned int groupHandle, PVGroup &pvgroup); + + int groupGet(PVGroup &pvgroup); + int groupGet(const unsigned int groupHandle, PVGroup &pvgroup); + + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + int groupGetScalar(const unsigned int groupHandle, vector &valV, vector &statusV); + + int groupGetScalar(const unsigned int groupHandle, string * val,int * statusArray ); + int groupGetScalar(const unsigned int groupHandle, double * val, int * statusArray); + int groupGetScalar(const unsigned int groupHandle, float * val, int * statusArray); + int groupGetScalar(const unsigned int groupHandle, short * val, int * statusArray); + int groupGetScalar(const unsigned int groupHandle, long * val,int * statusArray ); + int groupGetScalar(const unsigned int groupHandle, long long * val, int * statusArray); + int groupGetScalar(const unsigned int groupHandle, unsigned short * val, int * statusArray ); + int groupGetScalar(const unsigned int groupHandle, unsigned char * val,int * statusArray ); + int groupGetScalar(const unsigned int groupHandle, char * val,int * statusArray ); + + int groupGetCache(const unsigned int groupHandle, PVGroup &pvgroup) { + const unsigned int * handleArray = handleHelper.getHandlesFromWithinGroup(groupHandle); + status=getCache (handleArray, pvgroup.getNPV(), pvgroup.pvdata); + pvgroup.statusGroup=status; + return status; + } + + vector getHandlesFromWithinGroupV(const unsigned int groupHandle) { + return handleHelper.getHandlesFromWithinGroupV(groupHandle); + } + + unsigned int * getHandlesFromWithinGroup(const unsigned int groupHandle) { + return handleHelper.getHandlesFromWithinGroup(groupHandle); + } + + int groupSet(PVGroup &pvgroup); + int groupSet(const unsigned int groupHandle, PVGroup &pvgroup); + + int groupMonitorStart(const unsigned int groupHandle, vector &statusV) { + vector monitorIDV; + return groupMonitorStart(groupHandle, statusV, monitorIDV); + } + + int groupMonitorStart(const unsigned int groupHandle, vector &statusV, + vector &mpV); + int groupMonitorStart(const unsigned int groupHandle, vector &statusV, + vector &monitorIDV); + int groupMonitorStop (const unsigned int groupHandle, vector &statusV); + + + unsigned int groupGetNPV(unsigned int _gHandle) { + return handleHelper.getGroupNPV(_gHandle); + } + unsigned int groupGetNPV(const char * _gName) { + return handleHelper.getGroupNPV(_gName); + } + unsigned int groupGetNPV(const char * _gName, ca_client_context * ccc) { + return handleHelper.getGroupNPV(_gName, ccc); + } + + +#if HAVE_PYTHON_H + void loadSFGroups(string suff); +#endif + +}; + +#endif // CAFE_H + diff --git a/include/cafeCache.h b/include/cafeCache.h new file mode 100644 index 0000000..d595e2d --- /dev/null +++ b/include/cafeCache.h @@ -0,0 +1,615 @@ +/// +/// \file cafeCache.h +/// \brief CAFE methods retrieving data from cache. (Belongs to cafe.h) +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFECACHE_H +#define CAFECACHE_H + +int getPulseID(unsigned int * handle, unsigned int nelem, unsigned int * pulseID) { + int status=ICAFE_NORMAL; int statusLocal=ICAFE_NORMAL; + for (unsigned int i=0; igetPulseIDFromTS(PVDataHolder * pvd, unsigned int nelem) { + vector vui; + vui.clear(); + vui.reserve(nelem); + for (unsigned int i=0; igetPulseIDFromTS(PVGroup pvg) { + vector vui; + vui.clear(); + vui.reserve(pvg.getNPV()); + PVDataHolder * pvd=pvg.getPVData(); + for (unsigned int i=0; i handleV, PVDataHolder * pvd){ + unsigned int * handleArray = new unsigned int [handleV.size()]; + for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i];} + status=getCache(handleArray, (unsigned int) handleV.size(), pvd); + delete [] handleArray; return status; +}; +*/ + + +int getCachePVArray (vector handleV, PVDataHolder * pvd){ + return getCache(&handleV[0], (unsigned int) handleV.size(), pvd); +}; + +int getCachePVArrayNoWait (vector handleV, PVDataHolder * pvd){ + + int overallStatus=ICAFE_NORMAL; + for (size_t i=0; i< (size_t) handleV.size(); ++i) { + status=getCacheNoWait(handleV[i], pvd[i]); + //cout << "handle= " << handleV[i] << " pvFromHandle= " << CAFE::getPVFromHandle(handleV[i]) << " status= " << pvd[i].getStatus() << " val= " << pvd[i].getAsString() << endl; + if (status!=ICAFE_NORMAL) { + resetCallbackGet(handleV[i]); + if(overallStatus==ICAFE_NORMAL) {overallStatus=status;} + } + if (pvd[i].getStatus() !=ICAFE_NORMAL) { + if(overallStatus==ICAFE_NORMAL) {overallStatus=pvd[i].getStatus();} + } + } + return overallStatus; +}; + +/* +int getCachePVArrayNoWait (vector handleV, PVDataHolder * pvd){ + unsigned int * handleArray = new unsigned int [handleV.size()]; + int overallStatus=ICAFE_NORMAL; + for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i]; + status=getCacheNoWait(handleArray[i], pvd[i]); + if (status!=ICAFE_NORMAL) { + resetCallbackGet(handleArray[i]); + if(overallStatus==ICAFE_NORMAL) {overallStatus=status;} + } + } + delete [] handleArray; return status; +}; +*/ + +int resetCallbackGet(const unsigned int handle); +int resetCallbackPut(const unsigned int handle); + +int getCacheNoWait(const unsigned int handle, PVDataHolder & pvd); + +int getCache (const unsigned int handle, PVDataHolder & pvd); +int getCache (const unsigned int *handleArray, unsigned int nelem, PVDataHolder * pvd); + +int getCtrlCache (const unsigned int handle, PVCtrlHolder & pvc); +int getCtrlCache (const unsigned int *handleArray, unsigned int nelem, PVCtrlHolder * pvc); + +int getCache (const char * pv, PVDataHolder & pvd) { + unsigned int handle=handleHelper.getHandleFromPV(pv); return getCache(handle, pvd);} +int getCtrlCache (const char * pv, PVCtrlHolder & pvc) { + unsigned int handle=handleHelper.getHandleFromPV(pv); return getCtrlCache(handle, pvc);} + +//6 +int getCacheDoubleArray(const unsigned int handle, dbr_double_t * _val) { + return cafeDoppio.getCache(handle, DBR_DOUBLE, _val); +}; +int getCache(const unsigned int handle, dbr_double_t * _val) { + return cafeDoppio.getCache(handle, DBR_DOUBLE, _val); +}; +int getCache(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeDoppio.getCache(handle, DBR_STS_DOUBLE, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeDoppio.getCache(handle, DBR_TIME_DOUBLE, _val, alarmStatus, alarmSeverity, ts); +}; +//5+ long long +int getCache(const unsigned int handle, long long * _val); +int getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); +int getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); + +//5 +int getCacheLongArray(const unsigned int handle, dbr_long_t * _val) { + return cafeLatte.getCache(handle, DBR_LONG, _val); +}; +int getCache(const unsigned int handle, dbr_long_t * _val) { + return cafeLatte.getCache(handle, DBR_LONG, _val); +}; +int getCache(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeLatte.getCache(handle, DBR_STS_LONG, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeLatte.getCache(handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts); +}; +//4 +int getCache(const unsigned int handle, dbr_char_t * _val) { + return cafeCappuccino.getCache(handle, DBR_CHAR, _val); +}; +int getCache(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeCappuccino.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeCappuccino.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//3 +int getCache(const unsigned int handle, dbr_enum_t * _val) { + return cafeEspresso.getCache(handle, DBR_ENUM, _val); +}; +int getCache(const unsigned int handle, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeEspresso.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeEspresso.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//2 +int getCacheFloatArray(const unsigned int handle, dbr_float_t * _val) { + return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val); +}; +int getCache(const unsigned int handle, dbr_float_t * _val) { + return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val); +}; +int getCache(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeFrappuccino.getCache(handle, DBR_STS_FLOAT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeFrappuccino.getCache(handle, DBR_TIME_FLOAT, _val, alarmStatus, alarmSeverity, ts); +}; +//1 +int getCacheShortArray(const unsigned int handle, dbr_short_t * _val) { + return cafeSchale.getCache(handle, DBR_SHORT, _val); +}; +int getCache(const unsigned int handle, dbr_short_t * _val) { + return cafeSchale.getCache(handle, DBR_SHORT, _val); +}; +int getCache(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeSchale.getCache(handle, DBR_STS_SHORT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeSchale.getCache(handle, DBR_TIME_SHORT, _val, alarmStatus, alarmSeverity, ts); +}; +int getCacheDbrStringArray(const unsigned int handle, dbr_string_t * _val){ + return cafeSoluble.getCache(handle, DBR_STRING, _val); +}; + +//0 +int getCache(const unsigned int handle, dbr_string_t * _val) { + return cafeSoluble.getCache(handle, DBR_STRING, _val); +}; +int getCache(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); +} +//0+ +int getCacheStringArray(const unsigned int handle, string * valStr) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STRING, _val); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const unsigned int handle, string * valStr) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STRING, _val); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +} +//Single value +//0+ +int getCacheString(const unsigned int handle, string & valStr){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_STRING, val); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} + +int getCache(const unsigned int handle, string & valStr){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_STRING, val); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} +int getCache(const unsigned int handle, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} +int getCache(const unsigned int handle, string & valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} +int getCache(const unsigned int handle, dbr_string_t & val); //0 +int getCache(const unsigned int handle, dbr_string_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0 +int getCache(const unsigned int handle, dbr_string_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0 +int getCache(const unsigned int handle, dbr_short_t & val); //1 +int getCache(const unsigned int handle, dbr_short_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1 +int getCache(const unsigned int handle, dbr_short_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1 +int getCache(const unsigned int handle, dbr_float_t & val); //2 +int getCache(const unsigned int handle, dbr_float_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2 +int getCache(const unsigned int handle, dbr_float_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2 +int getCache(const unsigned int handle, dbr_enum_t & val); //3 +int getCache(const unsigned int handle, dbr_enum_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3 +int getCache(const unsigned int handle, dbr_enum_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3 +int getCache(const unsigned int handle, dbr_char_t & val); //4 +int getCache(const unsigned int handle, dbr_char_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4 +int getCache(const unsigned int handle, dbr_char_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4 + +int getCacheLong(const unsigned int handle, dbr_long_t & val) { return getCache(handle, val);} + +int getCache(const unsigned int handle, dbr_long_t & val); //5 +int getCache(const unsigned int handle, dbr_long_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5 +int getCache(const unsigned int handle, dbr_long_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5 +int getCache(const unsigned int handle, long long & val); //5+ +int getCache(const unsigned int handle, long long & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5+ +int getCache(const unsigned int handle, long long & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5+ +int getCacheDouble(const unsigned int handle, dbr_double_t & val) { + return getCache(handle, val); +} + +int getCache(const unsigned int handle, dbr_double_t & val); //6 +int getCache(const unsigned int handle, dbr_double_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6 +int getCache(const unsigned int handle, dbr_double_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6 + + +//getCache by array of handles +//0+ +int getCache(const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + dbr_string_t * val = new dbr_string_t[nelem]; + status=cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray, + alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i< nelem; ++i) { valStr[i]=val[i]; } + delete [] val; return status; +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + dbr_string_t * val = new dbr_string_t[nelem]; + status=cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray, + alarmStatus, alarmSeverity); + for (unsigned int i=0; i< nelem; ++i) { valStr[i]=val[i]; } + delete [] val; return status; +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray) { + dbr_string_t * val = new dbr_string_t[nelem]; + status=cafeSoluble.getCache(handleArray, nelem, DBR_STRING, val, statusArray); + for (unsigned int i=0; i< nelem; ++i) { valStr[i]=val[i]; } + delete [] val; return status; +} +//0 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray) { + return cafeSoluble.getCache(handleArray, nelem, DBR_STRING, val, statusArray); +} +//1 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeSchale.getCache(handleArray, nelem, DBR_TIME_SHORT, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeSchale.getCache(handleArray, nelem, DBR_STS_SHORT, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray) { + return cafeSchale.getCache(handleArray, nelem, DBR_SHORT, val, statusArray); +} +//2 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeFrappuccino.getCache(handleArray, nelem, DBR_TIME_FLOAT, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeFrappuccino.getCache(handleArray, nelem, DBR_STS_FLOAT, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray) { + return cafeFrappuccino.getCache(handleArray, nelem, DBR_FLOAT, val, statusArray); +} +//3 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeEspresso.getCache(handleArray, nelem, DBR_TIME_ENUM, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeEspresso.getCache(handleArray, nelem, DBR_STS_ENUM, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray) { + return cafeEspresso.getCache(handleArray, nelem, DBR_ENUM, val, statusArray); +} +//4 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeCappuccino.getCache(handleArray, nelem, DBR_TIME_CHAR, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeCappuccino.getCache(handleArray, nelem, DBR_STS_CHAR, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray) { + return cafeCappuccino.getCache(handleArray, nelem, DBR_CHAR, val, statusArray); +} +//5 +int getCache(unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeLatte.getCache(handleArray, nelem, DBR_TIME_LONG, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeLatte.getCache(handleArray, nelem, DBR_STS_LONG, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray) { + return cafeLatte.getCache(handleArray, nelem, DBR_LONG, val, statusArray); +} +//5+ long long +int getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts); + +int getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity); + +int getCache (const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray); +//6 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeDoppio.getCache(handleArray, nelem, DBR_TIME_DOUBLE, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeDoppio.getCache(handleArray, nelem, DBR_STS_DOUBLE, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray) { + return cafeDoppio.getCache(handleArray, nelem, DBR_DOUBLE, val, statusArray); +} + +////////////////////////////////////////////// by PV name /////////////////////////////////// + +int getCache(const char * pv, string & valStr); //0+ +int getCache(const char * pv, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0+ +int getCache(const char * pv, string & valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0+ +int getCache(const char * pv, dbr_string_t & val); //0 +int getCache(const char * pv, dbr_string_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0 +int getCache(const char * pv, dbr_string_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0 +int getCache(const char * pv, dbr_short_t & val); //1 +int getCache(const char * pv, dbr_short_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1 +int getCache(const char * pv, dbr_short_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1 +int getCache(const char * pv, dbr_float_t & val); //2 +int getCache(const char * pv, dbr_float_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2 +int getCache(const char * pv, dbr_float_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2 +int getCache(const char * pv, dbr_enum_t & val); //3 +int getCache(const char * pv, dbr_enum_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3 +int getCache(const char * pv, dbr_enum_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3 +int getCache(const char * pv, dbr_char_t & val); //4 +int getCache(const char * pv, dbr_char_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4 +int getCache(const char * pv, dbr_char_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4 +int getCache(const char * pv, dbr_long_t & val); //5 +int getCache(const char * pv, dbr_long_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5 +int getCache(const char * pv, dbr_long_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5 +int getCache(const char * pv, long long & val){ //5+ + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, val); +} +int getCache(const char * pv, long long & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //5+ + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, val, alarmStatus, alarmSeverity); +} +int getCache(const char * pv, long long & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //5+ + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, val, alarmStatus, alarmSeverity, ts); +} +int getCache(const char * pv, dbr_double_t & val); //6 +int getCache(const char * pv, dbr_double_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6 +int getCache(const char * pv, dbr_double_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6 + + +//6 +int getCache(const char * pv, dbr_double_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeDoppio.getCache(handle, DBR_DOUBLE, _val); +}; +int getCache(const char * pv, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeDoppio.getCache(handle, DBR_STS_DOUBLE, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeDoppio.getCache(handle, DBR_TIME_DOUBLE, _val, alarmStatus, alarmSeverity, ts); +}; + +//5+ +int getCache(const char * pv, long long * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, _val); +}; +int getCache(const char * pv, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, _val, alarmStatus, alarmSeverity, ts); +}; + +//5 +int getCache(const char * pv, dbr_long_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeLatte.getCache(handle, DBR_LONG, _val); +}; +int getCache(const char * pv, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeLatte.getCache(handle, DBR_STS_LONG, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeLatte.getCache(handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts); +}; +//4 +int getCache(const char * pv, dbr_char_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeCappuccino.getCache(handle, DBR_CHAR, _val); +}; +int getCache(const char * pv, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeCappuccino.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeCappuccino.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//3 +int getCache(const char * pv, dbr_enum_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeEspresso.getCache(handle, DBR_ENUM, _val); +}; +int getCache(const char * pv, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeEspresso.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeEspresso.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//2 +int getCache(const char * pv, dbr_float_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val); +}; +int getCache(const char * pv, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeFrappuccino.getCache(handle, DBR_STS_FLOAT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeFrappuccino.getCache(handle, DBR_TIME_FLOAT, _val, alarmStatus, alarmSeverity, ts); +}; +//1 +int getCache(const char * pv, dbr_short_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSchale.getCache(handle, DBR_SHORT, _val); +}; +int getCache(const char * pv, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSchale.getCache(handle, DBR_STS_SHORT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSchale.getCache(handle, DBR_TIME_SHORT, _val, alarmStatus, alarmSeverity, ts); +}; +//0 +int getCache(const char * pv, dbr_string_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSoluble.getCache(handle, DBR_STRING, _val); +}; +int getCache(const char * pv, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); +} +//0+ +int getCache(const char * pv, string * valStr) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STRING, _val); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const char * pv, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const char * pv, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +} + +#endif // CAFECACHE_H diff --git a/include/cafeCache_backup.h b/include/cafeCache_backup.h new file mode 100644 index 0000000..30e8747 --- /dev/null +++ b/include/cafeCache_backup.h @@ -0,0 +1,591 @@ +/// +/// \file cafeCache.h +/// \brief CAFE methods retrieving data from cache. (Belongs to cafe.h) +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFECACHE_H +#define CAFECACHE_H + +int getPulseID(unsigned int * handle, unsigned int nelem, unsigned int * pulseID) { + int status=ICAFE_NORMAL; int statusLocal=ICAFE_NORMAL; + for (unsigned int i=0; igetPulseIDFromTS(PVDataHolder * pvd, unsigned int nelem) { + vector vui; + vui.clear(); + vui.reserve(nelem); + for (unsigned int i=0; igetPulseIDFromTS(PVGroup pvg) { + vector vui; + vui.clear(); + vui.reserve(pvg.getNPV()); + PVDataHolder * pvd=pvg.getPVData(); + for (unsigned int i=0; i handleV, PVDataHolder * pvd){ + unsigned int * handleArray = new unsigned int [handleV.size()]; + for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i];} + status=getCache(handleArray, (unsigned int) handleV.size(), pvd); + delete [] handleArray; return status; +}; + +int getCachePVArrayNoWait (vector handleV, PVDataHolder * pvd){ + unsigned int * handleArray = new unsigned int [handleV.size()]; + int overallStatus=ICAFE_NORMAL; + for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i]; + status=getCacheNoWait(handleArray[i], pvd[i]); + if (status!=ICAFE_NORMAL) { + resetCallbackGet(handleArray[i]); + if(overallStatus==ICAFE_NORMAL) {overallStatus=status;} + } + } + delete [] handleArray; return status; +}; + +int resetCallbackGet(const unsigned int handle); +int resetCallbackPut(const unsigned int handle); + +int getCacheNoWait(const unsigned int handle, PVDataHolder & pvd); + +int getCache (const unsigned int handle, PVDataHolder & pvd); +int getCache (const unsigned int *handleArray, unsigned int nelem, PVDataHolder * pvd); + +int getCtrlCache (const unsigned int handle, PVCtrlHolder & pvc); +int getCtrlCache (const unsigned int *handleArray, unsigned int nelem, PVCtrlHolder * pvc); + +int getCache (const char * pv, PVDataHolder & pvd) { + unsigned int handle=handleHelper.getHandleFromPV(pv); return getCache(handle, pvd);} +int getCtrlCache (const char * pv, PVCtrlHolder & pvc) { + unsigned int handle=handleHelper.getHandleFromPV(pv); return getCtrlCache(handle, pvc);} + +//6 +int getCacheDoubleArray(const unsigned int handle, dbr_double_t * _val) { + return cafeDoppio.getCache(handle, DBR_DOUBLE, _val); +}; +int getCache(const unsigned int handle, dbr_double_t * _val) { + return cafeDoppio.getCache(handle, DBR_DOUBLE, _val); +}; +int getCache(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeDoppio.getCache(handle, DBR_STS_DOUBLE, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeDoppio.getCache(handle, DBR_TIME_DOUBLE, _val, alarmStatus, alarmSeverity, ts); +}; +//5+ long long +int getCache(const unsigned int handle, long long * _val); +int getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); +int getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); + +//5 +int getCacheLongArray(const unsigned int handle, dbr_long_t * _val) { + return cafeLatte.getCache(handle, DBR_LONG, _val); +}; +int getCache(const unsigned int handle, dbr_long_t * _val) { + return cafeLatte.getCache(handle, DBR_LONG, _val); +}; +int getCache(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeLatte.getCache(handle, DBR_STS_LONG, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeLatte.getCache(handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts); +}; +//4 +int getCache(const unsigned int handle, dbr_char_t * _val) { + return cafeCappuccino.getCache(handle, DBR_CHAR, _val); +}; +int getCache(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeCappuccino.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeCappuccino.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//3 +int getCache(const unsigned int handle, dbr_enum_t * _val) { + return cafeEspresso.getCache(handle, DBR_ENUM, _val); +}; +int getCache(const unsigned int handle, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeEspresso.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeEspresso.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//2 +int getCacheFloatArray(const unsigned int handle, dbr_float_t * _val) { + return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val); +}; +int getCache(const unsigned int handle, dbr_float_t * _val) { + return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val); +}; +int getCache(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeFrappuccino.getCache(handle, DBR_STS_FLOAT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeFrappuccino.getCache(handle, DBR_TIME_FLOAT, _val, alarmStatus, alarmSeverity, ts); +}; +//1 +int getCache(const unsigned int handle, dbr_short_t * _val) { + return cafeSchale.getCache(handle, DBR_SHORT, _val); +}; +int getCache(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeSchale.getCache(handle, DBR_STS_SHORT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeSchale.getCache(handle, DBR_TIME_SHORT, _val, alarmStatus, alarmSeverity, ts); +}; + + +int getCacheDbrStringArray(const unsigned int handle, dbr_string_t * _val){ + return cafeSoluble.getCache(handle, DBR_STRING, _val); +}; + +//0 +int getCache(const unsigned int handle, dbr_string_t * _val) { + return cafeSoluble.getCache(handle, DBR_STRING, _val); +}; +int getCache(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + return cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); +}; +int getCache(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + return cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); +} +//0+ +int getCacheStringArray(const unsigned int handle, string * valStr) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STRING, _val); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const unsigned int handle, string * valStr) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STRING, _val); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +} +//Single value +//0+ + +int getCacheString(const unsigned int handle, string & valStr){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_STRING, val); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} + +int getCache(const unsigned int handle, string & valStr){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_STRING, val); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} +int getCache(const unsigned int handle, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} +int getCache(const unsigned int handle, string & valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //0 + unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle); dbr_string_t val[1]={""}; + status=cafeSoluble.getCache(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious); + return status; +} +int getCache(const unsigned int handle, dbr_string_t & val); //0 +int getCache(const unsigned int handle, dbr_string_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0 +int getCache(const unsigned int handle, dbr_string_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0 +int getCache(const unsigned int handle, dbr_short_t & val); //1 +int getCache(const unsigned int handle, dbr_short_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1 +int getCache(const unsigned int handle, dbr_short_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1 +int getCache(const unsigned int handle, dbr_float_t & val); //2 +int getCache(const unsigned int handle, dbr_float_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2 +int getCache(const unsigned int handle, dbr_float_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2 +int getCache(const unsigned int handle, dbr_enum_t & val); //3 +int getCache(const unsigned int handle, dbr_enum_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3 +int getCache(const unsigned int handle, dbr_enum_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3 +int getCache(const unsigned int handle, dbr_char_t & val); //4 +int getCache(const unsigned int handle, dbr_char_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4 +int getCache(const unsigned int handle, dbr_char_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4 + +int getCacheLong(const unsigned int handle, dbr_long_t & val) { + return getCache(handle, val); +} + +int getCache(const unsigned int handle, dbr_long_t & val); //5 +int getCache(const unsigned int handle, dbr_long_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5 +int getCache(const unsigned int handle, dbr_long_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5 +int getCache(const unsigned int handle, long long & val); //5+ +int getCache(const unsigned int handle, long long & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5+ +int getCache(const unsigned int handle, long long & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5+ +int getCacheDouble(const unsigned int handle, dbr_double_t & val) { + return getCache(handle, val); +} + +int getCache(const unsigned int handle, dbr_double_t & val); //6 +int getCache(const unsigned int handle, dbr_double_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6 +int getCache(const unsigned int handle, dbr_double_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6 + + +//getCache by array of handles +//0+ +int getCache(const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + dbr_string_t * val = new dbr_string_t[nelem]; + status=cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray, + alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i< nelem; ++i) { valStr[i]=val[i]; } + delete [] val; return status; +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + dbr_string_t * val = new dbr_string_t[nelem]; + status=cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray, + alarmStatus, alarmSeverity); + for (unsigned int i=0; i< nelem; ++i) { valStr[i]=val[i]; } + delete [] val; return status; +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray) { + dbr_string_t * val = new dbr_string_t[nelem]; + status=cafeSoluble.getCache(handleArray, nelem, DBR_STRING, val, statusArray); + for (unsigned int i=0; i< nelem; ++i) { valStr[i]=val[i]; } + delete [] val; return status; +} +//0 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray) { + return cafeSoluble.getCache(handleArray, nelem, DBR_STRING, val, statusArray); +} +//1 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeSchale.getCache(handleArray, nelem, DBR_TIME_SHORT, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeSchale.getCache(handleArray, nelem, DBR_STS_SHORT, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray) { + return cafeSchale.getCache(handleArray, nelem, DBR_SHORT, val, statusArray); +} +//2 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeFrappuccino.getCache(handleArray, nelem, DBR_TIME_FLOAT, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeFrappuccino.getCache(handleArray, nelem, DBR_STS_FLOAT, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray) { + return cafeFrappuccino.getCache(handleArray, nelem, DBR_FLOAT, val, statusArray); +} +//3 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeEspresso.getCache(handleArray, nelem, DBR_TIME_ENUM, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeEspresso.getCache(handleArray, nelem, DBR_STS_ENUM, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray) { + return cafeEspresso.getCache(handleArray, nelem, DBR_ENUM, val, statusArray); +} +//4 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeCappuccino.getCache(handleArray, nelem, DBR_TIME_CHAR, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeCappuccino.getCache(handleArray, nelem, DBR_STS_CHAR, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray) { + return cafeCappuccino.getCache(handleArray, nelem, DBR_CHAR, val, statusArray); +} +//5 +int getCache(unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeLatte.getCache(handleArray, nelem, DBR_TIME_LONG, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeLatte.getCache(handleArray, nelem, DBR_STS_LONG, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray) { + return cafeLatte.getCache(handleArray, nelem, DBR_LONG, val, statusArray); +} +//5+ long long +int getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts); + +int getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity); + +int getCache (const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray); +//6 +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { + return cafeDoppio.getCache(handleArray, nelem, DBR_TIME_DOUBLE, val, statusArray, + alarmStatus, alarmSeverity, ts); +}; +int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + return cafeDoppio.getCache(handleArray, nelem, DBR_STS_DOUBLE, val, statusArray, + alarmStatus, alarmSeverity); +}; +int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray) { + return cafeDoppio.getCache(handleArray, nelem, DBR_DOUBLE, val, statusArray); +} + +////////////////////////////////////////////// by PV name /////////////////////////////////// + +int getCache(const char * pv, string & valStr); //0+ +int getCache(const char * pv, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0+ +int getCache(const char * pv, string & valStr, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0+ +int getCache(const char * pv, dbr_string_t & val); //0 +int getCache(const char * pv, dbr_string_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0 +int getCache(const char * pv, dbr_string_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0 +int getCache(const char * pv, dbr_short_t & val); //1 +int getCache(const char * pv, dbr_short_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1 +int getCache(const char * pv, dbr_short_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1 +int getCache(const char * pv, dbr_float_t & val); //2 +int getCache(const char * pv, dbr_float_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2 +int getCache(const char * pv, dbr_float_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2 +int getCache(const char * pv, dbr_enum_t & val); //3 +int getCache(const char * pv, dbr_enum_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3 +int getCache(const char * pv, dbr_enum_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3 +int getCache(const char * pv, dbr_char_t & val); //4 +int getCache(const char * pv, dbr_char_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4 +int getCache(const char * pv, dbr_char_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4 +int getCache(const char * pv, dbr_long_t & val); //5 +int getCache(const char * pv, dbr_long_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5 +int getCache(const char * pv, dbr_long_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5 +int getCache(const char * pv, long long & val){ //5+ + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, val); +} +int getCache(const char * pv, long long & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ //5+ + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, val, alarmStatus, alarmSeverity); +} +int getCache(const char * pv, long long & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ //5+ + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, val, alarmStatus, alarmSeverity, ts); +} +int getCache(const char * pv, dbr_double_t & val); //6 +int getCache(const char * pv, dbr_double_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6 +int getCache(const char * pv, dbr_double_t & val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6 + + +//6 +int getCache(const char * pv, dbr_double_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeDoppio.getCache(handle, DBR_DOUBLE, _val); +}; +int getCache(const char * pv, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeDoppio.getCache(handle, DBR_STS_DOUBLE, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeDoppio.getCache(handle, DBR_TIME_DOUBLE, _val, alarmStatus, alarmSeverity, ts); +}; + +//5+ +int getCache(const char * pv, long long * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, _val); +}; +int getCache(const char * pv, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return CAFE::getCache(handle, _val, alarmStatus, alarmSeverity, ts); +}; + +//5 +int getCache(const char * pv, dbr_long_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeLatte.getCache(handle, DBR_LONG, _val); +}; +int getCache(const char * pv, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeLatte.getCache(handle, DBR_STS_LONG, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeLatte.getCache(handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts); +}; +//4 +int getCache(const char * pv, dbr_char_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeCappuccino.getCache(handle, DBR_CHAR, _val); +}; +int getCache(const char * pv, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeCappuccino.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeCappuccino.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//3 +int getCache(const char * pv, dbr_enum_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeEspresso.getCache(handle, DBR_ENUM, _val); +}; +int getCache(const char * pv, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeEspresso.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeEspresso.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts); +}; +//2 +int getCache(const char * pv, dbr_float_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val); +}; +int getCache(const char * pv, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeFrappuccino.getCache(handle, DBR_STS_FLOAT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeFrappuccino.getCache(handle, DBR_TIME_FLOAT, _val, alarmStatus, alarmSeverity, ts); +}; +//1 +int getCache(const char * pv, dbr_short_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSchale.getCache(handle, DBR_SHORT, _val); +}; +int getCache(const char * pv, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSchale.getCache(handle, DBR_STS_SHORT, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSchale.getCache(handle, DBR_TIME_SHORT, _val, alarmStatus, alarmSeverity, ts); +}; +//0 +int getCache(const char * pv, dbr_string_t * _val) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSoluble.getCache(handle, DBR_STRING, _val); +}; +int getCache(const char * pv, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); +}; +int getCache(const char * pv, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + return cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); +} +//0+ +int getCache(const char * pv, string * valStr) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STRING, _val); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const char * pv, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +}; +int getCache(const char * pv, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { + unsigned int handle=handleHelper.getHandleFromPV(pv); + dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)]; + status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) { valStr[i]=_val[i]; } + delete [] _val; return status; +} + +#endif // CAFECACHE_H diff --git a/include/cafeConvert.h b/include/cafeConvert.h new file mode 100644 index 0000000..aa3f495 --- /dev/null +++ b/include/cafeConvert.h @@ -0,0 +1,396 @@ +/// +/// \file cafeConvert.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFECONVERT_H +#define CAFECONVERT_H + +#include +#include // g++ 4.4.4 +#include +#include + +using namespace std; + + +/** + * CAFEConvert Template \n + * CTYPE is the input data type \n + * PVDataHolder methods use CAFEConvert as follows: \n + * method getAsDouble() converts CTYPE to double \n + * method getAsFloat () converts CTYPE to float \n + * method getAsShort () converts CTYPE to short \n + * method getAsEnum () converts CTYPE to enum \n + * method getAsChar () converts CTYPE to char \n + * method getAsLong () converts CTYPE to int \n + * method getAsString() converts CTYPE to string \n + * + */ +template class CAFEConvert { +private: + CTYPE returnVal[1]; +public: + CAFEConvert (unsigned int nelem){}; + CAFEConvert (){}; + ~CAFEConvert (){}; + CTYPE * get(unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val); + CTYPE * getString(unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val); + CTYPE * getStringFromEnum(unsigned int index, unsigned int noStr, CAFE_DATATYPE_UNION_SEQ val, char stig[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]); + CTYPE * get(CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val); + CTYPE * getString(CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val); +}; + + +/** + * Converts from native type to CTYPE + * \param dt input: CAFE_DATATYPE + * \param val input: CAFE_DATATYPE_UNION + * \return CTYPE + */ +template CTYPE * CAFEConvert::get (CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val) + { +#define __METHOD__ "CAFEConvert::get(dt, val)" + + // (boost::math::isnan) calls the Boost version of the isnan macro + // Valid for all types that have numeric_limits support + // (brackets required) to avoid compiler error should isnan also be a native macro + + switch (dt) { + case CAFE_DOUBLE: + if ( (boost::math::isnan)((CTYPE) val.d) ) { + returnVal[0]= (CTYPE) val.d; + } + else { + returnVal[0]= (CTYPE) 0; + } + break; + case CAFE_FLOAT: + if ( (boost::math::isnan)((CTYPE) val.f) ) { + returnVal[0]= (CTYPE) val.f; + } else { + returnVal[0]= 0; + } + break; + case CAFE_LONG: + returnVal[0]= (CTYPE) val.l; + break; + case CAFE_SHORT: + returnVal[0]= (CTYPE) val.s; + break; + case CAFE_ENUM: + returnVal[0]= (CTYPE) val.us; + break; + case CAFE_CHAR: + returnVal[0]= (CTYPE) val.ch; + break; + case CAFE_STRING: + returnVal[0]= (CTYPE) strtod( val.str, NULL); + break; + case CAFE_TYPENOTCONN: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_TYPENOTCONN: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_NO_ACCESS: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_INVALID_DATATYPE: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_NOT_REQUESTED: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_NOT_SHOWN: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + default: + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + << " CAFE INTERNAL ERROR: Unknown dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + } + + return (CTYPE *) returnVal; + +#undef __METHOD__ +} + +/** + * Converts from native type to CTYPE + * \param index input: index to val array + * \param dt input: CAFE_DATATYPE + * \param val input: CAFE_DATATYPE_UNION_SEQ + * \return CTYPE + */ +template CTYPE * CAFEConvert::get (unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val) + { +#define __METHOD__ "CAFEConvert::get(index, dt, val[])" + + switch (dt) { + case CAFE_DOUBLE: + returnVal[0]= (CTYPE) val[index].d; + break; + case CAFE_FLOAT: + returnVal[0]= (CTYPE) val[index].f; + break; + case CAFE_LONG: + returnVal[0]= (CTYPE) val[index].l; + break; + case CAFE_SHORT: + returnVal[0]= (CTYPE) val[index].s; + break; + case CAFE_ENUM: + returnVal[0]= (CTYPE) val[index].us; + break; + case CAFE_CHAR: + returnVal[0]= (CTYPE) val[index].ch; + break; + case CAFE_STRING: + returnVal[0]= (CTYPE) strtod( val[index].str, NULL); + break; + case CAFE_TYPENOTCONN: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_TYPENOTCONN: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_NO_ACCESS: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_INVALID_DATATYPE: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_NOT_REQUESTED: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + case CAFE_NOT_SHOWN: + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + // << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + default: + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + << " CAFE INTERNAL ERROR: Unknown dataType: " << dt << " " << endl; + returnVal[0]=0; + break; + } + + return (CTYPE *) returnVal; + +#undef __METHOD__ +}; + + + + +/** + * Converts from DBR_ENUM type to CTYPE=STRING + * \param index input: index to val array + * \param noStr input: number of enumerations + * \param val input: CAFE_DATATYPE_UNION_SEQ + * \param stig input: stig[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE] an array of enum choices + * \return CTYPE + */ +template CTYPE * CAFEConvert::getStringFromEnum (unsigned int index, unsigned int noStr, CAFE_DATATYPE_UNION_SEQ val, + char stig[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]) +{ +#define __METHOD__ "CAFEConvert::getStringFromEnum(indx, noStr, val, stig)" + + + unsigned int noEmptyStrings=0; + //Check for empty strings: + for (unsigned int j=0; j= noStr) { + cout << "*** WARNING FROM " << __METHOD__ << " *** " << endl; + cout << "ENUM UNSIGNED SHORT VALUE IS GREATER THAN THE NO OF ENUMERATED TYPES" << endl; + cout << "VALUE (unsigned short) = " << val[index].us << endl; + cout << "NO OF ENUMERATED STRINGS = " << noStr << " WITH VALUES: " << endl; + for (unsigned int j=0; j CTYPE * CAFEConvert::getString (unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val) +{ +#define __METHOD__ "CAFEConvert::getString(nelem, dt, val[])" + + switch (dt) { + case CAFE_STRING: + sprintf(returnVal[0], "%s", val[index].str); + break; + case CAFE_CHAR: + sprintf(returnVal[0], "%u", val[index].ch); + break; + case CAFE_FLOAT: + sprintf(returnVal[0], "%f", val[index].f); //floats offer a precision of 6 + break; + case CAFE_DOUBLE: + sprintf(returnVal[0], "%.15f", val[index].d); //double offer a precicion of 15 + break; + case CAFE_SHORT: + sprintf(returnVal[0], "%d", val[index].s); + break; + case CAFE_LONG: + sprintf(returnVal[0], "%d", val[index].l); + break; + case CAFE_ENUM: + sprintf(returnVal[0], "%u", val[index].us); + break; + case CAFE_TYPENOTCONN: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << " ERROR CAFE_TYPENOTCONN: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //CAFE_TYPENOTCONN"); + break; + case CAFE_NO_ACCESS: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //"CAFE_NO_ACCESS"); + break; + case CAFE_INVALID_DATATYPE: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //"CAFE_INVALID_DATATYPE"); + break; + case CAFE_NOT_REQUESTED: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //""); + break; + case CAFE_NOT_SHOWN: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE_NOT_SHOWN: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); // "CAFE_NOT_SHOWN"); + break; + default: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE INTERNAL ERROR: Unknown dataType: "<< dt << " " << endl; + sprintf(returnVal[0], "%s", "0");// "Unknown dataType"); + break; + + } + +return (CTYPE *) returnVal; + +#undef __METHOD__ +}; + +/** + * Converts from native type to CTYPE=STRING + * \param dt input: CAFE_DATATYPE + * \param val CAFE_DATATYPE_UNION input + * \return CTYPE + */ +template CTYPE * CAFEConvert::getString (CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val) +{ +#define __METHOD__ "CAFEConvert::getString(dt, val[])" + + switch (dt) { + case CAFE_STRING: + sprintf(returnVal[0], "%s", val.str); + break; + case CAFE_CHAR: + sprintf(returnVal[0], "%u", val.ch); + break; + case CAFE_FLOAT: + sprintf(returnVal[0], "%f", val.f); //floats offer a precision of 6 + break; + case CAFE_DOUBLE: + sprintf(returnVal[0], "%.15f", val.d); //double offer a precicion of 15 + break; + case CAFE_SHORT: + sprintf(returnVal[0], "%d", val.s); + break; + case CAFE_LONG: + sprintf(returnVal[0], "%d", val.l); + break; + case CAFE_ENUM: + sprintf(returnVal[0], "%u", val.us); + break; + case CAFE_TYPENOTCONN: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << " ERROR CAFE_TYPENOTCONN: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //CAFE_TYPENOTCONN"); + break; + case CAFE_NO_ACCESS: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //"CAFE_NO_ACCESS"); + break; + case CAFE_INVALID_DATATYPE: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //"CAFE_INVALID_DATATYPE"); + break; + case CAFE_NOT_REQUESTED: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); //""); + break; + case CAFE_NOT_SHOWN: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE_NOT_SHOWN: dataType: " << dt << " " << endl; + sprintf(returnVal[0], "%s", "0"); // "CAFE_NOT_SHOWN"); + break; + default: + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout<< " CAFE INTERNAL ERROR: Unknown dataType: "<< dt << " " << endl; + sprintf(returnVal[0], "%s", "0");// "Unknown dataType"); + break; + + } + +return (CTYPE *) returnVal; + +#undef __METHOD__ +}; + + + +#endif diff --git a/include/cafeDataType.h b/include/cafeDataType.h new file mode 100644 index 0000000..1bbb9c4 --- /dev/null +++ b/include/cafeDataType.h @@ -0,0 +1,118 @@ +/// +/// \file cafeDataType.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFEDATATYPE_H +#define CAFEDATATYPE_H + +#include +#include +#include +#include + +enum CAFE_DATATYPE { + CAFE_TYPENOTCONN = TYPENOTCONN, // -1 val returned by ca_field_type when channel not connected + CAFE_STRING = DBF_STRING, // 0 + CAFE_SHORT = DBF_SHORT, // 1 + CAFE_INT = DBF_INT, // 1 + CAFE_FLOAT = DBF_FLOAT, // 2 + CAFE_ENUM = DBF_ENUM, // 3 + CAFE_USHORT = DBF_ENUM, // 3 + CAFE_CHAR = DBF_CHAR, // 4 + CAFE_LONG = DBF_LONG, // 5 + CAFE_DOUBLE = DBF_DOUBLE, // 6 + CAFE_NO_ACCESS = DBF_NO_ACCESS, //7 + CAFE_INVALID_DATATYPE = 8, + CAFE_NOT_REQUESTED = 100, + CAFE_NOT_SHOWN = 101 // (in stop monitor) +}; + +/** + * Provides methods to convert between + * the CAFE_DATATYPES and text equivalent + */ +class CAFEDataTypeCode { + typedef std::map mapLongString; +private: + mapLongString mapDataType; + mapLongString::iterator pos; +public: + CAFEDataTypeCode() { + mapDataType.insert(std::make_pair((int) CAFE_TYPENOTCONN, "CAFE_TYPENOTCONN" )); + mapDataType.insert(std::make_pair((int) CAFE_STRING, "DBF_STRING" )); + mapDataType.insert(std::make_pair((int) CAFE_SHORT, "DBF_SHORT" )); + mapDataType.insert(std::make_pair((int) CAFE_INT, "DBF_SHORT" )); + mapDataType.insert(std::make_pair((int) CAFE_FLOAT, "DBF_FLOAT" )); + mapDataType.insert(std::make_pair((int) CAFE_ENUM, "DBF_ENUM" )); + mapDataType.insert(std::make_pair((int) CAFE_CHAR, "DBF_CHAR" )); + mapDataType.insert(std::make_pair((int) CAFE_LONG, "DBF_LONG" )); + mapDataType.insert(std::make_pair((int) CAFE_DOUBLE, "DBF_DOUBLE" )); + mapDataType.insert(std::make_pair((int) CAFE_NO_ACCESS, "DBF_NO_ACCESS" )); + mapDataType.insert(std::make_pair((int) CAFE_INVALID_DATATYPE, "CAFE_INVALID_DATATYPE")); + mapDataType.insert(std::make_pair((int) CAFE_NOT_REQUESTED, "CAFE_NOT_REQUESTED")); + mapDataType.insert(std::make_pair((int) CAFE_NOT_SHOWN, "CAFE_NOT_SHOWN (IN STOP MONITOR)")); + }; + + ~CAFEDataTypeCode() {}; + + std::string message (int i) { + pos = mapDataType.find(i); + if (pos != mapDataType.end()) return pos->second; + return "CAFE_DATATYPE_UNKNOWN"; + }; + + + std::string asString (int i) { + pos = mapDataType.find(i); + if (pos != mapDataType.end()) return pos->second; + return "CAFE_DATATYPE_UNKNOWN"; + }; + + int enumIs (std::string message) { + for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) + if (pos->second==message) return pos->first; + return -1; + }; + + + int asEnum (std::string message) { + for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) + if (pos->second==message) return pos->first; + return -1; + }; + + void show() {print();} + + void print ( ) { + std::cout << "------------------" << std::endl; + std::cout << "CAFE_DATATYPE LIST" << std::endl; + std::cout << "-----------------" << std::endl; + for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) { + std::cout << pos->first << " " << pos->second << std::endl; + } + std::cout << "-----------------" << std::endl; + }; + +}; + +/** + * A union of CAFE primitive datatypes + */ +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; +}; + +typedef CAFE_DATATYPE_UNION * CAFE_DATATYPE_UNION_SEQ; + + + +#endif diff --git a/include/cafeDataTypeHelper.h b/include/cafeDataTypeHelper.h new file mode 100644 index 0000000..030300f --- /dev/null +++ b/include/cafeDataTypeHelper.h @@ -0,0 +1,65 @@ +/// +/// \file cafeDataTypeHelper.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFEDATATYPEHELPER_H +#define CAFEDATATYPEHELP_H + +#include +#include +#include +#include +#include + +class CafeDataTypeHelper{ +private: + CAFE_DATATYPE_UNION cdu; + CAFE_DATATYPE dataType; + +public: + CafeDataTypeHelper(CAFE_DATATYPE_UNION _cdu, CAFE_DATATYPE _dataType){ + cdu=_cdu; + dataType=_dataType; + }; + + ~CafeDataTypeHelper(){}; + + CAFEConvert renderDouble; + CAFEConvert renderFloat; + CAFEConvert renderShort; + //CAFEConvert renderLong; + CAFEConvert renderEnum; + CAFEConvert renderUChar; + CAFEConvert renderString; + + CAFEConvert renderChar; + //CAFEConvert renderULong; + CAFEConvert renderLongLong; + CAFEConvert renderULongLong; + + CAFEConvert renderInt; + CAFEConvert renderUInt; + + std::string getAsString(){ + return (std::string) renderString.getString(dataType, cdu)[0]; + }; + dbr_string_t * getAsDbr_string_t(){ + return (dbr_string_t *) (renderString.getString(dataType, cdu)[0]); + }; + double getAsDouble(){return (double) renderDouble.get(dataType, cdu)[0];}; + float getAsFloat() {return (float) renderFloat.get (dataType, cdu)[0];}; + short getAsShort() {return (short) renderShort.get(dataType, cdu)[0];}; + dbr_enum_t getAsEnum(){return (dbr_enum_t) renderEnum.get(dataType, cdu)[0];}; + unsigned short getAsUShort(){return (unsigned short) renderEnum.get(dataType, cdu)[0];}; + int getAsInt() {return (int) renderInt.get(dataType, cdu)[0];}; + unsigned int getAsUInt() {return (int) renderUInt.get(dataType, cdu)[0];}; + char getAsChar() {return (char) renderChar.get(dataType, cdu)[0];}; + unsigned char getAsUChar(){return (unsigned char) renderUChar.get(dataType, cdu)[0];}; + long long getAsLongLong() {return (long long) renderLongLong.get(dataType, cdu)[0];}; + unsigned int getAsULongLong() {return (unsigned long long) renderULongLong.get(dataType, cdu)[0];}; +}; + +#endif diff --git a/include/cafeEnum.h b/include/cafeEnum.h new file mode 100644 index 0000000..da8128e --- /dev/null +++ b/include/cafeEnum.h @@ -0,0 +1,152 @@ +/// +/// \file cafeEnum.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFEENUM_H +#define CAFEENUM_H + +#include + +namespace CAFENUM { + +/** + * Data request buffer types \n + * i.e. whether PRIMITIVE, STS, TIME, GR or CTRL + */ +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 + }; + + +/** + * Define enum type to flush io after creating channels + */ +enum ChannelFlushSendBufferPolicyKind { + WITH_FLUSH_IO, + WITH_PEND_IO, // needs timeout duration + WITH_PEND_EVENT, // needs timeout duration + WITH_POLL +}; + + +/** + * Define enum type defining when to flush io after creating channels + */ +enum ChannelWhenToFlushSendBufferPolicyKind { + FLUSH_AUTOMATIC=0, + FLUSH_NOW=FLUSH_AUTOMATIC, + FLUSH_AFTER_EACH_CHANNEL_CREATION=FLUSH_NOW, // instantly + FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION=FLUSH_NOW, + FLUSH_AFTER_EACH_MESSAGE=FLUSH_NOW, + FLUSH_AFTER_EACH_GROUP_CREATION=FLUSH_NOW, + FLUSH_DESIGNATED_TO_CLIENT // +}; + +/** + * Enum type defining ca server dispatch priority + * Note that specifying different priorities within the same program + * can increase resource consumption in thw client and server because + * an independent virtual circuit, and associated data structures, is + * created for each priority that is used on a particular server + */ +enum ChannelServerDispatchPriority { + CA_SERVER_DISPATCH_PRIORITY_MIN =CA_PRIORITY_MIN, //0 + CA_SERVER_DISPATCH_PRIORITY_VERYLOW =CA_PRIORITY_MIN+1, + CA_SERVER_DISPATCH_PRIORITY_DEFAULT =CA_PRIORITY_MAX, //CA_SERVER_DISPATCH_PRIORITY_VERYLOW, //1 + CA_SERVER_DISPATCH_PRIORITY_LOW =CA_PRIORITY_MIN+25, + CA_SERVER_DISPATCH_PRIORITY_MED =CA_PRIORITY_MIN+50, + CA_SERVER_DISPATCH_PRIORITY_HIGH =CA_PRIORITY_MIN+75, + CA_SERVER_DISPATCH_PRIORITY_VERYHIGH=CA_PRIORITY_MIN+98, + CA_SERVER_DISPATCH_PRIORITY_MAX =CA_PRIORITY_MAX + + }; + + +/** + * Enum type defining the wait/nowait modes for cache operations. + * Meant for use within callbacks to ensure that cache operations + * are never blocked + */ +enum ChannelGetCacheWaitPolicyKind { + GET_CACHE_NO_CHECK=0, + GET_CACHE_NO_WAIT, + GET_CACHE_NOW =GET_CACHE_NO_WAIT, + GET_CACHE_WAIT +}; + + +/** + * Enum type defining the modes for get operations when a + * monitor is in place + * + */ +enum ChannelGetActionWhenMonitorPolicyKind { + GET_FROM_CACHE, + GET_FROM_IOC +}; + +/** + * Enum type defining the blocking modes for ca operations. + * Blocking can be achieved with or without callback. + * Callback can further be supplied by the user + */ +enum ChannelRequestPolicyKind { + WITHOUT_CALLBACK, + WITH_CALLBACK_DEFAULT, + WITH_CALLBACK_USER_SUPPLIED +}; + + +/** + * Enum type defining level of datatype conversion at the IOC + * + */ +enum ChannelRequestDataTypePolicyKind { + NATIVE_DATATYPE, + LOWEST_DATATYPE // The smaller in byte size of type requested and native datatype +}; + + +/** + * Enum type defining whether to wait for a response + * from a message sent with a callback, whether it be + * user supplied or the CAFE default. + */ +enum ChannelWaitForResponsePolicyKind { + BLOCKING=0, + WAIT=BLOCKING, + NON_BLOCKING=1, + NO_WAIT=NON_BLOCKING +}; + + +enum StatusMessageKind { + NO_MESSAGE, + PRE_REQUEST, + FROM_REQUEST, + FROM_PEND, + FROM_CALLBACK, + FROM_MESSAGE + }; + +enum CallbackProgressKind { + NOT_INITIATED, + PENDING, + COMPLETE + }; + +}; //namespace CAFENUM + +#endif // CAFEENUM_H diff --git a/include/cafeEnumStrings.h b/include/cafeEnumStrings.h new file mode 100644 index 0000000..0438002 --- /dev/null +++ b/include/cafeEnumStrings.h @@ -0,0 +1,44 @@ +/// +/// \file cafeEnumStrings.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + + +#ifndef CAFEENUMSTRINGS_H +#define CAFEENUMSTRINGS_H + + +#include "cafeEnum.h" +#include "enumStrings.h" + +template<> char const * enumStrings::data[] += {"CAFENUM::WAIT", "CAFENUM::NO_WAIT"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::NATIVE_DATATYPE", "CAFENUM::LOWEST_DATATYPE"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::WITH_FLUSH_IO","CAFENUM::WITH_PEND_IO","CAFENUM::WITH_PEND_EVENT", "CAFENUM::WITH_POLL"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::FLUSH_AFTER_EACH_MESSAGE","CAFENUM::FLUSH_DESIGNATED_TO_CLIENT"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::WITHOUT_CALLBACK","CAFENUM::WITH_CALLBACK_DEFAULT","CAFENUM::WITH_CALLBACK_USER_SUPPLIED"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::DBR_PRIMITIVE","CAFENUM::DBR_STS","CAFENUM::DBR_TIME", "CAFENUM::DBR_GR", + "CAFENUM::DBR_CTRL","CAFENUM::DBR_PUT", "CAFENUM::DBR_STSACK","CAFENUM::DBR_CLASS", + "CAFENUM::DBR_OTHER"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::NO_MESSAGE","CAFENUM::PRE_REQUEST","CAFENUM::FROM_REQUEST","CAFENUM::FROM_PEND", + "CAFENUM::FROM_CALLBACK"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::NOT_INITIATED","CAFENUM::PENDING","CAFENUM::COMPLETE"}; + + +#endif // CAFEENUMSTRINGS_H diff --git a/include/cafeRoast.h b/include/cafeRoast.h new file mode 100644 index 0000000..2777410 --- /dev/null +++ b/include/cafeRoast.h @@ -0,0 +1,505 @@ +/// +/// \file cafeRoast.h +/// \author Jan Chrin, PSI +/// \date Release: January 2016 +/// \version CAFE 1.3.0 +/// +/// Add Match methods +/// + +#ifndef CAFEROAST_H +#define CAFEROAST_H + + +int setAndGet (const unsigned int handleSet, dbr_double_t valSet, dbr_double_t &valGet) { + status=cafeDoppio.setAndGet((unsigned int) handleSet, DBR_DOUBLE, valSet, valGet); + return status; +} +int setAndGet (const unsigned int handleSet, dbr_float_t valSet, dbr_float_t &valGet) { + status=cafeFrappuccino.setAndGet((unsigned int) handleSet, DBR_FLOAT, valSet, valGet); + return status; +} +int setAndGet (const unsigned int handleSet, dbr_char_t valSet, dbr_char_t &valGet) { + status=cafeCappuccino.setAndGet((unsigned int) handleSet, DBR_CHAR, valSet, valGet); + return status; +} +int setAndGet (const unsigned int handleSet, dbr_enum_t valSet, dbr_enum_t &valGet) { + status=cafeEspresso.setAndGet((unsigned int) handleSet, DBR_ENUM, valSet, valGet); + return status; +} +int setAndGet (const unsigned int handleSet, dbr_short_t valSet, dbr_short_t &valGet) { + status=cafeSchale.setAndGet((unsigned int) handleSet, DBR_SHORT, valSet, valGet); + return status; +} +int setAndGet (const unsigned int handleSet, dbr_long_t valSet, dbr_long_t &valGet) { + status=cafeLatte.setAndGet((unsigned int) handleSet, DBR_LONG, valSet, valGet); + return status; +} +int setAndGet (const unsigned int handleSet, long long valSet, long long &valGet) { + double valSetD=valSet; double valGetD=0; + status=cafeDoppio.setAndGet((unsigned int) handleSet, DBR_DOUBLE, valSetD, valGetD); + valGet=(long long) valGetD; + return status; +} +int setAndGet (const unsigned int handleSet, dbr_string_t valSet, dbr_string_t &valGet) { + status=cafeSoluble.setAndGetDbrString((unsigned int) handleSet, valSet, valGet); + return status; +} +int setAndGet (const unsigned int handleSet, string valSet, string &valGet) { + status=cafeSoluble.setAndGetString((unsigned int) handleSet, valSet, valGet); + return status; +} + +// +int match(dbr_double_t valSet, unsigned int handleMatch, + dbr_double_t tolerance, double timeout, bool printFlag){ + return cafeDoppio.match(DBR_DOUBLE, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int match(dbr_float_t valSet, unsigned int handleMatch, + dbr_float_t tolerance, double timeout, bool printFlag){ + return cafeFrappuccino.match(DBR_FLOAT, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int match(dbr_char_t valSet, unsigned int handleMatch, + dbr_char_t tolerance, double timeout, bool printFlag){ + return cafeCappuccino.match(DBR_CHAR, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int match(dbr_enum_t valSet, unsigned int handleMatch, + dbr_enum_t tolerance, double timeout, bool printFlag){ + return cafeEspresso.match(DBR_ENUM, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int match(dbr_short_t valSet, unsigned int handleMatch, + dbr_short_t tolerance, double timeout, bool printFlag){ + return cafeSchale.match(DBR_SHORT, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int match(dbr_long_t valSet, unsigned int handleMatch, + dbr_long_t tolerance, double timeout, bool printFlag){ + return cafeLatte.match(DBR_LONG, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int match(long long valSet, unsigned int handleMatch, + long long tolerance, double timeout, bool printFlag){ + dbr_double_t valSetDouble=valSet; + dbr_double_t toleranceDouble = tolerance; + return cafeDoppio.match(DBR_DOUBLE, valSetDouble, handleMatch, toleranceDouble, timeout, printFlag); +} + +int match(string valSet, unsigned int handleMatch, + string tolerance, double timeout, bool printFlag){ +#define __METHOD__ "match (string valSet, unsigned int handleMatch,\ + string tolerance, double timeout, bool printFlag)" + + istringstream ss; + dbr_double_t d=0; dbr_double_t valSetDouble=0; dbr_double_t toleranceDouble = 0; + ss.clear(); + ss.str(valSet); + ss>>d; + + if ( !ss.fail()) { + valSetDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << valSet; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + d=0; + ss.clear(); + ss.str(tolerance); + ss>>d; + + if ( !ss.fail()) { + toleranceDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << tolerance; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + + return cafeDoppio.match(DBR_DOUBLE, valSetDouble, handleMatch, toleranceDouble, timeout, printFlag); +#undef __METHOD__ +} + + + +int match(dbr_string_t valSet, unsigned int handleMatch, + dbr_string_t tolerance, double timeout, bool printFlag){ +#define __METHOD__ "match (dbr_string_t valSet, unsigned int handleMatch,\ + dbr_string_t tolerance, double timeout, bool printFlag)" + istringstream ss; + dbr_double_t d=0; dbr_double_t valSetDouble=0; dbr_double_t toleranceDouble = 0; + ss.clear(); + ss.str(valSet); + ss>>d; + + if ( !ss.fail()) { + valSetDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << valSet; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + d=0; + ss.clear(); + ss.str(tolerance); + ss>>d; + + if ( !ss.fail()) { + toleranceDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << tolerance; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + + return cafeDoppio.match(DBR_DOUBLE, valSetDouble, handleMatch, toleranceDouble, timeout, printFlag); +#undef __METHOD__ +} + +// +int matchMany(vector valSet, vector handleMatch, + dbr_double_t tolerance, double timeout, bool printFlag){ + return cafeDoppio.matchMany(DBR_DOUBLE, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int matchMany(vector valSet, vector handleMatch, + dbr_float_t tolerance, double timeout, bool printFlag){ + return cafeFrappuccino.matchMany(DBR_FLOAT, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int matchMany(vector valSet, vector handleMatch, + dbr_char_t tolerance, double timeout, bool printFlag){ + return cafeCappuccino.matchMany(DBR_CHAR, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int matchMany(vector valSet, vector handleMatch, + dbr_enum_t tolerance, double timeout, bool printFlag){ + return cafeEspresso.matchMany(DBR_ENUM, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int matchMany(vector valSet, vector handleMatch, + dbr_short_t tolerance, double timeout, bool printFlag){ + return cafeSchale.matchMany(DBR_SHORT, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int matchMany(vector valSet, vector handleMatch, + dbr_long_t tolerance, double timeout, bool printFlag){ + return cafeLatte.matchMany(DBR_LONG, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int matchMany(vector valSet, vector handleMatch, + long long tolerance, double timeout, bool printFlag){ + + vector valSetDoubleV; + valSetDoubleV.reserve(valSet.size()); + + std::copy(valSet.begin(), valSet.end(), + std::back_inserter(valSetDoubleV)); + + dbr_double_t toleranceDouble = tolerance; + + return cafeDoppio.matchMany(DBR_DOUBLE, valSetDoubleV, handleMatch, toleranceDouble, timeout, printFlag); +} + +int matchMany(vector valSetV, vector handleMatchV, + string tolerance, double timeout, bool printFlag){ +#define __METHOD__ "matchMany (vector valSetV, vector handleMatchV, \ + string tolerance, double timeout, bool printFlag)" + + vector valSetDoubleV; + + istringstream ss; + dbr_double_t d=0; dbr_double_t toleranceDouble = 0; + for (size_t i=0; i< valSetV.size(); ++i) { + d=0; + ss.clear(); + ss.str(valSetV[i]); + ss>>d; + + if ( !ss.fail()) { + valSetDoubleV.push_back(d); + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << valSetV[i]; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + } + + d=0; + ss.clear(); + ss.str(tolerance); + ss>>d; + + if ( !ss.fail()) { + toleranceDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << tolerance; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + + return cafeDoppio.matchMany(DBR_DOUBLE, valSetDoubleV, handleMatchV, toleranceDouble, timeout, printFlag); +#undef __METHOD__ +} + + + + +int setAndMatchMany(vector handleSet, vector valSet, vector handleMatch, + dbr_double_t tolerance, double timeout, bool printFlag){ + return cafeDoppio.setAndMatchMany(handleSet, DBR_DOUBLE, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int setAndMatchMany(vector handleSet, vector valSet, vector handleMatch, + dbr_float_t tolerance, double timeout, bool printFlag){ + return cafeFrappuccino.setAndMatchMany(handleSet, DBR_FLOAT, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int setAndMatchMany(vector handleSet, vector valSet, vector handleMatch, + dbr_char_t tolerance, double timeout, bool printFlag){ + return cafeCappuccino.setAndMatchMany(handleSet, DBR_CHAR, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int setAndMatchMany(vector handleSet, vector valSet, vector handleMatch, + dbr_enum_t tolerance, double timeout, bool printFlag){ + return cafeEspresso.setAndMatchMany(handleSet, DBR_ENUM, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int setAndMatchMany(vector handleSet, vector valSet, vector handleMatch, + dbr_short_t tolerance, double timeout, bool printFlag){ + return cafeSchale.setAndMatchMany(handleSet, DBR_SHORT, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int setAndMatchMany(vector handleSet, vector valSet, vector handleMatch, + dbr_long_t tolerance, double timeout, bool printFlag){ + return cafeLatte.setAndMatchMany(handleSet, DBR_LONG, valSet, handleMatch, tolerance, timeout, printFlag); +} + + +int setAndMatchMany(vector handleSet, vector valSet, vector handleMatch, + long long tolerance, double timeout, bool printFlag){ + + vector valSetDoubleV; + valSetDoubleV.reserve(valSet.size()); + + std::copy(valSet.begin(), valSet.end(), + std::back_inserter(valSetDoubleV)); + + dbr_double_t toleranceDouble = tolerance; + + return cafeDoppio.setAndMatchMany(handleSet, DBR_DOUBLE, valSetDoubleV, handleMatch, toleranceDouble, timeout, printFlag); +} + + +int setAndMatchMany(vector handleSetV, vector valSetV, vector handleMatchV, + string tolerance, double timeout, bool printFlag){ +#define __METHOD__ "setAndMatchMany (vector handleSetV, vector valSetV, vector handleMatchV, \ + string tolerance, double timeout, bool printFlag)" + + vector valSetDoubleV; + + istringstream ss; + dbr_double_t d=0; dbr_double_t toleranceDouble = 0; + for (size_t i=0; i< valSetV.size(); ++i) { + d=0; + ss.clear(); + ss.str(valSetV[i]); + ss>>d; + + if ( !ss.fail()) { + valSetDoubleV.push_back(d); + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << valSetV[i]; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + } + + d=0; + ss.clear(); + ss.str(tolerance); + ss>>d; + + if ( !ss.fail()) { + toleranceDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << tolerance; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + + return cafeDoppio.setAndMatchMany(handleSetV, DBR_DOUBLE, valSetDoubleV, handleMatchV, toleranceDouble, timeout, printFlag); +#undef __METHOD__ + +} + + + + +int setAndMatch(const unsigned int handleSet, dbr_double_t valSet, const unsigned int handleMatch, + dbr_double_t tolerance, double timeout, bool printFlag){ + return cafeDoppio.setAndMatch(handleSet, DBR_DOUBLE, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int setAndMatch(const unsigned int handleSet, dbr_float_t valSet, const unsigned int handleMatch, + dbr_float_t tolerance, double timeout, bool printFlag){ + return cafeFrappuccino.setAndMatch(handleSet, DBR_FLOAT, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int setAndMatch(const unsigned int handleSet, dbr_char_t valSet, const unsigned int handleMatch, + dbr_char_t tolerance, double timeout, bool printFlag){ + return cafeCappuccino.setAndMatch(handleSet, DBR_CHAR, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int setAndMatch(const unsigned int handleSet, dbr_enum_t valSet, const unsigned int handleMatch, + dbr_enum_t tolerance, double timeout, bool printFlag){ + return cafeEspresso.setAndMatch(handleSet, DBR_ENUM, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int setAndMatch(const unsigned int handleSet, dbr_short_t valSet, const unsigned int handleMatch, + dbr_short_t tolerance, double timeout, bool printFlag){ + return cafeSchale.setAndMatch(handleSet, DBR_SHORT, valSet, handleMatch, tolerance, timeout, printFlag); +} + +int setAndMatch(const unsigned int handleSet, dbr_long_t valSet, const unsigned int handleMatch, + dbr_long_t tolerance, double timeout, bool printFlag){ + return cafeLatte.setAndMatch(handleSet, DBR_LONG, valSet, handleMatch, tolerance, timeout, printFlag); +} +int setAndMatch(const unsigned int handleSet, long long valSet, const unsigned int handleMatch, + long long tolerance, double timeout, bool printFlag){ + dbr_double_t valSetDouble=valSet; + dbr_double_t toleranceDouble = tolerance; + return cafeDoppio.setAndMatch(handleSet, DBR_DOUBLE, valSetDouble, handleMatch, toleranceDouble, timeout, printFlag); +} + + +int setAndMatch(const unsigned int handleSet, dbr_string_t valSet, const unsigned int handleMatch, + dbr_string_t tolerance, double timeout, bool printFlag){ +#define __METHOD__ "setAndMatch (dbr_string_t input)" + istringstream ss; + dbr_double_t d=0; dbr_double_t valSetDouble=0; dbr_double_t toleranceDouble = 0; + ss.clear(); + ss.str(valSet); + ss>>d; + + if ( !ss.fail()) { + valSetDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << valSet; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + d=0; + ss.clear(); + ss.str(tolerance); + ss>>d; + + if ( !ss.fail()) { + toleranceDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << tolerance; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + + return cafeDoppio.setAndMatch(handleSet, DBR_DOUBLE, valSetDouble, handleMatch, toleranceDouble, timeout, printFlag); +#undef __METHOD__ +} + +int setAndMatch(const unsigned int handleSet, string valSet, const unsigned int handleMatch, + string tolerance, double timeout, bool printFlag){ +#define __METHOD__ "setAndMatch (string input)" + istringstream ss; + dbr_double_t d=0; dbr_double_t valSetDouble=0; dbr_double_t toleranceDouble = 0; + ss.clear(); + ss.str(valSet); + ss>>d; + + if ( !ss.fail()) { + valSetDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << valSet; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + d=0; + ss.clear(); + ss.str(tolerance); + ss>>d; + + if ( !ss.fail()) { + toleranceDouble=d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << tolerance; + cout << " TO DOUBLE!" << endl; + return ECAFE_NO_CONVERT; + } + + return cafeDoppio.setAndMatch(handleSet, DBR_DOUBLE, valSetDouble, handleMatch, toleranceDouble, timeout, printFlag); +#undef __METHOD__ +} + +#endif // CAFEROAST_H diff --git a/include/cafeService.h b/include/cafeService.h new file mode 100644 index 0000000..ded88a8 --- /dev/null +++ b/include/cafeService.h @@ -0,0 +1,640 @@ +/// +/// \file cafeService.h +/// \author Jan Chrin, PSI +/// \date Release July: 2017 +/// \version CAFE 1.3.0 +/// + +#ifndef CAFE_SERVICE_H +#define CAFE_SERVICE_H + +#include +#include +#include +#include +#include + + +#if HAVE_ZEROMQ +//include + #include + #if HAVE_JSON + #include + #endif + #if HAVE_CURL + #include + #endif +#endif + +/* +class BSData{ +friend class CAFE; +private: + double val; + epicsTimeStamp ets; + int status; +public: + double getValue() {return val;} + epicsTimeStamp getEpicsTimeStamp() {return ets;} + int getStatus() { return status;} + + BSData(){}; +}; + + +class RFData{ +friend class CAFE; +private: + std::vector phase; + std::vector amplitude; + + + std::vector pv; + std::vector handle; + std::vector device; + std::vector s; + + size_t nDevice; + size_t nPV; +} +*/ + +class DBPMData{ +friend class CAFE; +private: + double val; + epicsTimeStamp ets; + int status; +public: + double getValue() {return val;} + epicsTimeStamp getEpicsTimeStamp() {return ets;} + int getStatus() { return status;} + + DBPMData(){ + //status=ECAFE_BPM_DATA_IS_INVALID; + }; +}; + + +class DBPMKeeper +{ +friend class CAFE; +private: + std::vector x; + std::vector y; + std::vector q; + std::vector energy; + + std::vector offs_x; + std::vector offs_y; + + bool isAllXOK; + bool isAllYOK; + bool isAllQOK; + bool isAllEOK; + bool isAllOK; + + std::vector pv; + std::vector handle; + std::vector device; + std::vector s; + + size_t nDBPM; + size_t nPV; + + + + bool isBS; + bool BSInitialized; + void *context; + + void *receiver; + int rc; + #if HAVE_JSON + Json::Value parsedFromString; + Json::Reader reader; + bool parsingSuccessful; + #endif + + +public: + + std::vector getX() { return x;} + std::vector getY() { return y;} + std::vector getQ() { return q;} + std::vector getEnergy() { return energy;} + + + std::vector getOffsetX() { return offs_x;} + std::vector getOffsetY() { return offs_y;} + + bool getIsAllXOK() {return isAllXOK;} + bool getIsAllYOK() {return isAllYOK;} + bool getIsAllQOK() {return isAllQOK;} + bool getIsAllEOK() {return isAllEOK;} + bool getIsAllOK() {return isAllOK;} + + std::vector getPV(){ return pv;} + std::vector getHandle() { return handle;} + std::vector getDevice() { return device;} + std::vector getS() { return s;} + size_t getNDBPM() {return nDBPM;} + size_t getNPV() {return nPV;} + int getStatus() {return status;} + + + int getPVIdx(string _pv) { + + for (size_t i=0; i< pv.size(); ++i) { + + if ( pv[i].compare(_pv) == 0) { + return i; + } + } + return -1; + } + + PVDataHolder * pvd; + int status; + + size_t xIdx; + size_t yIdx; + size_t qIdx; + size_t xValidIdx; + size_t yValidIdx; + size_t qValidIdx; + size_t energyIdx; + size_t endIdx; + + void *subscriber; + + //struct MemoryStruct { + // char *memory; + // size_t size; + //}; + + static size_t RecvResponseCallback(char * contents, size_t size, size_t nmemb, void * up) { + + ++nCBs; + cout << "Callback called: " << nCBs << endl; + + ///Json::Value parsedFromString; + ///Json::Reader reader; + ///bool parsingSuccessful; + + ///Json::FastWriter fastWriter; + + cout << "SIZE No. of Bytes " << size*nmemb << endl; + + string sLocal=contents; + + std::size_t found = sLocal.find('\n'); + + if (found != std::string::npos) { + + sLocal=sLocal.substr(0, found); + } + + contentsS=contentsS+sLocal; + + + + //if (nCBs%3==1) { + // return size*nmemb; + //} + + + //printf("value= %s\n", contents); + /* + if (contents != NULL) { + parsingSuccessful=reader.parse(contentsS.c_str(), parsedFromString); + if (parsingSuccessful) { + //Json::StyledWriter styledWriter; + cout << "STYLED: --------------------------------" << endl; + //cout << styledWriter.write(parsedFromString) << endl; + //cout << "----------------------------------" << endl; + cout << parsedFromString["stream"] << endl; + + cout << "----------------------------------" << endl; + globalZmqStream = fastWriter.write(parsedFromString["stream"]).c_str(); + cout << globalZmqStream << endl; + + if ( parsedFromString["stream"].isNull() ) { + globalZmqStream.clear(); + } + } + else { + cout << "PARSING IN CURL CALLBACK FUNCTION WAS UNSUCCESSFUL !!!" << endl; + + cout << reader.getFormattedErrorMessages() << endl; + } + } + contentsS=""; + */ + + /* + size_t realsize = size * nmemb; + struct MemoryStruct *mem = (struct MemoryStruct *)data; + + mem->memory = (char *) realloc(mem->memory, (mem->size + realsize + 1)); + + if(mem->memory == NULL) { + + printf("not enough memory (realloc returned NULL)\n"); + return 0; + } + + memcpy(&(mem->memory[mem->size]), contents, realsize); + mem->size += realsize; + mem->memory[mem->size] = 0; + + //return realsize; + + printf("value= %s\n",mem->memory); + if (mem->memory != NULL) { + parsingSuccessful=reader.parse(mem->memory, parsedFromString); + if (parsingSuccessful) { + Json::StyledWriter styledWriter; + cout << "STYLED: --------------------------------" << endl; + cout << styledWriter.write(parsedFromString) << endl; + cout << "----------------------------------" << endl; + cout << parsedFromString["stream"] << endl; + + cout << "----------------------------------" << endl; + + + } + } + */ + + return (size_t) size * nmemb; + } + + + +// + + + bool resetBS() { + closeBS(); + return setBS(true); + } + + + bool setBS(bool BSFlag) { + + if(MUTEX){cafeMutex.lock();} + + + if (BSFlag) { + #if HAVE_CURL + /* + //Complete all or complete latest + //const char * data="{\"channels\":[{\"name\":\"S10BC01-DBPM010:X1\",\"backend\":\"sf-databuffer\",\"modulo\":1,\"offset\":0}, \ + {\"name\":\"S10BC01-DBPM010:X1-VALID\",\"backend\":\"sf-databuffer\",\"modulo\":1,\"offset\":0} \ + ],\"mapping\":{\"incomplete\":\"fill-null\"},\"channelValidation\":{\"inconsistency\":\"adjust-global\"},\"sendBehaviour\":{\"strategy\":\"complete-all\"}}"; +*/ + string dataChannels=string("{\"channels\":["); + + vector pvNew=pv; +#if HAVE_ZEROMQ +if (!BSInitialized) { + //pvNew.push_back("SINEG01-DBPM340:X1") ; + //pvNew.push_back("SINSB01-DBPM150:X1") ; + //pvNew.push_back("SINSB02-DBPM150:X1") ; + //pvNew.push_back("SINLH01-DBPM060:X1") ; + //pvNew.push_back("SINLH02-DBPM210:X1") ; + //pvNew.push_back("SINLH02-DBPM240:X1") ; + //pvNew.push_back("SINLH03-DBPM010:X1") ; + //pvNew.push_back("SINLH03-DBPM050:X1") ; + //pvNew.push_back("SINLH03-DBPM090:X1") ; + //pvNew.push_back("SINSB03-DBPM120:X1") ; + //pvNew.push_back("SINSB03-DBPM220:X1") ; + //pvNew.push_back("SINSB04-DBPM120:X1") ; + //pvNew.push_back("SINSB04-DBPM220:X1") ; + + //pvNew.push_back("SINEG01-DBPM340:X1-VALID") ; + //pvNew.push_back("SINSB01-DBPM150:X1-VALID") ; + //pvNew.push_back("SINSB02-DBPM150:X1-VALID") ; + //pvNew.push_back("SINLH01-DBPM060:X1-VALID") ; + //pvNew.push_back("SINLH02-DBPM210:X1-VALID") ; + //pvNew.push_back("SINLH02-DBPM240:X1-VALID") ; + //pvNew.push_back("SINLH03-DBPM010:X1-VALID") ; + //pvNew.push_back("SINLH03-DBPM050:X1-VALID") ; + //pvNew.push_back("SINLH03-DBPM090:X1-VALID") ; + //pvNew.push_back("SINSB03-DBPM120:X1-VALID") ; + //pvNew.push_back("SINSB03-DBPM220:X1-VALID") ; + //pvNew.push_back("SINSB04-DBPM120:X1-VALID") ; + //pvNew.push_back("SINSB04-DBPM220:X1-VALID") ; + size_t found; + dataChannels= dataChannels + string("{\"name\":\""); + dataChannels= dataChannels + pvNew[0]; + //dataChannels= dataChannels + string("\",\"backend\":\"sf-databuffer\"}" ); + dataChannels= dataChannels + string("\",\"backend\":\"sf-databuffer\",\"modulo\":1,\"offset\":0}" ); + + + for (size_t i=1; i < pvNew.size(); ++i) { + + + found = pvNew[i].find("SARUN08-DBPM210"); + if (found != std::string::npos) continue; + found = pvNew[i].find("SARUN08-DBPM410"); + if (found != std::string::npos) continue; + //found = pvNew[i].find("Y1"); + //if (found != std::string::npos) continue; + //found = pvNew[i].find("X1"); + //if (found != std::string::npos) continue; + found = pvNew[i].find("ENERGY"); + if (found != std::string::npos) continue; + + + dataChannels= dataChannels + string(",{\"name\":\""); + dataChannels= dataChannels + pvNew[i]; + + //found = pv[i+1].find("ENERGY"); + //if (found != std::string::npos) break; + //dataChannels= dataChannels + string("\",\"backend\":\"sf-databuffer\"}"); + dataChannels= dataChannels + string("\",\"backend\":\"sf-databuffer\",\"modulo\":1,\"offset\":0}"); + + } + //dataChannels= dataChannels + string("{\"name\":\""); + //dataChannels= dataChannels + pv[pv.size()-1]; + //dataChannels= dataChannels + string("\",\"backend\":\"sf-databuffer\"}],"); + dataChannels= dataChannels + string("],"); + dataChannels= dataChannels + "\"mapping\":{\"incomplete\":\"fill-null\"},\"channelValidation\":{\"inconsistency\":\"keep-as-is\"},\"sendBehaviour\":{\"strategy\":\"complete-all\"}}"; + + cout << dataChannels << endl; + + //sleep(1); + const char * data = dataChannels.c_str(); + + + + ///cout << "SIZE OF DATA --------------->" << sizeof(data) << endl; + + CURL *curl; + CURLcode res; + struct curl_slist * slist; + slist = NULL; + + slist = curl_slist_append(slist, "Content-Type: application/json"); + + curl_global_init(CURL_GLOBAL_ALL); + + + curl = curl_easy_init(); + + + + if (curl) { + + curl_easy_setopt(curl, CURLOPT_URL, "https://dispatcher-api.psi.ch/sf/stream"); + + curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); //"-F file=@./request.json"); //data); // + + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist); + curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); + + cout << "WAITING FOR CALLBACK " << endl; + + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &RecvResponseCallback); + + + + res = curl_easy_perform(curl); + + if (res != CURLE_OK) { + cout << "curl_easy_perform failed " << curl_easy_strerror(res) << endl; + } + else { + cout << " CALLBACK DONE" << endl; + + cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; + + curl_easy_cleanup(curl); + + cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; + curl=NULL; + + curl_slist_free_all(slist); + cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; + slist=NULL; + } + } + + cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl; + curl_global_cleanup(); + + #endif + + //cout << " //1// SHOW contentS " << endl; + //cout << contentsS.c_str() << endl; + + + //sleep(1); + + Json::Value parsedFromString; + Json::Reader reader; + bool parsingSuccessful; + + Json::FastWriter fastWriter; + + //printf("value= %s\n", contentsS.c_str()); + + + if (contentsS.size() > 2) { + parsingSuccessful=reader.parse(contentsS.c_str(), parsedFromString); + if (parsingSuccessful) { + //Json::StyledWriter styledWriter; + cout << "STYLED: --------------------------------" << endl; + //cout << styledWriter.write(parsedFromString) << endl; + //cout << "----------------------------------" << endl; + cout << parsedFromString["stream"] << endl; + + cout << "----------------------------------" << endl; + globalZmqStream = fastWriter.write(parsedFromString["stream"]).c_str(); + cout << globalZmqStream << endl; + + if ( parsedFromString["stream"].isNull() ) { + globalZmqStream.clear(); + } + } + else { + cout << "PARSING IN CURL CALLBACK FUNCTION WAS UNSUCCESSFUL !!!" << endl; + cout << contentsS.c_str() << endl; + cout << reader.getFormattedErrorMessages() << endl; + + } + } + + + +// +//#if HAVE_ZEROMQ +//if (!BSInitialized) { + + + cout << "TESTING STREAM... " << endl; + + + if (globalZmqStream.empty()) { + cout << "BS Data is not available " << endl; + return isBS=false; + } + // else { + // cout << globalZmqStream.c_str() << " is not empty " << endl; + + // } + + + context = zmq_ctx_new (); + + /// receiver = zmq_socket (context, ZMQ_PULL); + //HWM has no effect for PULL + //See documentation on zmq-socket + //WHEN PUSH Sender reachers HWM, then it blocks + /// int nhwm=10; + /// zmq_setsockopt (receiver,ZMQ_RCVHWM ,&nhwm, sizeof(int)); + //rc = zmq_bind (receiver, "tcp://129.129.145.206:5558"); //ZMQ_PULL + /// rc = zmq_bind (receiver, "tcp://SIN-CVME-DBPM0421:9000"); + /// assert (rc == 0); + + + subscriber = zmq_socket (context, ZMQ_SUB); + //rc = zmq_connect (subscriber, "tcp://129.129.145.206:5556"); + //rc = zmq_connect (subscriber, "tcp://SIN-CVME-DBPM0421:9000"); + + + + globalZmqStream=globalZmqStream.substr(1,globalZmqStream.size()-3); + //cout << " globalZmqStream.c_str() " << globalZmqStream.c_str() << endl; + //sleep(1); + + + + rc = zmq_connect (subscriber, (const char *) globalZmqStream.c_str()); // "tcp://sf-daqbuf-28.psi.ch:42465"); // //"tcp://sf-daqbuf-30.psi.ch:39927"); + + if (rc != 0 ) { + cout << " Error is " << zmq_errno() << " " << zmq_strerror(zmq_errno()) << endl; + } + + //rc = zmq_connect (subscriber, "tcp://*:9999"); + assert (rc == 0); + + int nhwm=1; + int timeoutMS=400; //10; //-1 Wait for Ever + + rc=zmq_setsockopt (subscriber,ZMQ_RCVHWM ,&nhwm, sizeof(int)); + assert (rc == 0); + + rc=zmq_setsockopt (subscriber,ZMQ_RCVTIMEO ,&timeoutMS, sizeof(int)); + assert (rc == 0); + + rc=zmq_setsockopt (subscriber,ZMQ_SUBSCRIBE,"",0); + assert (rc == 0); + + BSInitialized=true; + } + + if(MUTEX){cafeMutex.unlock();} + return isBS=BSFlag; + #else + + if(MUTEX){cafeMutex.unlock();} + return isBS=false; + #endif + } + + if(MUTEX){cafeMutex.unlock();} + return isBS=BSFlag; + } + + bool setCA(bool CAFlag) { + return CAFlag; + } + + void closeBS() { + if (BSInitialized && isBS) { + #if HAVE_ZEROMQ + zmq_close (subscriber); + zmq_ctx_destroy (context); + #endif + } + BSInitialized=false; + isBS=false; + } + + bool getIsBS() { return isBS;} + + + DBPMKeeper() {}; + + DBPMKeeper(std::vector _pv, std::vector _handle, std::map posDev):isBS(false),BSInitialized(false) + { + + pv.assign (_pv.begin(), _pv.end()); + handle.assign(_handle.begin(),_handle.end()); + + + //fMap posDev; + std::map::iterator pos; + for (pos =posDev.begin(); pos != posDev.end(); ++pos) { + s.push_back(pos->first); device.push_back(pos->second); + } + + pvd = new PVDataHolder[handle.size()]; + + //for (int i=0; i< handle.size(); ++i) { + // pvd[i].setNelem(1); + //} + + nDBPM=device.size(); + nPV=_pv.size(); + status=ICAFE_NORMAL; + + xIdx = 0; + yIdx = nDBPM; + qIdx =2*nDBPM; + xValidIdx=3*nDBPM; + yValidIdx=4*nDBPM; + qValidIdx=5*nDBPM; + energyIdx=6*nDBPM; + endIdx =7*nDBPM; + } + + + DBPMKeeper(std::vector _pv, std::vector _handle, std::vector _dev, std::vector _pos):isBS(false),BSInitialized(false) + { + + pv.assign (_pv.begin(), _pv.end()); + handle.assign(_handle.begin(),_handle.end()); + + device.assign(_dev.begin(), _dev.end()); + s.assign(_pos.begin(), _pos.end()); + + pvd = new PVDataHolder[handle.size()]; + + //for (int i=0; i< handle.size(); ++i) { + // pvd[i].setNelem(1); + //} + + nDBPM=device.size(); + nPV=_pv.size(); + status=ICAFE_NORMAL; + + xIdx = 0; + yIdx = nDBPM; + qIdx =2*nDBPM; + xValidIdx=3*nDBPM; + yValidIdx=4*nDBPM; + qValidIdx=5*nDBPM; + energyIdx=6*nDBPM; + endIdx =7*nDBPM; + } + +}; + + + + +#endif //CAFE_SERVICE_H diff --git a/include/cafeVectors.h b/include/cafeVectors.h new file mode 100644 index 0000000..5293264 --- /dev/null +++ b/include/cafeVectors.h @@ -0,0 +1,298 @@ +/// +/// \file cafeVectors.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFEVECTORS_H +#define CAFEVECTORS_H + +#include + +int get(const unsigned int _handle, vector & V); //0 +int get(const unsigned int _handle, vector & V); //1 +int get(const unsigned int _handle, vector & V); //2 +int get(const unsigned int _handle, vector & V); //3 +int get(const unsigned int _handle, vector & V); //4 +int get(const unsigned int _handle, vector & V); //5 +int get(const unsigned int _handle, vector & V); //5 +int get(const unsigned int _handle, vector & V); //6 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//1 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//2 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//3 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//4 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//6 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//0 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//1 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//2 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//3 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//4 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 +int get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);// + +int getCache(const unsigned int _handle, vector & V); //0 +int getCache(const unsigned int _handle, vector & V); //1 +int getCache(const unsigned int _handle, vector & V); //2 +int getCache(const unsigned int _handle, vector & V);//3 +int getCache(const unsigned int _handle, vector & V);//4 +int getCache(const unsigned int _handle, vector & V); //5 +int getCache(const unsigned int _handle, vector & V); //5 +int getCache(const unsigned int _handle, vector & V); //6 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//1 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//2 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//3 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//4 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//6 + + +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//0 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//1 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//2 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//3 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//4 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 +int getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//6 + + +int get(vector handleV, vector &statusV); + +int getV(vector handleV, vector &statusV){ + status=get(handleV, statusV); ca_flush_io(); //Yes let's flush here! + return status;} + +int getScalars(vector handleV, vector & V, vector &statusV){ //0 + CAFE::get(handleV, statusV); + CAFE::waitForBundledEvents(handleV, statusV); + return CAFE::getCache(handleV, V, statusV); +} +int getScalars(vector handleV, vector & V, vector &statusV){ //1 + CAFE::get(handleV, statusV); + CAFE::waitForBundledEvents(handleV, statusV); + return CAFE::getCache(handleV, V, statusV); +} +int getScalars(vector handleV, vector & V, vector &statusV){ //2 + CAFE::get(handleV, statusV); + CAFE::waitForBundledEvents(handleV, statusV); + return CAFE::getCache(handleV, V, statusV); +} +int getScalars(vector handleV, vector & V, vector &statusV){ //3 + CAFE::get(handleV, statusV); + CAFE::waitForBundledEvents(handleV, statusV); + return CAFE::getCache(handleV, V, statusV); +} +int getScalars(vector handleV, vector & V, vector &statusV){ //4 + CAFE::get(handleV, statusV); + CAFE::waitForBundledEvents(handleV, statusV); + return CAFE::getCache(handleV, V, statusV); +} +int getScalars(vector handleV, vector & V, vector &statusV){ //5 + CAFE::get(handleV, statusV); + CAFE::waitForBundledEvents(handleV, statusV); + return CAFE::getCache(handleV, V, statusV); +} +int getScalars(vector handleV, vector & V, vector &statusV) { //5 + CAFE::get(handleV, statusV); + CAFE::waitForBundledEvents(handleV, statusV); + return CAFE::getCache(handleV, V, statusV); +} +int getScalars(vector handleV, vector & V, vector &statusV) { //6 + CAFE::get(handleV, statusV); + //for (size_t i=0; i< handleV.size(); ++i) { cout << "/Asyn/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;} + CAFE::waitForBundledEvents(handleV, statusV); + //for (size_t i=0; i< handleV.size(); ++i) { cout << "/Wait/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;} + status=CAFE::getCache(handleV, V, statusV); + //for (size_t i=0; i< handleV.size(); ++i) { cout << "/Cach/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;} + return status; +} + + + + +int getCacheVStr(vector handleV, vector & V, vector &statusV){ + return getCache(handleV, V, statusV);} +int getCacheVLong(vector handleV, vector & V, vector &statusV){ + return getCache(handleV, V, statusV);} +int getCacheVDouble(vector handleV, vector & V, vector &statusV){ + return getCache(handleV, V, statusV);} + + +int getCache(vector handleV, vector & V, vector &statusV); //0 +int getCache(vector handleV, vector & V, vector &statusV); //1 +int getCache(vector handleV, vector & V, vector &statusV); //2 +int getCache(vector handleV, vector & V, vector &statusV); //3 +int getCache(vector handleV, vector & V, vector &statusV); //4 +int getCache(vector handleV, vector & V, vector &statusV); //5 +int getCache(vector handleV, vector & V, vector &statusV); //5 +int getCache(vector handleV, vector & V, vector &statusV); //6 + +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //0 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //1 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //2 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //3 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //4 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //5 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //5 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV); //6 + +//0 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); +//1 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); +//2 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); +//3 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); +//4 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); +//5 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); +//6 +int getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +int set(const unsigned int handle, vector V); //0 +int set(const unsigned int handle, vector V); //1 +int set(const unsigned int handle, vector V); //2 +int set(const unsigned int handle, vector V);//3 +int set(const unsigned int handle, vector V);//4 +int set(const unsigned int handle, vector V); //5 +int set(const unsigned int handle, vector V); //5+ +int set(const unsigned int handle, vector V); //6 + +int set(vector handleV, vector V, vector &statusV); //0 +int set(vector handleV, vector V, vector &statusV); //1 +int set(vector handleV, vector V, vector &statusV); //2 +int set(vector handleV, vector V, vector &statusV); //3 +int set(vector handleV, vector V, vector &statusV); //4 +int set(vector handleV, vector V, vector &statusV); //5 +int set(vector handleV, vector V, vector &statusV); //5+ +int set(vector handleV, vector V, vector &statusV); //6 + + + +int get (vector handleV, PVDataHolder * pvd){ + + return get(&handleV[0], (unsigned int) handleV.size(), pvd); + +}; + + +int getCache (vector handleV, PVDataHolder * pvd){ + + return getCache(&handleV[0], (unsigned int) handleV.size(), pvd); +}; + + +int getPVArray (vector handleV, PVDataHolder * pvd){ + //unsigned int * handleArray = new unsigned int [handleV.size()]; + //for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i];} + //status=get(handleArray, (unsigned int) handleV.size(), pvd); + //delete [] handleArray; return status; + return get(&handleV[0], (unsigned int) handleV.size(), pvd); +}; + +/* +int getPVArrayCache (vector handleV, PVDataHolder * pvd){ + //unsigned int * handleArray = new unsigned int [handleV.size()]; + //for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i];} + //status=getCache(handleArray, (unsigned int) handleV.size(), pvd); + //delete [] handleArray; return status; + return getCache(&handleV[0], (unsigned int) handleV.size(), pvd); +}; +*/ + + +//setPVArray is in cafeVectors.h and .cc +//For Cython +int setPVArray(vector handleV, PVDataHolder * pvd); + +int setVVString(vector handleV, vector V, vector &statusV) { + return set(handleV, V, statusV);}; +int setVVChar(vector handleV, vector V, vector &statusV){ + return set(handleV, V, statusV);}; +int setVVLong(vector handleV, vector V, vector &statusV){ + return set(handleV, V, statusV);}; +int setVVDouble(vector handleV, vector V, vector &statusV){ + return set(handleV, V, statusV);}; + +int setVString(const unsigned int handle, vector V) {return set(handle, V);}; + +int setVChar (const unsigned int handle, vector V) {return set(handle, V);}; +int setVLong (const unsigned int handle, vector V) {return set(handle, V);}; +int setVShort (const unsigned int handle, vector V) {return set(handle, V);}; +int setVUShort(const unsigned int handle, vector V) {return set(handle, V);}; +int setVFloat (const unsigned int handle, vector V) {return set(handle, V);}; +int setVDouble(const unsigned int handle, vector V) {return set(handle, V);}; + + + + +#endif // CAFEVECTORS_H diff --git a/include/cafeXML.h b/include/cafeXML.h new file mode 100644 index 0000000..d180c6d --- /dev/null +++ b/include/cafeXML.h @@ -0,0 +1,24 @@ +/// +/// \file cafeXML.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAFEXML_H +#define CAFEXML_H + +#include + +#if HAVE_LIBQTXML +int loadCollectionsFromXML(const char * collectionsFile); +int loadGroupsFromXML (const char * groupsFile); +int restoreFromXML(const char * snapshotFile); +#endif + +int snapshot2XML (PVGroup pg); +void openGroupXMLFile(string fileName); +void closeGroupXMLFile(string fileName); +int group2XML (const char * grpName, string fileName); + +#endif // CAFEXML_H diff --git a/include/caopCodes.h b/include/caopCodes.h new file mode 100644 index 0000000..2514ac4 --- /dev/null +++ b/include/caopCodes.h @@ -0,0 +1,67 @@ +/// +/// \file caopCodes.h +/// \author Jan Chrin, PSI +/// \date Release: April 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CAOPCODES_H +#define CAOPCODES_H + +#include +#include +#include +#include + +/** + * Provides methods to convert between + * the CA_OP_xx and text equivalent + */ +class CAOPCodes { + typedef std::map mapIntString; +private: + mapIntString mapDataType; + mapIntString::iterator pos; +public: + CAOPCodes() { + mapDataType.insert(std::make_pair((int) CA_OP_GET, "CA_OP_GET" )); + mapDataType.insert(std::make_pair((int) CA_OP_PUT, "CA_OP_PUT" )); + mapDataType.insert(std::make_pair((int) CA_OP_CREATE_CHANNEL, "CA_OP_CREATE_CHANNEL" )); + mapDataType.insert(std::make_pair((int) CA_OP_ADD_EVENT, "CA_OP_ADD_EVENT" )); + mapDataType.insert(std::make_pair((int) CA_OP_CLEAR_EVENT, "CA_OP_CLEAR_EVENT" )); + mapDataType.insert(std::make_pair((int) CA_OP_OTHER, "CA_OP_OTHER" )); + mapDataType.insert(std::make_pair((int) CA_OP_CONN_UP, "CA_OP_CONN_UP" )); + mapDataType.insert(std::make_pair((int) CA_OP_CONN_DOWN, "CA_OP_CONN_DOWN" )); + }; + + ~CAOPCodes() {}; + + std::string message (int i) { + + pos = mapDataType.find(i); + if (pos != mapDataType.end()) return pos->second; + return "CAFE_DATATYPE_UNKNOWN"; + }; + + int enumIs (std::string message) { + for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) + if (pos->second==message) return pos->first; + return -1; + }; + + void show() {print();} + + void print ( ) { + std::cout << "------------------" << std::endl; + std::cout << "CA_OP_LIST" << std::endl; + std::cout << "-----------------" << std::endl; + for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) { + std::cout << pos->first << " " << pos->second << std::endl; + } + std::cout << "-----------------" << std::endl; + }; + +}; + + +#endif diff --git a/include/channelRegalia.h b/include/channelRegalia.h new file mode 100644 index 0000000..f7a507a --- /dev/null +++ b/include/channelRegalia.h @@ -0,0 +1,316 @@ +/// +/// \file channelRegalia.h +/// +/// Classes are: +/// ChannelRegalia +/// ChannelRequestMetaData +/// ChannelRequestMetaDataClient +/// ChannelRequestMetaDataRepository +/// ChannelRequestStatus +/// +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CHANNELINFO_H +#define CHANNELINFO_H + +#include +#include +#include +#include + +using namespace std; + +/** + * Struct defining channel properties and connection status for use in Conduit container + * + */ +class ChannelRegalia{ +private: + CAFEStatus cafeStatus; +public: + friend struct change_accessRightsHandlerArgs; + friend struct change_accessRead; + friend struct change_accessWrite; + friend struct change_channelID; + friend struct change_connectionHandlerArgs; + friend struct change_eventHandlerArgs; + //friend struct change_channelRegalia; + //friend class Connect; + friend class HandleHelper; + friend class Conduit; + friend class ConduitGroup; +protected: + chid channelID; // + bool connectFlag; + const char * hostName; + unsigned int nelem; //native + chtype dataType; //native + unsigned short accessRead; //0 or 1 + unsigned short accessWrite; //0 or 1 + dbr_class_name_t className; //dbr_string_t + //connectionState as given by connection_handler args: CA_OP_CONN_UP or CA_OP_CONN_DOWN + int connectionState; //as given by CA_OP_ + int cafeConnectionState; //as given by cafe_cs_state in statusCodes + + //void setChannelID (chid id) {channelID=id;}; + void setConnectFlag (bool c) {connectFlag=c;}; + void setHostName (const char * h) {hostName=h;}; + void setDataType (chtype d) {dataType=d;}; + void setAccessRead (unsigned short r){accessRead=r;}; + void setAccessWrite(unsigned short w){accessWrite=w;}; + void setReadAccess (unsigned short r){accessRead=r;}; + void setWriteAccess(unsigned short w){accessWrite=w;}; + void setNelem (unsigned int n) {nelem=n;}; + void setConnectionState (long cs) {connectionState=cs;}; + void setCafeConnectionState (long ccs) {cafeConnectionState=ccs;}; + +public: + chid getChannelID() const {return channelID;}; + bool getConnectFlag()const {return connectFlag;}; + const char * getHostName() const {return hostName;}; + string getHostNameAsString() {string h= hostName; return h;}; + chtype getDataType() const {return dataType;}; + const char * getClassName() const {return className;}; + string getClassNameAsString() {string c=className; return c;}; + unsigned short getAccessRead() const {return accessRead;}; + unsigned short getAccessWrite()const {return accessWrite;}; + unsigned short getReadAccess() const {return accessRead;}; + unsigned short getWriteAccess()const {return accessWrite;}; + unsigned int getNelem() const {return nelem;}; + int getConnectionState() const {return connectionState;}; + int getCafeConnectionState() const {return cafeConnectionState;}; + string getConnectionStateAsString() { + if(connectionState==CA_OP_CONN_UP){return "CA_OP_CONN_UP";} + else if(connectionState==CA_OP_CONN_DOWN){return "CA_OP_CONN_DOWN"; } + else {return "CA_OP_CONN is UNKNOWN: THIS SHOULD NEVER APPEAR!";}}; + + string getCafeConnectionStateAsString() { + return cafeStatus.csc.message(cafeConnectionState);}; + + ChannelRegalia():channelID((chid) NULL), connectFlag(false), nelem((unsigned int) 1), + dataType((chtype) CAFE_TYPENOTCONN), + accessRead((unsigned short) 0), accessWrite((unsigned short) 0), + connectionState((int) CA_OP_CONN_DOWN), cafeConnectionState((int) ICAFE_CS_NEVER_CONN) + {strcpy(className, ""); hostName="";}; + + ~ChannelRegalia(){}; +}; + + +/** + * Stores strings for Enum datatypes + * + */ +class ChannelEnumStrings{ +public: + friend struct change_eventHandlerArgs; +private: + char options [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]; + short noOptions; +public: + ChannelEnumStrings():noOptions( (short) 0){}; + short getNoOptions() const {return noOptions;}; + char getOptions() const {return options[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE];}; +}; + + +/** + * Stores device/attribute pairing + * + */ +class ChannelDeviceAttribute{ +private: + std::string pv; + std::string device; + std::string attribute; + std::string deliminator; +public: + ChannelDeviceAttribute(){}; + ~ChannelDeviceAttribute(){}; + + int init(std::string _pv, std::string _deliminator) + { + pv=_pv; + deliminator=_deliminator; + short posOfSeparator=pv.find_first_of(deliminator); + if (posOfSeparator<0){ + device=""; + attribute=""; + return ECAFE_DEVICE_ATTRIB_NOT_FOUND; + } + else { + device= pv.substr(0,posOfSeparator); + attribute=pv.substr(posOfSeparator+1,pv.size()); + } + return ICAFE_NORMAL; + }; + + const char * getDeliminator() const {return deliminator.c_str();}; + const char * getDevice() const {return device.c_str();}; + const char * getAttribute() const {return attribute.c_str();}; + const char * getAttrib() const {return attribute.c_str();}; + std::string getDeliminatorAsString() const {return deliminator;}; + std::string getDeviceAsString() const {return device;}; + std::string getAttributeAsString() const {return attribute;}; +}; + + +/** + * 0. Struct defining channel datatype/nelem executed by CAFE for use in Conduit container + * + */ +class ChannelRequestMetaData{ +public: + friend struct change_connectionHandlerArgs; + friend struct change_dataBufferSize_CTRL; + friend struct change_dataBufferSize_TIME; + friend struct change_dataBufferSize_PRIMITIVE; + friend struct change_dataBufferSize_STSACK; + friend struct change_eventHandlerArgs; + + friend struct copy_channelRequestMetaDataToChannelRequestMetaDataRepository; + + friend class Conduit; + friend class ConduitGroup; + +protected: + chid channelID; //of requested item + unsigned int nelem; //depends on Policy + unsigned int nelemCache; //nelem To Retrieve From Cache + chtype dataType; //depends on Policy + chtype dbrDataType; //depends on Policy + CAFENUM::DBR_TYPE cafeDbrType; + void * usrArg; //from Conduit.usrArg + unsigned int byteSize; //data buffer (bytes) must be large enough to store data + unsigned int offset; + +public: + void setNelem(unsigned int n){nelem= n > 0 ? n : 1; + //nelemCache= nelem > nelemCache ? nelemCache : nelem; + }; // byteSize=dbr_size_n(dbrDataType,nelem); }; + void setNelemCache(unsigned int n){nelemCache= n > 0 ? n : 1;} + void setUsrArg(void * u){usrArg=u;}; + void setDataType(chtype d){dataType=d;}; + void setDbrDataType(chtype dbr){dbrDataType=dbr; }; //byteSize=dbr_size_n(dbrDataType,nelem);}; + void setCafeDbrType(CAFENUM::DBR_TYPE cd){cafeDbrType=cd;}; + void setDbrTypesFromCafeDbrType(CAFENUM::DBR_TYPE cd){ + cafeDbrType=cd; + switch(cafeDbrType) + { + case CAFENUM::DBR_TIME: + dbrDataType = dbf_type_to_DBR_TIME(dataType); + break; + case CAFENUM::DBR_STS: + dbrDataType = dbf_type_to_DBR_STS(dataType); + break; + case CAFENUM::DBR_PRIMITIVE: + dbrDataType = dbf_type_to_DBR(dataType); + break; + default: + //Print Warning Message? + dbrDataType = dbf_type_to_DBR_TIME(dataType); + cafeDbrType = CAFENUM::DBR_TIME; + break; + } + }; + + + void setByteSize(unsigned int b){ byteSize=b;}; + + unsigned int getNelem() const{return nelem;}; + unsigned int getNelemCache() const{return nelemCache;}; + void * getUsrArg() const{return usrArg;}; + chtype getDataType() const { return dataType;}; + chtype getDbrDataType() const { return dbrDataType;}; + CAFENUM::DBR_TYPE getCafeDbrType() const {return cafeDbrType;}; + + unsigned int getByteSize() const {return byteSize;}; + + void setOffset(unsigned int o) {offset=o;}; + unsigned int getOffset() const {return offset;}; + + //Constructors + ChannelRequestMetaData():channelID((chid) NULL), nelem((unsigned int) 1), nelemCache((unsigned int) 1), + dataType((chtype) DBF_NO_ACCESS), dbrDataType((chtype) TYPENOTCONN), // + cafeDbrType( (CAFENUM::DBR_TYPE) NULL), + usrArg((void *) NULL), byteSize((unsigned int) 0), offset((unsigned int) 0){ + + }; //CAStatus((long) ECA_NORMAL){}; + + ~ChannelRequestMetaData(){}; +}; + + +/** + * -1. Struct defining channel datatype/nelem requested by client for use in Conduit container + * + */ +class ChannelRequestMetaDataClient: public ChannelRequestMetaData{ +public: + +//protected: + //unsigned int offset; +public: + //void setOffset(unsigned int o) {offset=o;}; + //unsigned int getOffset() const {return offset;}; + + //Constructors + ChannelRequestMetaDataClient(){};//:offset((unsigned int) 0){}; + ~ChannelRequestMetaDataClient(){}; +}; + + +/** + * Gives status of the Request message \n + * messageStatus = requestStatus if requestStatus != ECA_NORMAL else \n + * messageStatus = requestStatus or messageStatus=callbackStatus (if policy WITH_CALLBACK) + * + */ +class ChannelRequestStatus{ + +private: + int preRequestStatus; // current status of channel + int requestStatus; // from get/put operation + int pendStatus; // from pend_io operation + int callbackStatus; // used by CAFE::waitForEvent() to record status of callback + int messageStatus; // overall status + CAFENUM::StatusMessageKind messageKind; // statusMessageKind indicating method status occuping overall messageStatus + + bool hasCallbackInitiated; + bool hasCallbackTriggered; + CAFENUM::CallbackProgressKind callbackProgressKind; + +public: + int getPreRequestStatus() const {return preRequestStatus;}; + int getRequestStatus() const {return requestStatus;}; + int getPendStatus() const {return pendStatus;}; + int getCallbackStatus() const {return callbackStatus;}; + int getMessageStatus() const {return messageStatus;}; + CAFENUM::StatusMessageKind getMessageKind() const {return messageKind;}; + CAFENUM::CallbackProgressKind getCallbackProgressKind() const {return callbackProgressKind;}; + + void setPreRequestStatus (int s) {preRequestStatus=s; messageStatus=s; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::PRE_REQUEST;}; + void setRequestStatus (int r) {requestStatus = r; messageStatus=r; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_REQUEST;}; + void setPendStatus (int p) {pendStatus = p; messageStatus=p; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_PEND;}; + void setCallbackStatus (int c) {callbackStatus= c; messageStatus=c; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_CALLBACK;}; + void setCallbackKind (bool hasInit, bool hasTrig) { + hasCallbackInitiated=hasInit; hasCallbackTriggered=hasTrig; + if ( hasInit && !hasTrig) {callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::PENDING;} + else if (!hasInit && hasTrig) {callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::COMPLETE;} + else if (!hasInit && !hasTrig) {callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::NOT_INITIATED;} + else {std::cout << "CAFE INTERNAL POLICY ERROR" << std::endl; + std::cout << "ChannelRequestStatus::setCallbackKind gives an INVALID callbackProgressKind" << endl;} + }; + //void setMessageStatus (long mstatus) {messageStatus = mstatus;}; + // void setMessageKind (StatusMessageKind mkind) { if (mkind<=CAFENUM::FROM_CALLBACK && mkind >= CAFENUM::PRE_REQUEST) + // {messageKind = mkind;} else {cout<< mkind << " is an invalid statusMessageKind!" << endl;}}; + + ChannelRequestStatus():preRequestStatus(ICAFE_CS_NEVER_CONN),requestStatus(ICAFE_CS_NEVER_CONN),pendStatus(ICAFE_CS_NEVER_CONN), + callbackStatus(ICAFE_CS_NEVER_CONN),messageStatus(ICAFE_CS_NEVER_CONN),messageKind((CAFENUM::StatusMessageKind) CAFENUM::NO_MESSAGE), + hasCallbackInitiated(false),hasCallbackTriggered(false),callbackProgressKind((CAFENUM::CallbackProgressKind) CAFENUM::NOT_INITIATED){}; +}; + +#endif // CHANNELINFO_H diff --git a/include/conduit.h b/include/conduit.h new file mode 100644 index 0000000..d111b92 --- /dev/null +++ b/include/conduit.h @@ -0,0 +1,361 @@ +/// +/// \file conduit.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CONDUIT_H +#define CONDUIT_H + +#include +#include +#include +#include + + +#include +#include +#include +#include + + +#if HAVE_PYTHON_H + + #if HAVE_PYCAFE_EXT + #include //required for PyCafe.h + #include + #else + #include + #endif + +#endif + + +/** + * Principal constructor has:\n + * \param _pv process variable + * \param _ccc ca_client_context + */ +class Conduit +{ +public: + friend struct change_alarmStatus; + friend struct change_alarmSeverity; + friend struct change_epicsTimeStamp; + + friend struct change_accessRightsHandlerArgs; + friend struct change_accessRead; + friend struct change_accessWrite; + friend struct change_channelDeviceAttribute; + friend struct change_channelID; + friend struct change_channelRegalia; + + friend struct change_channelGetCacheWaitPolicy; + friend struct change_channelGetActionWhenMonitorPolicy; + + friend struct change_channelRequestDataTypePolicy; + + friend struct change_channelRequestMetaCtrl; + friend struct change_channelRequestMetaCtrlClient; + + friend struct change_channelRequestMetaData; + friend struct change_channelRequestMetaDataClient; + + friend struct change_channelRequestMetaPrimitive; + + friend struct change_channelRequestPolicyPut; + friend struct change_channelRequestStatusPut; + + friend struct change_channelRequestPolicyGet; + friend struct change_channelRequestStatusGet; + + friend struct change_channelRequestPolicyGetCtrl; + friend struct change_channelRequestStatusGetCtrl; + + friend struct change_channelRequestStatusGetSTSACK; + friend struct change_channelRequestStatusGetClassName; + + friend struct change_channelTimeoutPolicyGet; + friend struct change_channelTimeoutPolicyPut; + + friend struct change_connectionHandlerArgs; + + friend struct change_dataBufferSize_PRIMITIVE; + friend struct change_dataBufferSize_TIME; + friend struct change_dataBufferSize_CTRL; + friend struct change_dataBufferSize_STSACK; + + //friend struct change_dataBufferPVCtrlHolder; + //friend struct change_dataBufferPVDataHolder; + friend struct change_eventHandlerArgs; + friend struct change_hasNewData; + friend struct change_monitorAction; + friend struct change_monitorActionClear; + friend struct change_monitorActionErase; + friend struct change_monitorPolicyErase; + friend struct change_monitorPolicyInsert; + + friend struct change_monitorPolicyInWaitingErase; + friend struct change_monitorPolicyInWaitingInsert; + + //friend struct change_rule; + + friend struct change_pvAlias; + friend struct change_status; + + friend struct change_usrArgs; + + friend struct free_dataBuffers; + + friend class Connect; + friend class CAFE; + friend class Granules; + friend class ChannelCreatePolicy; + friend class ConduitGroup; + friend class MonitorPolicy; + + //friend void CAFE_CALLBACK::PyHandlerPut; + //friend void CAFE_CALLBACK::PyHandlerGet; + //friend struct change_pyCafeFlag; + +private: + //from alarmString.h + const char * epicsAlarmSeverityStrings[ALARM_SEVERITY_STRING_LENGTH]; + const char * epicsAlarmConditionStrings[ALARM_STATUS_STRING_LENGTH]; + + static unsigned int handleNext; + + ca_client_context * ccc; + + union db_access_val * dataBuffer; + union db_access_val * ctrlBuffer; + union db_access_val * putBuffer; + union db_access_val * stsackBuffer; + + short alarmStatus; + short alarmSeverity; + epicsTimeStamp ts; + + void * usrArgs; //Filled in conduitEventHandlerArgs.h; used by getUsrArgsAsUInt in CyCafe + + chtype dataType; + chtype dbrDataType; + CAFENUM::DBR_TYPE cafeDbrType; + + //Reserved + unsigned int beamEventNo; + + //bool rule; + bool pyCafeFlag; + + std::string deviceAttributeDeliminator; + ChannelDeviceAttribute channelDeviceAttribute; + + //PVCtrlHolder pvc; + //PVDataHolder pvd; + + ChannelEnumStrings channelEnumStrings; + + //ChannelPolicies + + ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy; + ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy; + + ChannelRequestDataTypePolicy channelRequestDataTypePolicy; + + ChannelRequestPolicy channelRequestPolicyPut; + ChannelRequestStatus channelRequestStatusPut; + + ChannelRequestPolicy channelRequestPolicyGet; //DATA + ChannelRequestStatus channelRequestStatusGet; //DATA + + ChannelRequestPolicy channelRequestPolicyGetCtrl; //CTRL + ChannelRequestStatus channelRequestStatusGetCtrl; //CTRL + + ChannelRequestStatus channelRequestStatusGetSTSACK; //STSACK + ChannelRequestStatus channelRequestStatusGetClassName;//ClassName + + ChannelTimeoutPolicy channelTimeoutPolicyGet; + ChannelTimeoutPolicy channelTimeoutPolicyPut; + + ChannelRegalia channelRegalia; + + ChannelRequestMetaData channelRequestMetaData; //0 container for actual send + ChannelRequestMetaDataClient channelRequestMetaDataClient; //-1 //DATA + //ChannelRequestMetaDataRepository channelRequestMetaDataRepository; // (CAFENUM::DBR_TYPE DBR_TIME) ; //1 + + ChannelRequestMetaData channelRequestMetaCtrl; //0 container for actual send + ChannelRequestMetaDataClient channelRequestMetaCtrlClient; //-1 //CTRL + //ChannelRequestMetaDataRepository channelRequestMetaCtrlRepository; // (CAFENUM::DBR_TYPE DBR_CTRL); //1 + + ChannelRequestMetaData channelRequestMetaSTSACK;// (CAFENUM::DBR_TYPE DBR_STSACK);//1 + ChannelRequestMetaData channelRequestMetaPrimitive; //Put operations + + #if HAVE_PYTHON_H + void * PyEventHandler() const; + void * PyEventHandler(unsigned int) const; + void * PyDataEventHandler() const; + void * PyCtrlEventHandler() const; + #endif + + int putWithCallback(pCallback callbackHandlerPut) const; + + int put(void) const; + int get(void) const; + int getWithCallback(pCallback) const; + int getCtrl(void) const; + int getCtrlWithCallback(pCallback) const; + int getSTSACKWithCallback(pCallback) const; + int getClassNameWithCallback(pCallback) const; + + //Monitor Policies + //map emp; + //map::iterator iemp; + //map lump; + //map::iterator ilump; + + ////MonitorPolicy mpBase; + vector mpV; + vector mpInWaitingV; + + int monitorStart(MonitorPolicy &mp) const; + int monitorStop(evid eventID) const; + + vector monitorAction; + + bool hasNewData; // used by HandleHelper.getMonitorAction(); + +public: + #if HAVE_PYTHON_H + void * PyGetHandler() const; + void * PyPutHandler() const; + #endif + + Conduit(void ); + + Conduit(const char * _pv, ca_client_context *_ccc, + ChannelRequestPolicy _channelRequestPolicyPut, ChannelRequestPolicy _channelRequestPolicyGet, + ChannelGetActionWhenMonitorPolicy _channelGetActionWhenMonitorPolicy, + bool _pyCafeFlag); + + //Conduit(const char * _pv, ca_client_context *_ccc, bool _pyCafeFlag); + //Conduit(const char * _pv, ca_client_context *_ccc); + virtual ~Conduit(); + unsigned int groupHandle; // Group handle this pv handle belongs to!! + unsigned int handle; + + chid channelID; + //evid eventID; + + std::string pv; + std::string pvAlias; + + int status; + + friend std::ostream& operator<<(std::ostream& os, const Conduit& e) + { + os<< "handle=" << e.handle<<" pv=" << e.pv<< std::endl; + return os; + }; + + bool getPyCafe() const {return pyCafeFlag;}; + + bool operator<(const Conduit& c)const{return handle-1 && alarmStatus-1 && alarmSeverity getMonitorPolicyVector(void) const {return mpV;}; + vector getMonitorPolicyInWaitingVector(void) const {return mpInWaitingV;}; + + vector getMonitorAction(void) const {return monitorAction;}; + bool getHasNewData(void) const {return hasNewData;}; +}; + +#endif // CONDUIT_H diff --git a/include/conduitConnectionHandlerArgs.h b/include/conduitConnectionHandlerArgs.h new file mode 100644 index 0000000..9f499c0 --- /dev/null +++ b/include/conduitConnectionHandlerArgs.h @@ -0,0 +1,488 @@ +/// +/// \file conduitConnectionHandlerArgs.h +/// \author Jan Chrin, PSI +/// \date November 2014 +/// \version CAFE 1.0.0 +/// + +#ifndef CONDUITCONNECTIONHANDLERARGS_H +#define CONDUITCONNECTIONHANDLERARGS_H + +#include +#include +#include + +using namespace std; + +/** + * Friend to Conduit/CAFEGroup records the connection_handler_args struct from callback fns + * in hash table + */ +struct change_connectionHandlerArgs +{ +#define __METHOD__ "change_connectionHandlerArgs" + change_connectionHandlerArgs (const struct connection_handler_args & new_connectionHandlerArgs): + new_connectionHandlerArgs(new_connectionHandlerArgs){} + + void operator() (Conduit& c) { + + chtype nativeDataType = ca_field_type(new_connectionHandlerArgs.chid); + + c.channelRegalia.connectionState=new_connectionHandlerArgs.op; + + // Data type code will be one of DBF_. The constant TYPENOTCONN=-1 is + // returned if the channel is not connected + // but we do not overwrite it upon disconnect. + + //connectFlag + if (new_connectionHandlerArgs.op == CA_OP_CONN_UP){ + + //cout << " change_connectionHandlerArgs: bytesize UP " << c.channelRequestMetaData.byteSize << endl; + //channelRegalia + c.channelRegalia.nelem = ca_element_count(new_connectionHandlerArgs.chid); + c.channelRegalia.connectFlag = true; + c.channelRegalia.hostName = (const char *) ca_host_name (new_connectionHandlerArgs.chid); + + if (c.channelRegalia.channelID != new_connectionHandlerArgs.chid) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE WARNING for handle : " << c.handle << endl; + cout << "Channel ID has changed from " << c.channelRegalia.channelID + << " to " << new_connectionHandlerArgs.chid << " " << endl; + cout << "This is a rare occurence and happens when the ca message buffer " << endl; + cout << "is flushed ahead of schedule (does that when full) and this callback is " << endl; + cout << "consequently activated before channel ID is written to the hash table " << endl; + c.channelRegalia.channelID = new_connectionHandlerArgs.chid; + } + + + //Data type code will be one of DBF_. The constant TYPENOTCONN=-1 is + //returned if the channel is not connected. + //Does not get overwritten on channel disconnection + c.channelRegalia.dataType = nativeDataType; + + + // DATA BUFFER ------------------------------------------------------------------ + // data buffer CLIENT + // Check if c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN or not! + + + if (c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN ) { + c.channelRequestMetaDataClient.channelID = new_connectionHandlerArgs.chid; + c.channelRequestMetaDataClient.nelem = c.channelRegalia.nelem; + c.channelRequestMetaDataClient.nelemCache = c.channelRegalia.nelem; + c.channelRequestMetaDataClient.dataType = nativeDataType; + + //cafeDbrType first filled with CAFENUM:DBR_TIME on initialization + //but will be overwritten by whatever the client needs + switch (c.channelRequestMetaDataClient.cafeDbrType) + { + case CAFENUM::DBR_TIME: + c.channelRequestMetaDataClient.dbrDataType = dbf_type_to_DBR_TIME(nativeDataType); + break; + case CAFENUM::DBR_STS: + c.channelRequestMetaDataClient.dbrDataType = dbf_type_to_DBR_STS(nativeDataType); + break; + case CAFENUM::DBR_PRIMITIVE: + c.channelRequestMetaDataClient.dbrDataType = dbf_type_to_DBR(nativeDataType); + break; + default: + c.channelRequestMetaDataClient.dbrDataType = dbf_type_to_DBR_TIME(nativeDataType); + c.channelRequestMetaDataClient.cafeDbrType = CAFENUM::DBR_TIME; + break; + } + + //What client is actutally requesting + c.channelRequestMetaDataClient.byteSize=dbr_size_n( + c.channelRequestMetaDataClient.dbrDataType, + //dbf_type_to_DBR_TIME(nativeDataType), + c.channelRequestMetaDataClient.nelem); + } + + //data Buffer requested by Cafe + c.channelRequestMetaData.channelID = new_connectionHandlerArgs.chid; + c.channelRequestMetaData.nelem = c.channelRegalia.nelem; + c.channelRequestMetaData.nelemCache = c.channelRegalia.nelem; + c.channelRequestMetaData.dataType = nativeDataType; + + //cafeDbrType first filled with CAFENUM:DBR_TIME on initialization + //cafeDbrType can only be overwritten by an explicit method invocation + switch (c.channelRequestMetaData.cafeDbrType) + { + case CAFENUM::DBR_TIME: + c.channelRequestMetaData.dbrDataType = dbf_type_to_DBR_TIME(nativeDataType); + break; + case CAFENUM::DBR_STS: + c.channelRequestMetaData.dbrDataType = dbf_type_to_DBR_STS(nativeDataType); + break; + case CAFENUM::DBR_PRIMITIVE: + c.channelRequestMetaData.dbrDataType = dbf_type_to_DBR(nativeDataType); + break; + default: + c.channelRequestMetaData.dbrDataType = dbf_type_to_DBR_TIME(nativeDataType); + c.channelRequestMetaData.cafeDbrType = CAFENUM::DBR_TIME; + break; + } + + + + // CTRL BUFFER ------------------------------------------------------------------ + + //No of elements for Ctrl Buffers + unsigned int nelem_ctrl_buffer=1; + + if ( c.channelRegalia.nelem > MAX_NELEM_FOR_CTRL_BUFFER) { + nelem_ctrl_buffer = DEFAULT_NELEM_FOR_CTRL_BUFFER; + } + else { + nelem_ctrl_buffer = c.channelRegalia.nelem; + } + + //ctrl data CLIENT + //Ctrl data requested by Client + if (c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN ) { + c.channelRequestMetaCtrlClient.channelID = new_connectionHandlerArgs.chid; + c.channelRequestMetaCtrlClient.nelem = c.channelRegalia.nelem; //nelem_ctrl_buffer; + c.channelRequestMetaCtrlClient.nelemCache = c.channelRegalia.nelem; + c.channelRequestMetaCtrlClient.dataType = nativeDataType; + + //cafeDbrType first filled with CAFENUM:DBR_CTRL on initialization + //but will be overwritten by whatever the client needs + switch (c.channelRequestMetaCtrlClient.cafeDbrType) + { + case CAFENUM::DBR_CTRL: + c.channelRequestMetaCtrlClient.dbrDataType = dbf_type_to_DBR_CTRL(nativeDataType); + break; + case CAFENUM::DBR_GR: + c.channelRequestMetaCtrlClient.dbrDataType = dbf_type_to_DBR_GR (nativeDataType); + break; + default: + c.channelRequestMetaCtrlClient.dbrDataType = dbf_type_to_DBR_CTRL(nativeDataType); + c.channelRequestMetaCtrlClient.cafeDbrType = CAFENUM::DBR_CTRL; + break; + } + + c.channelRequestMetaCtrlClient.byteSize=dbr_size_n( + c.channelRequestMetaCtrlClient.dbrDataType,c.channelRequestMetaCtrlClient.nelem); + } + + //ctrl Data requested by Cafe + c.channelRequestMetaCtrl.channelID = new_connectionHandlerArgs.chid; + c.channelRequestMetaCtrl.nelem = nelem_ctrl_buffer; + c.channelRequestMetaCtrl.nelemCache = nelem_ctrl_buffer; + c.channelRequestMetaCtrl.dataType = nativeDataType; + //cafeDbrType first filled with CAFENUM:DBR_CTRL on initialization + //cafeDbrType can only be overwritten by an explicit method invocation + switch (c.channelRequestMetaCtrl.cafeDbrType) + { + case CAFENUM::DBR_CTRL: + c.channelRequestMetaCtrl.dbrDataType = dbf_type_to_DBR_CTRL(nativeDataType); + break; + case CAFENUM::DBR_GR: + c.channelRequestMetaCtrl.dbrDataType = dbf_type_to_DBR_GR (nativeDataType); + break; + default: + c.channelRequestMetaCtrl.dbrDataType = dbf_type_to_DBR_CTRL(nativeDataType); + c.channelRequestMetaCtrl.cafeDbrType = CAFENUM::DBR_CTRL; + break; + } + + // STSACK BUFFER ------------------------------------------------------------------ + + //No of elements for STSACK Buffers + unsigned int nelem_stsack_buffer; + + if ( c.channelRegalia.nelem > MAX_NELEM_FOR_STSACK_BUFFER) { + nelem_stsack_buffer = DEFAULT_NELEM_FOR_STSACK_BUFFER; + } + else { + nelem_stsack_buffer = c.channelRegalia.nelem; + } + + + //STSACK Buffer Repository + c.channelRequestMetaSTSACK.channelID = new_connectionHandlerArgs.chid; + c.channelRequestMetaSTSACK.nelem = nelem_stsack_buffer; + c.channelRequestMetaSTSACK.nelemCache = nelem_stsack_buffer; + c.channelRequestMetaSTSACK.dataType = DBR_STRING; + c.channelRequestMetaSTSACK.dbrDataType = DBR_STSACK_STRING; + c.channelRequestMetaSTSACK.cafeDbrType = CAFENUM::DBR_STSACK; + + + //PRIMITIVE Buffer Repository + c.channelRequestMetaPrimitive.channelID = new_connectionHandlerArgs.chid; + c.channelRequestMetaPrimitive.nelem = c.channelRegalia.nelem; + c.channelRequestMetaPrimitive.dataType = nativeDataType;; + c.channelRequestMetaPrimitive.dbrDataType= dbf_type_to_DBR(nativeDataType); + c.channelRequestMetaPrimitive.cafeDbrType= CAFENUM::DBR_PRIMITIVE; + + /////////////////////////////////////////////////////////////////////////// + + + if ( c.channelRegalia.nelem>1) { + double tout= ((unsigned int) (c.channelRegalia.nelem*0.000001)); // 1 sec per million + c.channelRequestDataTypePolicy.setRequestKind(CAFENUM::LOWEST_DATATYPE); + c.channelTimeoutPolicyGet.setTimeout(std::max(DEFAULT_TIMEOUT_PEND_IO_WF , tout)); + c.channelTimeoutPolicyPut.setTimeout(std::max(DEFAULT_TIMEOUT_PEND_IO_WF , tout)); + c.channelTimeoutPolicyGet.setDefaultTimeout(DEFAULT_TIMEOUT_PEND_IO_WF); + c.channelTimeoutPolicyPut.setDefaultTimeout(DEFAULT_TIMEOUT_PEND_IO_WF); + } + + c.channelRegalia.cafeConnectionState = ICAFE_CS_CONN; + c.status = ICAFE_CA_OP_CONN_UP; + } + else { + + //nativeType not known on disconnect!! + + //Also callback done + c.channelRequestStatusGet.setCallbackKind(false, true); //fake completion + c.channelRequestStatusPut.setCallbackKind(false, true); //fake completion + c.channelRegalia.cafeConnectionState =ICAFE_CS_DISCONN; + c.channelRegalia.connectFlag = false; + c.status = ICAFE_CA_OP_CONN_DOWN; + } + + + } + +private: + connection_handler_args new_connectionHandlerArgs; +#undef __METHOD__ +}; + + +/** + * Friend to Conduit/CAFEGroup permitting fast modification to the ctrlBuffer + * This is the ctrlBuffer for _CTRL data requested through ca_get + */ +struct change_dataBufferSize_CTRL +{ +#define __METHOD__ "change_dataBufferSize_CTRL" + change_dataBufferSize_CTRL (const chtype & new_ctrlTypeBuffer): new_ctrlTypeBuffer(new_ctrlTypeBuffer){} + + void operator() (Conduit& c) { + + // Free buffer on re-connection + // Check Byte size first!!! + + bool allocateMemory=false ; + + if(c.ctrlBuffer==NULL) { + allocateMemory=true; + } + + else if ( dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) > c.channelRequestMetaCtrl.getByteSize() ) { + cout << "ctrlBuffer already exists= " << c.ctrlBuffer << " for channel " << c.pv + << " with handle " << c.handle << endl; + cout << "Freeing and reallocating ctrlBuffer" << endl; + free(c.ctrlBuffer); + allocateMemory=true; + } + + if (allocateMemory) { + //cout << "sizeof c.ctrlBuffer " << dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) << endl; + c.ctrlBuffer = (db_access_val *) malloc ( dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) ); + c.channelRequestMetaCtrl.byteSize=dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()); + } + + + if (c.ctrlBuffer==0){ + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID)); + printf ("Exiting CAFE"); + } + +} + +private: + chtype new_ctrlTypeBuffer; +#undef __METHOD__ +}; + + +/** + * Friend to CAFEConduit/CAFEGroup permitting fast modification to the dataBuffer of type DBR (putBuffer) + * This is used in ca_put methods when input data that is not already in native data type is thus converted + */ +struct change_dataBufferSize_PRIMITIVE +{ +#define __METHOD__ "change_dataBufferSize_PRIMITIVE" + change_dataBufferSize_PRIMITIVE (const chtype & new_dataTypeBufferNative): new_dataTypeBufferNative(new_dataTypeBufferNative){} + + void operator() (Conduit& c) { + + bool allocateMemory=false ; + + if(c.putBuffer==NULL) { + allocateMemory=true; + } + else if ( dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(), + c.channelRequestMetaPrimitive.getNelem()) + > c.channelRequestMetaPrimitive.getByteSize() ) { + cout << "putBuffer already exists= " << c.putBuffer << " for channel " << c.pv + << " with handle " << c.handle << endl; + cout << "Freeing and reallocating putBuffer" << endl; + free(c.putBuffer); + allocateMemory=true; + } + + if (allocateMemory) { + //cout << "sizeof c.putBuffer " << dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(), + // c.channelRequestMetaPrimitive.getNelem()) << endl; + c.putBuffer = (db_access_val *) malloc (dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(), + c.channelRequestMetaPrimitive.getNelem())); + + c.channelRequestMetaPrimitive.byteSize + =dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(), + c.channelRequestMetaPrimitive.getNelem()); + } + + if (c.putBuffer==0){ + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID)); + printf ("Exiting CAFE"); + exit(0); + } + + } + +private: + chtype new_dataTypeBufferNative; +#undef __METHOD__ +}; + + + +/** + * Friend to CAFEConduit/CAFEGroup permitting fast modification to the ctrlBuffer + * This is the ctrlBuffer for _CTRL data requested through ca_get + */ +struct change_dataBufferSize_STSACK +{ +#define __METHOD__ "change_dataBufferSize_STSACK" + change_dataBufferSize_STSACK (){} + + void operator() (Conduit& c) { + + bool allocateMemory=false ; + + if(c.stsackBuffer==NULL) { + + allocateMemory=true; + } + + else if ( dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(), + c.channelRequestMetaSTSACK.getNelem()) + > c.channelRequestMetaSTSACK.getByteSize() ) { + cout << "stsackBuffer already exists= " << c.stsackBuffer << " for channel " << c.pv + << " with handle " << c.handle << endl; + cout << "Freeing and reallocating putBuffer" << endl; + free(c.stsackBuffer); + allocateMemory=true; + } + + if (allocateMemory) { + //cout << "sizeof c.stsackBuffer " << dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(), + // c.channelRequestMetaSTSACK.getNelem()) << endl; + c.stsackBuffer = (db_access_val *) malloc (dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(), + c.channelRequestMetaSTSACK.getNelem())); + + c.channelRequestMetaSTSACK.byteSize + =dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(), + c.channelRequestMetaSTSACK.getNelem()); + } + +} +#undef __METHOD__ +}; + + +/** + * Friend to CAFEConduit/CAFEGroup permitting fast modification to the dataBuffer of type DBR_TIME (dataBuffer) + * This is the main dataBuffer for data requested through ca_get + */ +struct change_dataBufferSize_TIME +{ +#define __METHOD__ "change_dataBufferSize_PRIMITIVE" + + change_dataBufferSize_TIME (const chtype & new_dataTypeBuffer): new_dataTypeBuffer(new_dataTypeBuffer){} + + void operator() (Conduit& c) { + + // Free buffer on re-connection + // Check Byte size first!!! + + bool allocateMemory=false ; + + + if(c.dataBuffer==NULL) { + + allocateMemory=true; + } + + else if ( dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) > c.channelRequestMetaData.getByteSize() ) { + cout << "dataBuffer already exists= " << c.dataBuffer << " for channel " << c.pv + << " with handle " << c.handle << endl; + cout << "Freeing and reallocating dataBuffer" << endl; + + cout << dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) << " VERSUS " + << c.channelRequestMetaData.getByteSize() << endl; + free(c.dataBuffer); + allocateMemory=true; + + } + + if (allocateMemory) { + //cout << "sizeof c.dataBuffer " << dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) << endl; + c.dataBuffer = (db_access_val *) malloc ( dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) ); + c.channelRequestMetaData.byteSize=dbr_size_n(new_dataTypeBuffer,c.channelRequestMetaData.getNelem()); + + } + + if (c.dataBuffer==NULL){ + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID)); + printf ("Exiting CAFE"); + + exit(0); + } + } + +private: + chtype new_dataTypeBuffer; +#undef __METHOD__ +}; + + +/** + * Friend to CAFEConduit/CAFEGroup - releases resources + */ +struct free_dataBuffers +{ + free_dataBuffers (){} + + void operator() (Conduit& c) { + + //cout << "c.handle=" << c.handle << " " << c.pv << endl; + + if(c.dataBuffer) { + free(c.dataBuffer); // _TIME data buffer for ca_get + } + + if(c.ctrlBuffer) { + free(c.ctrlBuffer); // _CTRL data buffer for ca_get + } + + if(c.stsackBuffer) { + free(c.stsackBuffer); // _STSACK_STRING data buffer for ca_get + } + + if(c.putBuffer) { + free(c.putBuffer); // data buffer for ca_put + } + + } +}; + + +#endif // CONDUITCONNECTIONHANDLERARGS_H diff --git a/include/conduitEventHandlerArgs.h b/include/conduitEventHandlerArgs.h new file mode 100644 index 0000000..da78127 --- /dev/null +++ b/include/conduitEventHandlerArgs.h @@ -0,0 +1,1190 @@ +/// +/// \file conduitEventHandlerArgs.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CONDUITEVENTHANDLERARGS_H +#define CONDUITEVENTHANDLERARGS_H + +#include +#include +#include + + +/** + * Friend to Conduit/CAFEGroup permitting the event_handler_args.dbr data from callback fn + * to be recorded in hash table + */ +struct change_eventHandlerArgs +{ +#define __METHOD__ "change_eventHandlerArgs" + change_eventHandlerArgs (const struct event_handler_args & new_eventHandlerArgs) : + new_eventHandlerArgs(new_eventHandlerArgs){} + + void operator() (Conduit& c) { + + + + c.status= new_eventHandlerArgs.status; + if(c.status!=ECA_NORMAL) return; + + Helper helper; + + chtype requestedT= new_eventHandlerArgs.type%DBR_STS_STRING; + chtype bufferType= new_eventHandlerArgs.type; //default + //Fill with what actually came back! + //Let is do comparison! + CAFENUM::DBR_TYPE dbrTypeClass=helper.convertToCAFEDbrTypeClass(new_eventHandlerArgs.type); + + + + c.usrArgs = new_eventHandlerArgs.usr; + c.dataType= requestedT; + c.dbrDataType= bufferType; + c.cafeDbrType= dbrTypeClass; + + c.hasNewData=true; //flag used by getMonitorAction for CAFE extensions! + + + if (new_eventHandlerArgs.type < DBR_GR_STRING) { + bufferType = dbf_type_to_DBR_TIME(requestedT); + } + else if (new_eventHandlerArgs.type < DBR_PUT_ACKT) { + bufferType = dbf_type_to_DBR_CTRL(requestedT); + } + else if (new_eventHandlerArgs.type < (LAST_BUFFER_TYPE+1)) { + // keep default + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY: UNKNOWN event_handler_args.type= " + << new_eventHandlerArgs.type << endl; + } + + // A safety check that the buffer size is indeed large enough to hold the data + + unsigned int nrequired = dbr_size_n(bufferType, new_eventHandlerArgs.count); + unsigned int navailable = nrequired; + + + + switch(dbrTypeClass) + { + case CAFENUM::DBR_STSACK: + navailable = c.channelRequestMetaSTSACK.byteSize; + c.channelRequestMetaSTSACK.nelem = new_eventHandlerArgs.count; + c.channelRequestMetaSTSACK.dataType = requestedT; + c.channelRequestMetaSTSACK.dbrDataType = new_eventHandlerArgs.type; + c.channelRequestMetaSTSACK.cafeDbrType = dbrTypeClass; + c.channelRequestMetaSTSACK.usrArg = new_eventHandlerArgs.usr; //c.channelRequestMetaDataClient.usrArg; + break; + case CAFENUM::DBR_PRIMITIVE: + case CAFENUM::DBR_STS: + case CAFENUM::DBR_TIME: + navailable = c.channelRequestMetaData.byteSize; // + + + + c.channelRequestMetaData.nelem = new_eventHandlerArgs.count; + c.channelRequestMetaData.dataType = requestedT; + c.channelRequestMetaData.dbrDataType = new_eventHandlerArgs.type; + c.channelRequestMetaData.cafeDbrType = dbrTypeClass; + c.channelRequestMetaData.usrArg = new_eventHandlerArgs.usr; //c.channelRequestMetaDataClient.usrArg; + + //Do this check here already + if (nrequired > navailable) { + c.channelRequestMetaData.byteSize = nrequired; + + } + break; + case CAFENUM::DBR_GR: + case CAFENUM::DBR_CTRL: + navailable = c.channelRequestMetaCtrl.byteSize; + c.channelRequestMetaCtrl.nelem = new_eventHandlerArgs.count; + c.channelRequestMetaCtrl.dataType = requestedT; + c.channelRequestMetaCtrl.dbrDataType = new_eventHandlerArgs.type; + c.channelRequestMetaCtrl.cafeDbrType = dbrTypeClass; + c.channelRequestMetaCtrl.usrArg = new_eventHandlerArgs.usr; //c.channelRequestMetaDataClient.usrArg; + if (nrequired > navailable) { + c.channelRequestMetaCtrl.byteSize = nrequired; + } + break; + case CAFENUM::DBR_CLASS: + break; + case CAFENUM::DBR_NONE: + break; + default: + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY: UNKNOWN CAFENUM::DBR_TYPE= " << dbrTypeClass << endl; + break; + } + + + + + if (nrequired > navailable) { + + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CHANGE OF BUFFER SIZE: FROM " << navailable << " bytes TO " << nrequired << " bytes" << endl; + cout << "Channel-" << c.pv << " ca-name=" << ca_name(new_eventHandlerArgs.chid) + << " type=" << new_eventHandlerArgs.type + << " type=" << dbr_type_to_text(new_eventHandlerArgs.type) << endl; + + //check DataBuffers + switch(dbrTypeClass) + { + case CAFENUM::DBR_STSACK: //value is of type dbr_string_t + + if (c.stsackBuffer!=NULL) { + free(c.stsackBuffer); + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY: HOW CAN stsackBuffer NOT ALREADY EXIST?" << endl; + cout << "CREATING stsackBuffer " << endl; + } + + c.stsackBuffer = (db_access_val *) malloc (nrequired); + + + if (c.stsackBuffer==NULL){ + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID)); + printf ("Exiting CAFE"); + exit(0); + } + + c.channelRequestMetaSTSACK.byteSize=nrequired; + + + + break; + + case CAFENUM::DBR_PRIMITIVE: + case CAFENUM::DBR_STS: + case CAFENUM::DBR_TIME: + + // Check that buffer is large enough! Do not expect this part ever to be invoked + if (c.dataBuffer != NULL){ + + // Only re-allocate buffer if the number of native elements has increased without the + // the callback function first being called. i.e. nelemNative was changed on the fly! + // Don't believe this is possible - oder? + + free(c.dataBuffer); + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY: HOW CAN dataBuffer NOT ALREADY EXIST?" << endl; + cout << "CREATING dataBuffer " << endl; + } + + c.dataBuffer = (db_access_val *) malloc (nrequired); + + if (c.dataBuffer==NULL){ + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID)); + printf ("Exiting CAFE"); + exit(0); + } + c.channelRequestMetaData.byteSize=nrequired; + + + break; + + case CAFENUM::DBR_CTRL: + + // Check that buffer is large enough! Do not expect this part ever to be invoked + if (c.ctrlBuffer != NULL){ + + // Only re-allocate buffer if the number of native elements has increased without the + // the callback function first being called. i.e. nelemNative was changed on the fly! + // Don't believe this is possible - oder? + + free(c.ctrlBuffer); + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY: HOW CAN dataBuffer NOT ALREADY EXIST?" << endl; + cout << "CREATING dataBuffer " << endl; + } + + c.ctrlBuffer = (db_access_val *) malloc (nrequired); + + if (c.ctrlBuffer==NULL){ + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID)); + printf ("Exiting CAFE"); + exit(0); + } + + c.channelRequestMetaCtrl.byteSize=nrequired; + + //if (new_eventHandlerArgs.count > (long) c.channelRequestMetaCtrl.nelem) { + // c.channelRequestMetaCtrl.nelem = new_eventHandlerArgs.count; + //} + + break; + + case CAFENUM::DBR_CLASS: + default: + break; + } //switch + } // if new buffer size required + + + if (new_eventHandlerArgs.count > 0) { + if ((unsigned int) new_eventHandlerArgs.count > c.channelRegalia.nelem) { + c.channelRegalia.nelem = (unsigned int) new_eventHandlerArgs.count; + } + } + + switch(dbrTypeClass) + { + case CAFENUM::DBR_PRIMITIVE: + //c.hasAlarmStatus =false; + //c.hasAlarmSeverity=false; + //c.hasTimeStamp =false; + //c.hasValue =true; + c.alarmStatus =-1; + c.alarmSeverity =-1; + c.ts.secPastEpoch =0; + c.ts.nsec =0; + break; + case CAFENUM::DBR_STS: + //c.hasAlarmStatus =true; + //c.hasAlarmSeverity=true; + //c.hasTimeStamp =false; + //c.hasValue =true; + c.ts.secPastEpoch =0; + c.ts.nsec =0; + break; + case CAFENUM::DBR_TIME: + //c.hasAlarmStatus =true; + //c.hasAlarmSeverity=true; + //c.hasTimeStamp =true; + //c.hasValue =true; + break; + case CAFENUM::DBR_CTRL: + // c.hasAlarmStatus =true; + // c.hasAlarmSeverity=true; + // c.hasTimeStamp =false; + // c.hasValue =true; + break; + case CAFENUM::DBR_STSACK: + // c.hasAlarmStatus =true; + // c.hasAlarmSeverity=true; + // c.hasTimeStamp =false; + // c.hasValue =true; + break; + case CAFENUM::DBR_CLASS: + // c.hasAlarmStatus =false; + // c.hasAlarmSeverity=false; + // c.hasTimeStamp =false; + // c.hasValue =false; + break; + case CAFENUM::DBR_PUT: + break; + case CAFENUM::DBR_NONE: + default: + // c.hasAlarmStatus =false; + // c.hasAlarmSeverity=false; + // c.hasTimeStamp =false; + // c.hasValue =false; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL ERROR. Datatype not catered for: " + << dbf_type_to_text(new_eventHandlerArgs.type) << endl; + cout << new_eventHandlerArgs.type << endl; + break; + } + + //Now fill buffers + + switch(new_eventHandlerArgs.type) + { + case DBR_DOUBLE: //6 + + for (long i=0; idoubleval)+i)) + = (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->doubleval)+i)); + } + + break; + + case DBR_FLOAT: // 2 + + for (long i=0; ifltval)+i)) + = (dbr_float_t) (*(&( ( (union db_access_val *) new_eventHandlerArgs.dbr)->fltval)+i)); + } + + + break; + + case DBR_LONG: // 5 + + for (long i=0; ilongval)+i)) + = (*(&(( (union db_access_val *) new_eventHandlerArgs.dbr)->longval)+i)); + } + break; + + case DBR_SHORT: // 1 + + for (long i=0; ishrtval)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->shrtval)+i)); + } + break; + + case DBR_STRING: // 0 + + for (long i=0; istrval)+i)) , + (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->strval)+i)) ); + } + break; + + case DBR_ENUM: // 3 + + for (long i=0; ienmval)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->enmval)+i)); + } + break; + + case DBR_CHAR: // 4 + + for (long i=0; icharval)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->charval)+i)); + } + break; + + + case DBR_STS_DOUBLE: // 13 + + for (long i=0; isdblval.value)+i)) + = (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->sdblval.value)+i)); + } + (*(&((c.dataBuffer)->sdblval.status))) = ((struct dbr_sts_double *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->sdblval.severity))) = ((struct dbr_sts_double *) new_eventHandlerArgs.dbr)->severity; + + c.alarmStatus =((struct dbr_sts_double *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_sts_double *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_STS_FLOAT: // 9 + + for (long i=0; isfltval.value)+i)) + = (dbr_float_t) (*(&( ( (union db_access_val *) new_eventHandlerArgs.dbr)->sfltval.value)+i)); + } + + (*(&((c.dataBuffer)->sfltval.status))) = ((struct dbr_sts_float *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->sfltval.severity))) = ((struct dbr_sts_float *) new_eventHandlerArgs.dbr)->severity; + + c.alarmStatus =((struct dbr_sts_float *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_sts_float *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_STS_LONG: // 12 + + for (long i=0; islngval.value)+i)) + = (*(&(( (union db_access_val *) new_eventHandlerArgs.dbr)->slngval.value)+i)); + } + + (*(&((c.dataBuffer)->slngval.status))) = ((struct dbr_sts_long *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->slngval.severity))) = ((struct dbr_sts_long *) new_eventHandlerArgs.dbr)->severity; + + c.alarmStatus =((struct dbr_sts_long *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_sts_long *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_STS_SHORT: // 8 + + for (long i=0; isshrtval.value)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->sshrtval.value)+i)); + } + (*(&((c.dataBuffer)->sshrtval.status))) = ((struct dbr_sts_short *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->sshrtval.severity))) = ((struct dbr_sts_short *) new_eventHandlerArgs.dbr)->severity; + + c.alarmStatus =((struct dbr_sts_short *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_sts_short *) new_eventHandlerArgs.dbr)->severity; + break; + + case DBR_STS_STRING: // 7 + + for (long i=0; isstrval.value)+i)) , + (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->sstrval.value)+i)) ); + } + (*(&((c.dataBuffer)->sstrval.status))) = ((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->sstrval.severity))) = ((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->severity; + + c.alarmStatus =((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_STS_ENUM: // 10 + + for (long i=0; isenmval.value)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->senmval.value)+i)); + } + (*(&((c.dataBuffer)->senmval.status))) = ((struct dbr_sts_enum *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->senmval.severity))) = ((struct dbr_sts_enum *) new_eventHandlerArgs.dbr)->severity; + + c.alarmStatus =((struct dbr_sts_enum *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_sts_enum *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_STS_CHAR: // 11 + + for (long i=0; ischrval.value)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->schrval.value)+i)); + } + + (*(&((c.dataBuffer)->schrval.status))) = ((struct dbr_sts_char *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->schrval.severity))) = ((struct dbr_sts_char *) new_eventHandlerArgs.dbr)->severity; + + c.alarmStatus =((struct dbr_sts_char *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_sts_char *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_TIME_DOUBLE: // 20 + + for (long i=0; itdblval.value)+i)) + = (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->tdblval.value)+i)); + } + + (*(&((c.dataBuffer)->tdblval.status))) = ((struct dbr_time_double *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->tdblval.severity))) = ((struct dbr_time_double *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.dataBuffer)->tdblval.stamp))) = ((struct dbr_time_double *) new_eventHandlerArgs.dbr)->stamp; + + c.alarmStatus =((struct dbr_time_double *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_time_double *) new_eventHandlerArgs.dbr)->severity; + c.ts =((struct dbr_time_double *) new_eventHandlerArgs.dbr)->stamp; + + break; + + case DBR_TIME_FLOAT: //16 + + for (long i=0; itfltval.value)+i)) + = (dbr_float_t) (*(&( ( (union db_access_val *) new_eventHandlerArgs.dbr)->tfltval.value)+i)); + + + } + + (*(&((c.dataBuffer)->tfltval.status))) = ((struct dbr_time_float *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->tfltval.severity))) = ((struct dbr_time_float *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.dataBuffer)->tfltval.stamp))) = ((struct dbr_time_float *) new_eventHandlerArgs.dbr)->stamp; + + c.alarmStatus =((struct dbr_time_float *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_time_float *) new_eventHandlerArgs.dbr)->severity; + c.ts =((struct dbr_time_float *) new_eventHandlerArgs.dbr)->stamp; + + break; + + case DBR_TIME_LONG: //19 + + for (long i=0; itlngval.value)+i)) + = (*(&(( (union db_access_val *) new_eventHandlerArgs.dbr)->tlngval.value)+i)); + } + + (*(&((c.dataBuffer)->tlngval.status))) = ((struct dbr_time_long *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->tlngval.severity))) = ((struct dbr_time_long *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.dataBuffer)->tlngval.stamp))) = ((struct dbr_time_long *) new_eventHandlerArgs.dbr)->stamp; + + c.alarmStatus =((struct dbr_time_long *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_time_long *) new_eventHandlerArgs.dbr)->severity; + c.ts =((struct dbr_time_long *) new_eventHandlerArgs.dbr)->stamp; + break; + + case DBR_TIME_SHORT: + for (long i=0; itshrtval.value)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tshrtval.value)+i)); + } + + (*(&((c.dataBuffer)->tshrtval.status))) = ((struct dbr_time_short *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->tshrtval.severity))) = ((struct dbr_time_short *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.dataBuffer)->tshrtval.stamp))) = ((struct dbr_time_short *) new_eventHandlerArgs.dbr)->stamp; + + c.alarmStatus =((struct dbr_time_short *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_time_short *) new_eventHandlerArgs.dbr)->severity; + c.ts =((struct dbr_time_short *) new_eventHandlerArgs.dbr)->stamp; + + break; + + case DBR_TIME_STRING: //14 + + for (long i=0; itstrval.value)+i)) , + (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tstrval.value)+i)) ); + } + + + (*(&((c.dataBuffer)->tstrval.status))) = ((struct dbr_time_string *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->tstrval.severity))) = ((struct dbr_time_string *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.dataBuffer)->tstrval.stamp))) = ((struct dbr_time_string *) new_eventHandlerArgs.dbr)->stamp; + + c.alarmStatus =((struct dbr_time_string *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_time_string *) new_eventHandlerArgs.dbr)->severity; + c.ts =((struct dbr_time_string *) new_eventHandlerArgs.dbr)->stamp; + + break; + + case DBR_TIME_ENUM: //17 + + for (long i=0; itenmval.value)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tenmval.value)+i)); + } + + + (*(&((c.dataBuffer)->tenmval.status))) = ((struct dbr_time_enum *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->tenmval.severity))) = ((struct dbr_time_enum *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.dataBuffer)->tenmval.stamp))) = ((struct dbr_time_enum *) new_eventHandlerArgs.dbr)->stamp; + + c.alarmStatus =((struct dbr_time_enum *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_time_enum *) new_eventHandlerArgs.dbr)->severity; + c.ts =((struct dbr_time_enum *) new_eventHandlerArgs.dbr)->stamp; + + break; + + case DBR_TIME_CHAR: //18 + + for (long i=0; itchrval.value)+i)) + = (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tchrval.value)+i)); + + } + (*(&((c.dataBuffer)->tchrval.status))) = ((struct dbr_time_char *) new_eventHandlerArgs.dbr)->status; + (*(&((c.dataBuffer)->tchrval.severity))) = ((struct dbr_time_char *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.dataBuffer)->tchrval.stamp))) = ((struct dbr_time_char *) new_eventHandlerArgs.dbr)->stamp; + + c.alarmStatus =((struct dbr_time_char *) new_eventHandlerArgs.dbr)->status; + c.alarmSeverity=((struct dbr_time_char *) new_eventHandlerArgs.dbr)->severity; + c.ts =((struct dbr_time_char *) new_eventHandlerArgs.dbr)->stamp; + break; + + case DBR_CTRL_DOUBLE: //34 + + for (long i=0; icdblval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cdblval.value)+i)); + } + + (*(&((c.ctrlBuffer)->cdblval.status))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->cdblval.severity))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->severity; + (*(&((c.ctrlBuffer)->cdblval.precision))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->precision; + (*(&((c.ctrlBuffer)->cdblval.RISC_pad0))) = + (dbr_short_t) ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->RISC_pad0; //dbr_short_t + memcpy((*(&((c.ctrlBuffer)->cdblval.units))), + &(((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + (*(&((c.ctrlBuffer)->cdblval.upper_disp_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->cdblval.lower_disp_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->cdblval.upper_alarm_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->cdblval.upper_warning_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->cdblval.lower_warning_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->cdblval.lower_alarm_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + (*(&((c.ctrlBuffer)->cdblval.upper_ctrl_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->upper_ctrl_limit; + (*(&((c.ctrlBuffer)->cdblval.lower_ctrl_limit))) = + ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->lower_ctrl_limit; + + break; + + case DBR_CTRL_LONG: //33 + + for (long i=0; iclngval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->clngval.value)+i)); + } + + (*(&((c.ctrlBuffer)->clngval.status))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->clngval.severity))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_ctrl_long does not have the precision member + // struct dbr_ctrl_long does not have the RISC_pad member + memcpy((*(&((c.ctrlBuffer)->clngval.units))), + &(((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->clngval.upper_disp_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->clngval.lower_disp_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->clngval.upper_alarm_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->clngval.upper_warning_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->clngval.lower_warning_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->clngval.lower_alarm_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + (*(&((c.ctrlBuffer)->clngval.upper_ctrl_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->upper_ctrl_limit; + (*(&((c.ctrlBuffer)->clngval.lower_ctrl_limit))) = + ((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->lower_ctrl_limit; + + //c.alarmStatus =((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_ctrl_long *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_CTRL_CHAR: //32 + + for (long i=0; igchrval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cchrval.value)+i)); + } + + (*(&((c.ctrlBuffer)->cchrval.status))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->cchrval.severity))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_ctrl_char does not have the precision member + // struct dbr_ctrl_char does not have the RISC_pad member + memcpy((*(&((c.ctrlBuffer)->cchrval.units))), + &(((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->cchrval.upper_disp_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->cchrval.lower_disp_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->cchrval.upper_alarm_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->cchrval.upper_warning_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->cchrval.lower_warning_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->cchrval.lower_alarm_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + (*(&((c.ctrlBuffer)->cchrval.upper_ctrl_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->upper_ctrl_limit; + (*(&((c.ctrlBuffer)->cchrval.lower_ctrl_limit))) = + ((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->lower_ctrl_limit; + + // c.alarmStatus =((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_ctrl_char *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_CTRL_ENUM: //31 + + for (long i=0; icenmval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cenmval.value)+i)); + } + + (*(&((c.ctrlBuffer)->cenmval.status))) = + ((struct dbr_ctrl_enum *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->cenmval.severity))) = + ((struct dbr_ctrl_enum *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_ctrl_enum does not have the precision member + // struct dbr_ctrl_enum does not have the RISC_pad member + // struct dbr_ctrl_enum does not have the disp/alarm/warning/ctrl _limits + + (*(&((c.ctrlBuffer)->cenmval.no_str))) = + ((struct dbr_ctrl_enum *) new_eventHandlerArgs.dbr)->no_str; + + memcpy( (*(&((c.ctrlBuffer)->cenmval.strs))), + &(((struct dbr_ctrl_enum *) new_eventHandlerArgs.dbr)->strs), + sizeof(char)*MAX_ENUM_STRING_SIZE*MAX_ENUM_STATES) ; + + + + memcpy(c.channelEnumStrings.options, &(((struct dbr_ctrl_enum *) new_eventHandlerArgs.dbr)->strs), + sizeof(c.channelEnumStrings.options)); + c.channelEnumStrings.noOptions=((struct dbr_ctrl_enum *) new_eventHandlerArgs.dbr)->no_str; + //cout << "=====================" << c.channelEnumStrings.noOptions << endl; + //for (int i=0; icfltval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cfltval.value)+i)); + } + + (*(&((c.ctrlBuffer)->cfltval.status))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->cfltval.severity))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->severity; + + + (*(&((c.ctrlBuffer)->cfltval.precision))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->precision; + (*(&((c.ctrlBuffer)->cfltval.RISC_pad))) = (dbr_short_t) + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->RISC_pad; //dbr_short_t + + memcpy((*(&((c.ctrlBuffer)->cfltval.units))), + &(((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->cfltval.upper_disp_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->cfltval.lower_disp_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->cfltval.upper_alarm_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->cfltval.upper_warning_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->cfltval.lower_warning_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->cfltval.lower_alarm_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + (*(&((c.ctrlBuffer)->cfltval.upper_ctrl_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->upper_ctrl_limit; + (*(&((c.ctrlBuffer)->cfltval.lower_ctrl_limit))) = + ((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->lower_ctrl_limit; + + + //c.alarmStatus =((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_ctrl_float *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_CTRL_SHORT: //29 + + for (long i=0; igshrtval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cshrtval.value)+i)); + } + + (*(&((c.ctrlBuffer)->cshrtval.status))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->cshrtval.severity))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_ctrl_short does not have the precision member + // struct dbr_ctrl_short does not have the RISC_pad member + memcpy((*(&((c.ctrlBuffer)->cshrtval.units))), + &(((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->cshrtval.upper_disp_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->cshrtval.lower_disp_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->cshrtval.upper_alarm_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->cshrtval.upper_warning_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->cshrtval.lower_warning_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->cshrtval.lower_alarm_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + (*(&((c.ctrlBuffer)->cshrtval.upper_ctrl_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->upper_ctrl_limit; + (*(&((c.ctrlBuffer)->cshrtval.lower_ctrl_limit))) = + ((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->lower_ctrl_limit; + + + //c.alarmStatus =((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_ctrl_short *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_CTRL_STRING: //28 + + for (long i=0; icstrval.value)+i)), + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cstrval.value)+i))); + } + + (*(&((c.ctrlBuffer)->cstrval.status))) = + ((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->cstrval.severity))) = + ((struct dbr_sts_short *) new_eventHandlerArgs.dbr)->severity; + + //c.alarmStatus =((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_GR_DOUBLE: //27 + + for (long i=0; igdblval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gdblval.value)+i)); + } + + (*(&((c.ctrlBuffer)->gdblval.status))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->gdblval.severity))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->severity; + + (*(&((c.ctrlBuffer)->gdblval.precision))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->precision; + + (*(&((c.ctrlBuffer)->gdblval.RISC_pad0))) = + (dbr_short_t) ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->RISC_pad0; //dbr_short_t + + memcpy((*(&((c.ctrlBuffer)->gdblval.units))), + &(((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->gdblval.upper_disp_limit))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->gdblval.lower_disp_limit))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->gdblval.upper_alarm_limit))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->gdblval.upper_warning_limit))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->gdblval.lower_warning_limit))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->gdblval.lower_alarm_limit))) = + ((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + + //c.alarmStatus =((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_gr_double *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_GR_LONG: //26 + + for (long i=0; iglngval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->glngval.value)+i)); + } + + (*(&((c.ctrlBuffer)->glngval.status))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->glngval.severity))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_gr_long does not have the precision member + // struct dbr_gr_long does not have the RISC_pad member + memcpy((*(&((c.ctrlBuffer)->glngval.units))), + &(((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->glngval.upper_disp_limit))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->glngval.lower_disp_limit))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->glngval.upper_alarm_limit))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->glngval.upper_warning_limit))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->glngval.lower_warning_limit))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->glngval.lower_alarm_limit))) = + ((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + + //c.alarmStatus =((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_gr_long *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_GR_CHAR: //25 + + for (long i=0; igchrval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gchrval.value)+i)); + } + + (*(&((c.ctrlBuffer)->gchrval.status))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->gchrval.severity))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_gr_char does not have the precision member + // struct dbr_gr_char does not have the RISC_pad member + memcpy((*(&((c.ctrlBuffer)->gchrval.units))), + &(((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->gchrval.upper_disp_limit))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->gchrval.lower_disp_limit))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->gchrval.upper_alarm_limit))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->gchrval.upper_warning_limit))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->gchrval.lower_warning_limit))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->gchrval.lower_alarm_limit))) = + ((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + + //c.alarmStatus =((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_gr_char *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_GR_ENUM: //24 + + for (long i=0; igenmval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->genmval.value)+i)); + } + + (*(&((c.ctrlBuffer)->genmval.status))) = + ((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->genmval.severity))) = + ((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_gr_enum does not have the precision member + // struct dbr_gr_enum does not have the RISC_pad member + // struct dbr_gr_enum does not have the disp/alarm/warning/ctrl _limits + + (*(&((c.ctrlBuffer)->genmval.no_str))) = + ((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->no_str; + + memcpy( (*(&((c.ctrlBuffer)->genmval.strs))), + &(((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->strs), + sizeof(char)*MAX_ENUM_STRING_SIZE*MAX_ENUM_STATES) ; + + // c.alarmStatus =((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->severity; + + memcpy(c.channelEnumStrings.options, &(((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->strs), + sizeof(c.channelEnumStrings.options)); + c.channelEnumStrings.noOptions=((struct dbr_gr_enum *) new_eventHandlerArgs.dbr)->no_str; + //cout << "=====================" << c.channelEnumStrings.noOptions << endl; + //for (int i=0; igfltval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gfltval.value)+i)); + } + + (*(&((c.ctrlBuffer)->gfltval.status))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->gfltval.severity))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->severity; + + + (*(&((c.ctrlBuffer)->gfltval.precision))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->precision; + (*(&((c.ctrlBuffer)->gfltval.RISC_pad0))) = + (dbr_short_t) ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->RISC_pad0; //dbr_short_t + + memcpy((*(&((c.ctrlBuffer)->gfltval.units))), + &(((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->gfltval.upper_disp_limit))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->gfltval.lower_disp_limit))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->gfltval.upper_alarm_limit))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->gfltval.upper_warning_limit))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->gfltval.lower_warning_limit))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->gfltval.lower_alarm_limit))) = + ((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + + + // c.alarmStatus =((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->status; + //c.alarmSeverity=((struct dbr_gr_float *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_GR_SHORT: //22 + + for (long i=0; igshrtval.value)+i)) = + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gshrtval.value)+i)); + } + + (*(&((c.ctrlBuffer)->gshrtval.status))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->gshrtval.severity))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->severity; + + // struct dbr_gr_short does not have the precision member + // struct dbr_gr_short does not have the RISC_pad member + memcpy((*(&((c.ctrlBuffer)->gshrtval.units))), + &(((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->units), + sizeof(char[MAX_UNITS_SIZE])); + + (*(&((c.ctrlBuffer)->gshrtval.upper_disp_limit))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->upper_disp_limit; + (*(&((c.ctrlBuffer)->gshrtval.lower_disp_limit))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->lower_disp_limit; + (*(&((c.ctrlBuffer)->gshrtval.upper_alarm_limit))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->upper_alarm_limit; + (*(&((c.ctrlBuffer)->gshrtval.upper_warning_limit))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->upper_warning_limit; + (*(&((c.ctrlBuffer)->gshrtval.lower_warning_limit))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->lower_warning_limit; + (*(&((c.ctrlBuffer)->gshrtval.lower_alarm_limit))) = + ((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->lower_alarm_limit; + + // c.alarmStatus =((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->status; + // c.alarmSeverity=((struct dbr_gr_short *) new_eventHandlerArgs.dbr)->severity; + + break; + + + case DBR_GR_STRING: //21 + + for (long i=0; igstrval.value)+i)), + (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gstrval.value)+i))); + } + + (*(&((c.ctrlBuffer)->gstrval.status))) = + ((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->status; + (*(&((c.ctrlBuffer)->gstrval.severity))) = + ((struct dbr_sts_short *) new_eventHandlerArgs.dbr)->severity; + + // c.alarmStatus =((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->status; + // c.alarmSeverity=((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->severity; + + break; + + case DBR_STSACK_STRING: // 37 + + // cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + + + // cout << "no of events = " << new_eventHandlerArgs.count << endl; + // cout << "Is databuffer large enough? " << endl; + // Need to cast as (struct dbr_stsack_string *) rather than (union db_access_val *) + // + + //CHECK BUFFER SIZE!!! + + // cout << "VALUE (struct) = " << + // (*(&(((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->value)+0)) + // << endl; + + for (long i=0; isastrval.value)+i)) , + (*(&(((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->value)+i)) ); + //cout << " VAL " << (*(&((c.stsackBuffer)->sastrval.value)+i)) << " [" << i << "] "; + } + + //cout << endl; + + (*(&((c.stsackBuffer)->sastrval.status))) = (dbr_ushort_t) ((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->status; + (*(&((c.stsackBuffer)->sastrval.severity))) = (dbr_ushort_t) ((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->severity; + + + + + //cout << "Value STSACK " << (*(&((c.stsackBuffer)->sastrval.value)+0)) << endl; + //cout << "Value STSACK " << (*(&(((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->value)+0))<< endl; + //cout << "ALARM STATUS " << (*(&((c.stsackBuffer)->sastrval.status))) << endl; + //cout << "ALARM SEVERITY " << (*(&((c.stsackBuffer)->sastrval.severity))) << endl; + + //cout << "VAL ACKT " << (dbr_ushort_t) ( (struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->ackt << endl; + + //cout << "VAL ACKS " << (dbr_ushort_t) ( (struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->acks << endl; + + + + // c.alarmStatus =((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->status; + // c.alarmSeverity=((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->severity; + + + break; + + case DBR_CLASS_NAME: // 37 + + // Need to cast as (struct dbr_stsack_string *) rather than (union db_access_val *) + // + + // strcpy ((c.dataBuffer)->classname , + // (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->classname)+0)) ); + + + // cout << "Value CLASSNAME " << strlen((*(&((c.dataBuffer)->classname)+0)) )<< endl; + // cout << "Value CLASSNAME " << ((*(&((c.dataBuffer)->classname)+0)) )<< endl; + // cout << "Value CLASSNAME " << strlen((*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->classname)+0)))<< "/"<classname)+0))); + strcpy( c.channelRegalia.className, + (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->classname)+0))); + + //cout << "ClassName=" << c.channelRegalia.className << endl; + + break; + + + default: + cout << "CAFE INTERNAL ERROR: This line should never appear! " << endl; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Method does not support this DBR_TYPE: " + << dbr_type_to_text(new_eventHandlerArgs.type) << endl; + + //break; + + } //switch + + + //Do this to prevent overflow error in epicsTime time(ts) routines! + //This bad number can occur in timeouts + if(c.ts.nsec>1000000000) {c.ts.nsec=0;} + + + } // void + + + +private: + event_handler_args new_eventHandlerArgs; +#undef __METHOD__ +}; + + +////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +#endif // CONDUITEVENTHANDLERARGS_H diff --git a/include/conduitFriends.h b/include/conduitFriends.h new file mode 100644 index 0000000..7f4617a --- /dev/null +++ b/include/conduitFriends.h @@ -0,0 +1,794 @@ +/// +/// \file conduitFriends.h +/// \author Jan Chrin, PSI +/// \date November 2014 +/// \version CAFE 1.0.0 +/// + +#ifndef CONDUITFRIENDS_H +#define CONDUITFRIENDS_H + +#include +#include +#include + +using namespace std; + + +/** + * Friend to Conduit/CAFEGroup permitting fast modification to STS recorded in hash table + */ +struct change_alarmStatus +{ + change_alarmStatus (const dbr_short_t & new_alarmStatus): new_alarmStatus(new_alarmStatus){} + + void operator() (Conduit& c) { + /////////////////////////////////////////////////////////////////////////// + c.alarmStatus = new_alarmStatus; + /////////////////////////////////////////////////////////////////////////// + } + +private: + dbr_short_t new_alarmStatus; +}; +struct change_alarmSeverity +{ + change_alarmSeverity (const dbr_short_t & new_alarmSeverity): new_alarmSeverity(new_alarmSeverity){} + + void operator() (Conduit& c) { + /////////////////////////////////////////////////////////////////////////// + c.alarmSeverity = new_alarmSeverity; + /////////////////////////////////////////////////////////////////////////// + } + +private: + dbr_short_t new_alarmSeverity; +}; +struct change_epicsTimeStamp +{ + change_epicsTimeStamp (const epicsTimeStamp & new_epicsTimeStamp): new_epicsTimeStamp(new_epicsTimeStamp){} + + void operator() (Conduit& c) { + /////////////////////////////////////////////////////////////////////////// + c.ts = new_epicsTimeStamp; + //Do this to prevent overflow error in epicsTime time(ts) routines! + //This bad number can occur in timeouts + if(c.ts.nsec>1000000000) {c.ts.nsec=0;} + /////////////////////////////////////////////////////////////////////////// + } + +private: + epicsTimeStamp new_epicsTimeStamp; +}; + + +/** + * Friend to Conduit/CAFEGroup permitting fast modification to access rights state recorded in hash table + */ +struct change_accessRead +{ + change_accessRead (const unsigned int & new_accessRead): new_accessRead(new_accessRead){} + + void operator() (Conduit& c) { + /////////////////////////////////////////////////////////////////////////// + c.channelRegalia.accessRead = new_accessRead; + /////////////////////////////////////////////////////////////////////////// + } + +private: + unsigned int new_accessRead; +}; + + +/** + * Friend to Conduit/CAFEGroup permitting fast modification to access rights state recorded in hash table + */ +struct change_accessWrite +{ + change_accessWrite (const unsigned int & new_accessWrite): new_accessWrite(new_accessWrite){} + + void operator() (Conduit& c) { + /////////////////////////////////////////////////////////////////////////// + c.channelRegalia.accessWrite = new_accessWrite; + /////////////////////////////////////////////////////////////////////////// + } + +private: + unsigned int new_accessWrite; +}; + + +/** + * Friend toConduit/CAFEGroup permitting the access_rights_handler_args struct from callback fns + * to be recorded in hash table + */ +struct change_accessRightsHandlerArgs +{ + change_accessRightsHandlerArgs (const struct access_rights_handler_args & new_accessRightsHandlerArgs): + new_accessRightsHandlerArgs(new_accessRightsHandlerArgs){} + + void operator() (Conduit& c) { + + /////////////////////////////////////////////////////////////////////////// + c.channelRegalia.accessRead = new_accessRightsHandlerArgs.ar.read_access; + c.channelRegalia.accessWrite= new_accessRightsHandlerArgs.ar.write_access; + /////////////////////////////////////////////////////////////////////////// + } + +private: + access_rights_handler_args new_accessRightsHandlerArgs; +}; + + + +/** + * Friend to Conduit/CAFEGroup records the channelRegalia class members in hash table + */ +struct change_channelDeviceAttribute +{ + change_channelDeviceAttribute (const ChannelDeviceAttribute & new_channelDeviceAttribute): + new_channelDeviceAttribute(new_channelDeviceAttribute){} + + void operator() (Conduit& c) {c.channelDeviceAttribute = new_channelDeviceAttribute;} + +private: + ChannelDeviceAttribute new_channelDeviceAttribute; +}; + + + +/** + * Friend to Conduit/CAFEGroup records the channelID in hash table + */ +struct change_channelID +{ + change_channelID (const chid & new_channelID): new_channelID(new_channelID){} + + void operator() (Conduit& c) { + c.channelRegalia.channelID=new_channelID; + c.channelID=new_channelID; + } + +private: + chid new_channelID; +}; + + + +/** + * Friend to Conduit records the channelGetActionWhenMonitorPolicy in hash table + */ +struct change_channelGetActionWhenMonitorPolicy +{ + change_channelGetActionWhenMonitorPolicy ( + const ChannelGetActionWhenMonitorPolicy & new_channelGetActionWhenMonitorPolicy): + new_channelGetActionWhenMonitorPolicy(new_channelGetActionWhenMonitorPolicy){} + + void operator() (Conduit& c) { + // + c.channelGetActionWhenMonitorPolicy = new_channelGetActionWhenMonitorPolicy; + } +private: + ChannelGetActionWhenMonitorPolicy new_channelGetActionWhenMonitorPolicy; +}; + + +/** + * Friend to Conduit records the channelGetCacheWaitPolicy in hash table + */ +struct change_channelGetCacheWaitPolicy +{ + change_channelGetCacheWaitPolicy ( + const ChannelGetCacheWaitPolicy & new_channelGetCacheWaitPolicy): + new_channelGetCacheWaitPolicy(new_channelGetCacheWaitPolicy){} + + void operator() (Conduit& c) { + // + c.channelGetCacheWaitPolicy = new_channelGetCacheWaitPolicy; + } +private: + ChannelGetCacheWaitPolicy new_channelGetCacheWaitPolicy; +}; + + + + + +/** + * Friend to Conduit permitting hasNewData flag to be set in hash table + */ +struct change_hasNewData +{ + change_hasNewData (const bool & new_hasNewData): new_hasNewData(new_hasNewData){} + + void operator() (Conduit& c) {c.hasNewData = new_hasNewData;} + +private: + bool new_hasNewData; +}; + + + +/** + * Friend to Conduit/CAFEGroup records the channelRegalia class members in hash table + */ +struct change_channelRegalia +{ + change_channelRegalia (const ChannelRegalia & new_channelRegalia): new_channelRegalia(new_channelRegalia){} + + void operator() (Conduit& c) {c.channelRegalia = new_channelRegalia;} + +private: + ChannelRegalia new_channelRegalia; +}; + + +/** + * Friend to Conduit records the channelRequestDataTypePolicy in hash table + */ +struct change_channelRequestDataTypePolicy +{ + change_channelRequestDataTypePolicy ( + const ChannelRequestDataTypePolicy & new_channelRequestDataTypePolicy): + new_channelRequestDataTypePolicy(new_channelRequestDataTypePolicy){} + + void operator() (Conduit& c) { + // + c.channelRequestDataTypePolicy = new_channelRequestDataTypePolicy; + } +private: + ChannelRequestDataTypePolicy new_channelRequestDataTypePolicy; +}; + + + +/** + * Friend to Conduit records the channelRequestMetaCtrl in hash table + */ +struct change_channelRequestMetaCtrl +{ + change_channelRequestMetaCtrl (const ChannelRequestMetaData & new_channelData): + new_channelData(new_channelData){} + + void operator() (Conduit& c) { + // + c.channelRequestMetaCtrl = new_channelData; + } +private: + ChannelRequestMetaData new_channelData; +}; + + + +/** + * Friend to Conduit records the channelRequestMetaCtrlClient in hash table + */ +struct change_channelRequestMetaCtrlClient +{ + change_channelRequestMetaCtrlClient (const ChannelRequestMetaDataClient & new_channelData): + new_channelData(new_channelData){} + + void operator() (Conduit& c) { + // + c.channelRequestMetaCtrlClient = new_channelData; + + } +private: + ChannelRequestMetaDataClient new_channelData; +}; + + + + + +/** + * Friend to Conduit records the channelRequestMetaData in hash table + */ +struct change_channelRequestMetaData +{ + change_channelRequestMetaData (const ChannelRequestMetaData & new_channelData): + new_channelData(new_channelData){} + + void operator() (Conduit& c) { + // + + c.channelRequestMetaData = new_channelData; + + } + +private: + ChannelRequestMetaData new_channelData; +}; + + + +/** + * Friend to Conduit records the channelRequestMetaDataClient in hash table + */ +struct change_channelRequestMetaDataClient +{ + change_channelRequestMetaDataClient (const ChannelRequestMetaDataClient & new_channelData): + new_channelData(new_channelData){} + + void operator() (Conduit& c) { + // + + c.channelRequestMetaDataClient = new_channelData; + } +private: + ChannelRequestMetaDataClient new_channelData; +}; + + + +/** + * Friend to Conduit records the channelRequestMetaPrimitive in hash table + */ +struct change_channelRequestMetaPrimitive +{ + change_channelRequestMetaPrimitive (const ChannelRequestMetaData & new_channelData): + new_channelData(new_channelData){} + + void operator() (Conduit& c) { + // + c.channelRequestMetaPrimitive = new_channelData; + } +private: + ChannelRequestMetaData new_channelData; +}; + + +/** + * Friend to Conduit records the channelRequestPolicyGet in hash table + */ +struct change_channelRequestPolicyGet +{ + change_channelRequestPolicyGet (const ChannelRequestPolicy & new_ChannelRequestPolicy): + new_ChannelRequestPolicy(new_ChannelRequestPolicy){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelRequestPolicyGet = new_ChannelRequestPolicy; + } +private: + ChannelRequestPolicy new_ChannelRequestPolicy; +}; + + +/** + * Friend to Conduit records the channelRequestPolicyGetCtrl in hash table + */ +struct change_channelRequestPolicyGetCtrl +{ + change_channelRequestPolicyGetCtrl (const ChannelRequestPolicy & new_ChannelRequestPolicy): + new_ChannelRequestPolicy(new_ChannelRequestPolicy){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelRequestPolicyGetCtrl = new_ChannelRequestPolicy; + } +private: + ChannelRequestPolicy new_ChannelRequestPolicy; +}; + + + +/** + * Friend to Conduit records the channelRequestPolicyPut in hash table + */ +struct change_channelRequestPolicyPut +{ + change_channelRequestPolicyPut (const ChannelRequestPolicy & new_ChannelRequestPolicy): + new_ChannelRequestPolicy(new_ChannelRequestPolicy){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelRequestPolicyPut = new_ChannelRequestPolicy; + } +private: + ChannelRequestPolicy new_ChannelRequestPolicy; +}; + + + + +/** + * Friend to Conduit records the channelRequestStatusGet in hash table + */ +struct change_channelRequestStatusGet +{ + change_channelRequestStatusGet (const ChannelRequestStatus & new_ChannelRequestStatus): + new_ChannelRequestStatus(new_ChannelRequestStatus){} + + void operator() (Conduit& c) { + //This does a deep copy! + + c.channelRequestStatusGet = new_ChannelRequestStatus; + } + +private: + ChannelRequestStatus new_ChannelRequestStatus; +}; + + + +/** + * Friend to Conduit records the channelRequestStatusGetCtrl in hash table + */ +struct change_channelRequestStatusGetCtrl +{ + change_channelRequestStatusGetCtrl (const ChannelRequestStatus & new_ChannelRequestStatus): + new_ChannelRequestStatus(new_ChannelRequestStatus){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelRequestStatusGetCtrl = new_ChannelRequestStatus; + } +private: + ChannelRequestStatus new_ChannelRequestStatus; +}; + + +/** + * Friend to Conduit records the channelRequestStatusGetSTSACK in hash table + */ +struct change_channelRequestStatusGetSTSACK +{ + change_channelRequestStatusGetSTSACK (const ChannelRequestStatus & new_ChannelRequestStatus): + new_ChannelRequestStatus(new_ChannelRequestStatus){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelRequestStatusGetSTSACK = new_ChannelRequestStatus; + } +private: + ChannelRequestStatus new_ChannelRequestStatus; +}; + + + +/** + * Friend to Conduit records the channelRequestStatusGetClassName in hash table + */ +struct change_channelRequestStatusGetClassName +{ + change_channelRequestStatusGetClassName (const ChannelRequestStatus & new_ChannelRequestStatus): + new_ChannelRequestStatus(new_ChannelRequestStatus){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelRequestStatusGetClassName = new_ChannelRequestStatus; + } +private: + ChannelRequestStatus new_ChannelRequestStatus; +}; + + +/** + * Friend to Conduit records the channelRequestStatusPut in hash table + */ +struct change_channelRequestStatusPut +{ + change_channelRequestStatusPut (const ChannelRequestStatus & new_ChannelRequestStatus): + new_ChannelRequestStatus(new_ChannelRequestStatus){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelRequestStatusPut = new_ChannelRequestStatus; + } +private: + ChannelRequestStatus new_ChannelRequestStatus; +}; + + + + +/** + * Friend to Conduit records the channelTimeoutPolicyGet in hash table + */ +struct change_channelTimeoutPolicyGet +{ + change_channelTimeoutPolicyGet (const ChannelTimeoutPolicy & new_channelTimeoutPolicy): + new_channelTimeoutPolicy(new_channelTimeoutPolicy){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelTimeoutPolicyGet = new_channelTimeoutPolicy; + } +private: + ChannelTimeoutPolicy new_channelTimeoutPolicy; +}; + + +/** + * Friend to Conduit records the channelTimeoutPolicyPut in hash table + */ +struct change_channelTimeoutPolicyPut +{ + change_channelTimeoutPolicyPut (const ChannelTimeoutPolicy & new_channelTimeoutPolicy): + new_channelTimeoutPolicy(new_channelTimeoutPolicy){} + + void operator() (Conduit& c) { + //This does a deep copy! + c.channelTimeoutPolicyPut = new_channelTimeoutPolicy; + } +private: + ChannelTimeoutPolicy new_channelTimeoutPolicy; +}; + + + +/** + * Friend to Conduit permitting fast modification to vector monitorAction + * (for CAFE Extensions) + */ +struct change_monitorAction +{ + change_monitorAction (string &new_monitorAction): new_monitorAction(new_monitorAction){} + + void operator() (Conduit& c) { + c.monitorAction.push_back(new_monitorAction); + } +private: + string new_monitorAction; +}; + + + +/** + * Friend to Conduit permitting fast removal of all elements in vector monitorAction + * (for CAFE Extensions) + */ +struct change_monitorActionClear +{ + change_monitorActionClear (){} + + void operator() (Conduit& c) { + c.monitorAction.clear(); + } + +}; + + + +/** + * Friend to Conduit permitting fast removal of an entry in vector monitorAction + * (for CAFE Extensions) + */ +struct change_monitorActionErase +{ + change_monitorActionErase (string &new_monitorAction): new_monitorAction(new_monitorAction){} + + void operator() (Conduit& c) { + bool maFound=false; + vector::iterator it; + + + for (it = c.monitorAction.begin(); it != c.monitorAction.end(); ) { + if( (*it)==new_monitorAction) { + it = c.monitorAction.erase(it); + maFound=true; + } + else { + ++it; + } + } + + if (!maFound) { + cout << "monitorAction " << new_monitorAction << " NOT FOUND! " << endl; + cout << "Could not delete entry!" << endl; + } + + } +private: + string new_monitorAction; +}; + + +/** + * Friend to Conduit permitting fast removal of an entry in the monitorPolicy vector + * + */ +struct change_monitorPolicyErase +{ + change_monitorPolicyErase (unsigned int & new_evid): new_evid(new_evid){} + + void operator() (Conduit& c) { + + bool evidFound=false; + vector::iterator it; + //Iterate + for (it = c.mpV.begin(); it != c.mpV.end();) { + //cout << "ID " << (*it).getID() << " " << endl; + + if ( (*it).getID()==new_evid) { + evidFound=true; + it=(c.mpV).erase(it); + break; + } + else { + ++it; + } + } + + if (!evidFound) { + cout << "evid " << new_evid << " NOT FOUND! " << endl; + cout << "Could not delete entry!" << endl; + } + } + +private: + unsigned int new_evid; +}; + + + + +/** + * Friend to Conduit permitting fast insertion into the monitorPolicy vector + * + */ +struct change_monitorPolicyInsert +{ + change_monitorPolicyInsert (class MonitorPolicy & new_monitorPolicy): new_monitorPolicy(new_monitorPolicy){} + + void operator() (Conduit& c) { + + + //insert into mpV + (c.mpV).push_back(new_monitorPolicy); + + if (c.mpV.size()>(MAX_NO_MONITORS_PER_CHANNEL/2)) { + cout << "HEY DUDE - YOU NOW HAVE " << c.mpV.size() << " MONITORS " << endl; + cout << "for channel " << c.pv << " with handle " << c.handle << endl; + } + + + } + +private: + class MonitorPolicy new_monitorPolicy; +}; + + + +/** + * Friend to Conduit permitting fast removal of an entry in the monitorPolicyInWaiting vector + * + */ +struct change_monitorPolicyInWaitingErase +{ + change_monitorPolicyInWaitingErase (unsigned int & new_evid): new_evid(new_evid){} + + void operator() (Conduit& c) { + + bool evidFound=false; + vector::iterator it; + //Iterate + for (it = c.mpInWaitingV.begin(); it != c.mpInWaitingV.end(); ++it) { + + if ( (*it).getID()==new_evid) { + evidFound=true; + (c.mpInWaitingV).erase(it); + break; + } + } + + if (!evidFound) { + cout << "evid " << new_evid << " NOT FOUND! " << endl; + cout << "Could not delete entry!" << endl; + } + } + +private: + unsigned int new_evid; +}; + + + +/** + * Friend to Conduit permitting fast insertion into the monitorPolicyInWaiting vector + * + */ +struct change_monitorPolicyInWaitingInsert +{ + change_monitorPolicyInWaitingInsert (class MonitorPolicy & new_monitorPolicy): new_monitorPolicy(new_monitorPolicy){} + + void operator() (Conduit& c) { + + //insert into mpnWaitingV + (c.mpInWaitingV).push_back(new_monitorPolicy); + + if (c.mpInWaitingV.size()>6) { + cout << "HEY DUDE - YOU NOW HAVE " << c.mpInWaitingV.size() + << " MONITORS IN WAITING" << endl; + cout << "for channel " << c.pv << " with handle " << c.handle << endl; + } + } + +private: + class MonitorPolicy new_monitorPolicy; +}; + + + + +/** + * Friend to Conduit/CAFEGroup permitting fast modification to pvAlias in hash table + */ +struct change_pvAlias +{ + change_pvAlias (const char * & new_pvAlias): new_pvAlias(new_pvAlias){} + + void operator() (Conduit& c) { + c.pvAlias = new_pvAlias; + //No longer supporting c,pvd + ///strcpy(c.pvd.pvAlias, new_pvAlias); + //strcpy(c.pvc.pvAlias, new_pvAlias); + } + +private: + const char * new_pvAlias; +}; + + + + +/** + * Friend to Conduit permitting pyCafeFlag flag to be set in hash table + * +struct change_pyCafeFlag +{ + change_pyCafeFlag (const bool & new_pyCafeFlag): new_pyCafeFlag(new_pyCafeFlag){} + + void operator() (Conduit& c) {c.pyCafeFlag = new_pyCafeFlag;} + +private: + bool new_pyCafeFlag; +}; +*/ + + +/** + * Friend to Conduit/CAFEGroup permitting fast modification to the status as given by the last method invocation + */ +struct change_status +{ + change_status (const int & new_status): new_status(new_status){} + void operator() (Conduit& c) {c.status = new_status;} + +private: + int new_status; +}; + + + +/** + * Friend to Conduit/CAFEGroup permitting fast modification to the usrArgs as given by the last method invocation + */ +struct change_usrArgs +{ + change_usrArgs (const unsigned int & new_usrArgs): new_usrArgs(new_usrArgs){} + void operator() (Conduit& c) {c.usrArgs = (void *) new_usrArgs;} + +private: + unsigned int new_usrArgs; +}; + + +/** + * friend to Conduit/CAFEGroup permitting the groupHandle to which the channel belongs to be recorded in hash table + */ +struct change_groupHandle +{ + change_groupHandle (const unsigned int & new_groupHandle): new_groupHandle(new_groupHandle){} + + void operator() (Conduit& c) {c.groupHandle = new_groupHandle;} + +private: + unsigned int new_groupHandle; +}; + + + +#endif // CONDUITFRIENDS_H diff --git a/include/conduitGroup.h b/include/conduitGroup.h new file mode 100644 index 0000000..64e130e --- /dev/null +++ b/include/conduitGroup.h @@ -0,0 +1,171 @@ +/// +/// \file conduitGroup.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CONDUITGROUP_H +#define CONDUITGROUP_H + +#include +#include + +#include +#include + + +/** + * Principal constructor has:\n + * \param _groupName assigned group name + * \param _ccc ca_client_context + * \param _groupID unique group identifier (CA_SYNC_GID) + * \param _nMember number of members in group + * \param _memberCC CAFEConduit object representing each group member + * \param _groupStatus groupStatus: error indicates >0 members have an error + */ +class ConduitGroup +{ + friend struct change_channelTimeoutPolicySGPut; + friend struct change_channelTimeoutPolicySGGet; + friend struct change_timeout_sg_pend_io; + friend struct change_sg_rule; + friend class Connect; + +private: + static unsigned int groupHandleNext; + unsigned int nMember; + ca_client_context * ccc; + + double timeout_sg_pend_io; + + ChannelTimeoutPolicy channelTimeoutPolicySGGet; + ChannelTimeoutPolicy channelTimeoutPolicySGPut; + + union db_access_val ** dataBuffer; + + friend std::ostream& operator<<(std::ostream& os, const ConduitGroup& e) + { + os<< "handle=" << e.groupHandle<<" name=" << e.groupName<< " nMember=" << e.nMember << std::endl; + return os; + }; + +public: + std::string groupName; + unsigned int groupHandle; + CA_SYNC_GID groupID; + + int * mStatus; + bool * mRule; + + unsigned int * mHandle; + + virtual ~ConduitGroup(); + + ConduitGroup(); + ConduitGroup(const char * _groupName, ca_client_context * _ccc, CA_SYNC_GID _groupID, + unsigned int _nMember, unsigned int * _handle); + + int get(void) const; + int put(void) const; + + ca_client_context * getClientContext(void) const {return ccc;}; + const char * getGroupName(void) const {return groupName.c_str();}; + string getGroupNameAsString(void) const {return groupName;}; + CA_SYNC_GID getGroupID(void) const {return groupID;}; + unsigned int getNMember(void) const {return nMember;}; + int * getStatus(void) const {return mStatus;}; + bool * getRule(void) const {return mRule;}; + bool getRule(unsigned int i) const {return mRule[i];}; + unsigned int getGroupHandle(void) const {return groupHandle;}; + ChannelTimeoutPolicy getChannelTimeoutPolicySGPut(void) const {return channelTimeoutPolicySGPut;}; + ChannelTimeoutPolicy getChannelTimeoutPolicySGGet(void) const {return channelTimeoutPolicySGGet;}; + }; + + + +/** + * Friend to ConduitGroup permitting fast modification of the rule in group hash table; + * the rule flag only functions within a PVGroup + */ +struct change_sg_rule +{ + change_sg_rule (const bool & new_rule, const unsigned int & iMember): + new_rule(new_rule),iMember(iMember){} + + void operator() (ConduitGroup& g) {g.mRule[iMember] = new_rule;} + +private: + bool new_rule; + unsigned int iMember; +}; + + +/** + * Friend to ConduitGroup permitting fast modification of status in group hash table; + */ +struct change_sg_status +{ + change_sg_status (const int & new_status, const unsigned int & iMember): + new_status(new_status),iMember(iMember){} + + void operator() (ConduitGroup& g) { + g.mStatus[iMember] = new_status; + } + +private: + int new_status; + unsigned int iMember; +}; + +/** + * friend to ConduitGroup permitting fast modification to \n + * the timeout_sg_pend_event period recorded in ConduitGroup hash table + */ +struct change_timeout_sg_pend_io +{ + change_timeout_sg_pend_io (const double & new_timeout_sg_pend_io): + new_timeout_sg_pend_io(new_timeout_sg_pend_io){} + void operator() (ConduitGroup& g) {g.timeout_sg_pend_io = new_timeout_sg_pend_io;} + +private: + double new_timeout_sg_pend_io; +}; + + +/** + * Friend to ConduitGroup records the channelTimeoutPolicySGGet in hash table + */ +struct change_channelTimeoutPolicySGGet +{ + change_channelTimeoutPolicySGGet (const ChannelTimeoutPolicy & new_channelTimeoutPolicy): + new_channelTimeoutPolicy(new_channelTimeoutPolicy){} + + void operator() (ConduitGroup & g) { + //This does a deep copy! + g.channelTimeoutPolicySGGet = new_channelTimeoutPolicy; + } +private: + ChannelTimeoutPolicy new_channelTimeoutPolicy; +}; + + +/** + * Friend to ConduitGroup records the channelTimeoutPolicySGPut in hash table + */ +struct change_channelTimeoutPolicySGPut +{ + change_channelTimeoutPolicySGPut (const ChannelTimeoutPolicy & new_channelTimeoutPolicy): + new_channelTimeoutPolicy(new_channelTimeoutPolicy){} + + void operator() (ConduitGroup & g) { + //This does a deep copy! + g.channelTimeoutPolicySGPut = new_channelTimeoutPolicy; + } +private: + ChannelTimeoutPolicy new_channelTimeoutPolicy; +}; + + + +#endif diff --git a/include/connect.h b/include/connect.h new file mode 100644 index 0000000..a085ab3 --- /dev/null +++ b/include/connect.h @@ -0,0 +1,594 @@ +/// +/// \file connect.h +/// \author Jan Chrin, PSI +/// \date Release February: 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef CONNECT_H +#define CONNECT_H + +// generated by autotools +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include + +#if HAVE_BOOST_THREAD +#include +#include +#endif + + + + +class Connect +{ + protected: + int status; + CAFEStatus cafeStatus; + CAFEStatusSeverity cafeStatusSeverity; + + cafeConduit_set::iterator itcs; + cafeGroup_set::iterator itgs; + + CAFEDataTypeCode cafeDataTypeCode; + + ExceptionsHelper exceptionsHelper; + + ChannelCreatePolicy channelCreatePolicy; + + PolicyHelper policyHelper; + HandleHelper handleHelper; + Helper helper; + + std::string deviceAttributeDeliminator; + + bool pyCafeFlag; + + //connectCallbacks.cc + static void callbackHandlerAccessRights(struct access_rights_handler_args args); + + static void callbackHandlerException (struct exception_handler_args args); + + //connect.cpp + int createChannel(unsigned int handle, const char * pv, chid &pCh); + int createHandle(const char * pv, ca_client_context * ccc, unsigned int &handle) + //int createHandle(const char * pv, ca_client_context * ccc, ChannelRequestPolicy channelRequestPolicyPut, unsigned int &handle) + throw (CAFEException_pv); + + int contextDestroy(); + int contextDestroy(ca_client_context * cctLocal); + + unsigned short epicsVersion(unsigned short & major, unsigned short & minor, unsigned short & patch); + + //group functions + + int createChannelWithinGroup(unsigned int handle, const char * pv, chid &pCh); + int createHandleWithinGroup(const char * pv, ca_client_context * ccc, unsigned int & _handle) + throw (CAFEException_pv); + + public: + + + Connect(){ + + channelMonitorPolicy.setPolicy( + (ChannelWhenToFlushSendBufferPolicyKind) CAFENUM::FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION, + CAFENUM::WITH_FLUSH_IO, DEFAULT_TIMEOUT_PEND_IO); + + channelOpenGroupPolicy.setPolicy( + CAFENUM::FLUSH_AFTER_EACH_GROUP_CREATION, + CAFENUM::WITH_PEND_EVENT, DEFAULT_TIMEOUT_SG_PEND_EVENT); + + channelOpenPolicy.setPolicy( + CAFENUM::FLUSH_AFTER_EACH_CHANNEL_CREATION, + CAFENUM::WITH_PEND_EVENT, DEFAULT_TIMEOUT_PEND_EVENT); + + deviceAttributeDeliminator=DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR; + +#if HAVE_PYTHON_H + pyCafeFlag=true; +#else + pyCafeFlag=false; +#endif + }; + + //these need to be public + + PrintErrorPolicy printErrorPolicy; + + ChannelOpenPolicy channelOpenPolicy; + ChannelOpenPolicy channelClosePolicy; //can also use for close + ChannelOpenPolicy channelMonitorPolicy; + ChannelOpenPolicy channelOpenGroupPolicy; + + + //28 May 2017 + ChannelRequestPolicy channelRequestPolicyMasterPut; + ChannelRequestPolicy channelRequestPolicyMasterGet; + ChannelRequestPolicy channelRequestPolicyMasterGetCtrl; + ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicyMaster; + + //ChannelOpenPolicy getChannelOpenPolicy(){return channelOpenPolicy;} + //ChannelOpenPolicy getChannelClosePolicy(){return channelClosePolicy;} + //ChannelOpenPolicy getChannelMonitorPolicy(){return channelMonitorPolicy;} + //ChannelOpenPolicy getChannelOpenGroupPolicy(){return channelOpenGroupPolicy;} + + HandleHelper getHandleHelper() {return handleHelper;} + HandleHelper getInfo() {return handleHelper;} + PolicyHelper getPolicyHelper() {return policyHelper;} + PolicyHelper getPolicy() {return policyHelper;} + + unsigned int getNelemClient(unsigned int h){ return handleHelper.getNelemClient(h);} + unsigned int getNelemNative(unsigned int h){ return handleHelper.getNelemNative(h);} + unsigned int getNelemRequest(unsigned int h){ return handleHelper.getNelemRequest(h);} + + int getStatus() {return status;} + + CAFEStatus getCafeStatus() {return cafeStatus;} + CAFEStatusSeverity getCafeStatusSeverity() {return cafeStatusSeverity;} + + int flushNow() {return ca_flush_io();} + + int _ca_flush_io(){return ca_flush_io();} + int _ca_poll(){return ca_poll();} + int _ca_pend_io(double t){return ca_pend_io(t);} + int _ca_pend_event(double t){return ca_pend_event(t);} + + //connect.cc + bool setPyCafe(bool b){return pyCafeFlag=b;}; + bool getPyCafe(){return pyCafeFlag;} ; + int init() throw (CAFEException_init); + int init(ca_preemptive_callback_select select) throw (CAFEException_init); + + //std::string + int open(const string pvS, unsigned int &handle) throw (CAFEException_open){ + try { open (pvS.c_str(), handle);} catch(CAFEException_open &e) {throw e;}; + } + int open(const string pvS, const std::string pvAliasS, unsigned int &handle) + throw (CAFEException_open){ + try { open (pvS.c_str(), pvAliasS.c_str(), handle);} catch(CAFEException_open &e) {throw e;}; + } + int open(const string *pvArrayS, unsigned int *handleArray, const unsigned int nHandles) + throw (CAFEException_open); + + //const char *pv + int open(const char *pv, unsigned int &handle) throw (CAFEException_open); + int open(const char *pv, const char *pvAlias, unsigned int &handle) + throw (CAFEException_open); + + int open(const char **pvArray, unsigned int *handleArray, const unsigned int nHandles) + throw (CAFEException_open); + int open(vector, vector &) throw (CAFEException_open); + int open(vector, vector &) throw (CAFEException_open); + + int openV(vector s, vector &i) throw (CAFEException_open) + {return open(s,i); }; + + +//################################################################################ + + + void openGroupPrepare(){ + channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + return; + } + + void openMonitorPrepare(){ + channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO); + channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + return; + } + + double setOpenDefaultPendTime(double _timeout){ + return channelOpenPolicy.setDefaultTimeout(_timeout); + } + + double getOpenDefaultPendTime(){ + return channelOpenPolicy.getDefaultTimeout(); + } + + + void openGroupNowAndWait(double _timeout){ + double dto = channelOpenGroupPolicy.getTimeout(); + channelOpenGroupPolicy.setTimeout(_timeout); + channelOpenGroupPolicy.flushSendBufferNow(); + // + //reset + channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + //channelOpenGroupPolicy.setTimeoutToDefault(); + channelOpenGroupPolicy.setTimeout(dto); + return; + } + + void openMonitorNow(){ + channelMonitorPolicy.flushSendBufferNow(); + //reset + channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO); + return; + } + + void openMonitorNowAndWait(double _timeout){ + channelMonitorPolicy.setTimeout(_timeout); + channelMonitorPolicy.flushSendBufferNow(); + //reset + channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO); + return; + } + + void openPrepare() { + channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + return; + } + + void openNowAndWait(double _timeout) { + double dto = channelOpenPolicy.getTimeout(); + channelOpenPolicy.setTimeout(_timeout); + channelOpenPolicy.flushSendBufferNow(); + //reset + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + //channelOpenPolicy.setTimeoutToDefault(); + channelOpenPolicy.setTimeout(dto); + return; + } + + void openNow() { + channelOpenPolicy.flushSendBufferNow(); + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + return; + } + + void openNoWait(){ + channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + return; + } + + bool initCallbackComplete(vector hV) { + return initCallbackComplete(&hV[0], hV.size()); + } + + bool initCallbackComplete(unsigned int * hArray, unsigned int nelem); + + + + //################################################################################# + + unsigned int printHandle(unsigned int h){return handleHelper.printHandle(h);}; + unsigned int printHandles(void){return handleHelper.printHandles();}; + unsigned int printDisconnectedHandles(void){return handleHelper.printDisconnectedHandles();}; + unsigned int getDisconnectedHandles(vector &dhV, vector &pvV) + {return handleHelper.getDisconnectedHandles(dhV, pvV);}; + + + void printCAFEException_pv(CAFEException_pv & e){exceptionsHelper.printCAFEException_pv(e);}; + + + + + + + //closeChannel(s) only close within a context + int closeChannels(unsigned int * handleArray, unsigned int nHandles); + int closeChannels(vector v){ + + //unsigned int * handleArray = new unsigned int[v.size()]; + //int status= closeChannels(handleArray, v.size()); + //delete [] handleArray; + //return status; + return closeChannels(&v[0], v.size()); + }; + int closeChannelsV(vector v){ + //unsigned int * handleArray = new unsigned int[v.size()]; + //int status= closeChannels(handleArray, v.size()); + //delete [] handleArray; + //return status; + return closeChannels(&v[0], v.size()); + }; + + + int close(unsigned int handle); + int closeChannel(unsigned int handle){return close(handle);}; + int closeChannels(); + int closeChannels(ca_client_context * cctLocal); + int close(){return closeChannels();}; + + //closeHandle(s) close regardless of context + int closeHandlesV(vector v){ return closeHandles(&v[0], v.size());} + int closeHandles (vector v){ return closeHandles(&v[0], v.size());} + + + int closeHandles(unsigned int * handleArray, unsigned int nHandles); + int closeHandle(unsigned int handle); + int closeHandles(); + + // Monitors + int monitorStart(unsigned int handle, MonitorPolicy &mp); + int monitorStart(unsigned int handle, unsigned int & monitorID); + int monitorStart(unsigned int handle) { + unsigned int monitorID; return monitorStart(handle, monitorID); + } + + int monitorStop (unsigned int handle, MonitorPolicy mp); + int monitorStop (unsigned int handle, unsigned int monitorID); + int monitorStopWithID (unsigned int handle, unsigned int monitorID){ + return monitorStop(handle, monitorID);} + int monitorStop (unsigned int handle); //stop all monitors for this handle + int monitorStop (); + int monitorStopAll (){return monitorStop();}; + int monitorStop (ca_client_context * ccc); + + // Monitors for arrays and vectors + int monitorStart(unsigned int * handleArray, unsigned int nelem) { + int * statusArray = new int[nelem]; + MonitorPolicy * mpV = new MonitorPolicy[nelem]; + status = monitorStart (handleArray, nelem, statusArray, mpV); + delete [] statusArray; delete [] mpV; + return status; + } + + int monitorStart(unsigned int * handleArray, unsigned int nelem, int *statusArray, + MonitorPolicy * mpV); + int monitorStart(unsigned int * handleArray, unsigned int nelem, int *statusArray, + unsigned int * monitorIDArray); + int monitorStart(vector handleV, vector &statusV, + vector &mpV); + int monitorStart(vector handleV, vector &statusV, + vector &monitorIDV); + int monitorStop (unsigned int * handleArray, unsigned int nelem, int *statusArray); + int monitorStop (vector handleV, vector &statusV); + + int monitorStop(unsigned int * handleArray, unsigned int nelem) { + int * statusArray = new int[nelem]; + status = monitorStop (handleArray, nelem, statusArray); + delete [] statusArray; + return status; + } + + + MonitorPolicy * createMonitorPolicyArray(const unsigned int nmp) { + MonitorPolicy * mpArray = new MonitorPolicy[nmp]; + return mpArray; + } + + int terminate(); + int terminate(ca_client_context * cctLocal); + + unsigned int getHandleFromPV(const char * pv) {return handleHelper.getHandleFromPV(pv); } + const char * getPVFromHandle(unsigned int handle){ + return handleHelper.getPVFromHandle(handle); + } + + + + unsigned int getHandleFromPVWithinGroup(const char * pv, unsigned int grh) { + return handleHelper.getHandleFromPVWithinGroup(pv, grh); } + + + bool isEnum(unsigned int handle) {return handleHelper.isEnum(handle);} + + bool isValid(unsigned int handle) { for (itcs = cs.begin(); itcs != cs.end(); ++itcs) + {if ((*itcs).getHandle()==handle) {return true;}} return false;} + + bool allChannelsConnected() { for (itcs = cs.begin(); itcs != cs.end(); ++itcs) + {if (!(*itcs).isConnected()) {return false;}} return true;} + + bool isConnected(unsigned int handle) { + return isChannelConnected(handle); + } + + bool isChannelConnected(unsigned int handle){cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) {return (*it_handle).isConnected();} + else {std::cout<< "Input handle " << handle << " does not exists! " << std::endl; return false;}} + int getChannelInfo(unsigned int handle, ChannelRegalia & channelInfo){ + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) {channelInfo=(*it_handle).getChannelRegalia(); return ICAFE_NORMAL;} + else {return ECAFE_INVALID_HANDLE;} + }; + chid getChannelID(unsigned int handle){cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) {return (*it_handle).getChannelID();} + else {std::cout<< "Input handle " << handle << " does not exists! " << std::endl; return NULL;}} + + + ca_client_context * getClientContext(const char * pvname){ + return handleHelper.getContextFromPV(pvname); + } + + ca_client_context * getClientContext(unsigned int handle){ + return handleHelper.getContextFromHandle(handle); + } + + int attachContext(ca_client_context *ccc){ + if (ccc != NULL) { + return ca_attach_context(ccc); + } else { return ECAFE_NULLCONTEXT;} + } + + int attachContextByPVName(const char * pvname){ + ca_client_context * ccc=getClientContext(pvname); + if (ccc != NULL) { + return ca_attach_context(ccc); + } else { return ECAFE_NULLCONTEXT;} + } + + int attachContextByHandle(unsigned int handle){ + ca_client_context * ccc=getClientContext(handle); + if (ccc != NULL) { + return ca_attach_context(ccc); + } else { return ECAFE_NULLCONTEXT;} + } + + //Add these methods for QCafe + int updateAccessRead(unsigned int handle, int ar) {cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) { + + if ( (*it_handle).getAccessRead() != ar ) { + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_accessRead(ar)); + if(MUTEX){cafeMutex.unlock();} + } + return ICAFE_NORMAL;} + else {std::cout<< "Input handle " << handle << " does not exists! " << std::endl; + return ECAFE_INVALID_HANDLE;} + } + + int updateAccessWrite(unsigned int handle, int aw) {cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) { + if ( (*it_handle).getAccessWrite() != aw ) { + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_accessWrite(aw)); + if(MUTEX){cafeMutex.unlock();} + } + return ICAFE_NORMAL;} + else {std::cout<< "Input handle " << handle << " does not exists! " << std::endl; + return ECAFE_INVALID_HANDLE;} + } + + bool getReadAccess(unsigned int handle){cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) {return (bool) (*it_handle).getAccessRead();} + else {std::cout<< "Input handle " << handle << " does not exists! " << std::endl; return false;}} + + bool getWriteAccess(unsigned int handle){cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) {return (bool) (*it_handle).getAccessWrite();} + else {std::cout<< "Input handle " << handle << " does not exists! " << std::endl; return false;}} + + void printStatusMessage(int status) { + string s = getCafeStatus().csi.message(status); + string c = getCafeStatus().csc.message(status); + printf("%s\n",c.c_str()); + printf("%s\n",s.c_str()); + } + + int printStatus(unsigned int handle, int status); + int printStatusIfError(unsigned int handle, int status); + int printStatus(unsigned int * handleArray, unsigned int nelem, int * statusArray); + int printStatusIfError(unsigned int * handleArray, unsigned int nelem, int * statusArray); + int printStatus(vector handleV, vector statusV); + int printStatusIfError(vector handleV, vector statusV); + + + int setPVAlias(unsigned int handle, const char * pv) throw (CAFEException_open); + + // GROUP FUNCTIONS + + PVDataHolder * getPVData(vector handleArray); + + int collectionDefine(const char * collectionName, vector deviceV); + int collectionDefine(const char * collectionName, vector deviceV); + int collectionDefine(const char * collectionName, pv_string_t * deviceArray, unsigned int deviceLength); + int collectionFetch(const char * collectionName, vector &deviceListV); + int collectionFetch(const char * collectionName, vector &deviceListV); + int collectionFetch(const char * collectionName,deviceCollection &dC); + vector getCollections() const {return deviceCollectionV;}; + + + //To do: Add shared_ptr for this method to ensure memory release + int collectionMemberList(const char * collectionName, boost::shared_ptr &list, unsigned int &listLength); + //int collectionMemberList(const char * collectionName, dbr_string_t * &list, unsigned int &listLength); + + //To do: Add shared_ptr for this method to ensure memory release + int collectionList (boost::shared_ptr &clist, unsigned int &listLength); + //int collectionList (dbr_string_t * &clist, unsigned int &listLength); + + int collectionMemberList(const char * collectionName, vector &list); + int collectionList (vector &clist); + + int devicePositionOrderedMultiMap(const char * collectionName, std::multimap &posDev); + int devicePositionMap(const char * collectionName, std::map &posDev); + int devicePositionV(const char * collectionName, std::vector &dev, std::vector &pos); + + + int fetchIndexOfCollectionMember(const char *collectionName, const char * deviceName); + + bool isGroup(const char *); + bool isCollection(const char *); + + int groupOpen(const char *pv, unsigned int &groupHandle) throw (CAFEException_groupOpen); + int groupOpen(PVGroup &pvgroup, unsigned int &groupHandle) throw (CAFEException_groupOpen); + + + int groupClose(unsigned int groupHandle); + int groupClose(); + int groupCloseAll(){return groupClose(); }; + int groupHandleErase(); + int groupHandleErase(ca_client_context *ccc); + + int groupCombine(const char * newGroupName, const char * groupName1, + const char * groupName2); // PVGroup &pvGroup); + int groupCombine(const char * newGroupName, vector groupName);// PVGroup &pvGroup); + + + vector generateChannelList(vector inputStringV) { + return getFromGlobalChannelList(inputStringV); + } + + vector getFromGlobalChannelList(vector); + + + int groupDefine (const char * groupName, const char * collectionName, vector attributeV); + int groupDefine (const char * groupName, const char * collectionName, vector attributeV); + int groupDefine (const char * groupName, const char * collectionName, + pv_string_t * attributeArray, unsigned short attributeLength); + int groupDefine (const char * groupName, const char * collectionName, pv_string_t attribute){ + pv_string_t aA[1]; strcpy(aA[0], attribute); + return groupDefine(groupName, collectionName, aA, 1); + } + + int groupDefine (const char * groupName, vector deviceV, vector attributeV);// PVGroup &pvGroup); + int groupDefine (const char * groupName, vector deviceV, vector attributeV); + //PVGroup &pvGroup); + int groupDefine (const char * groupName, pv_string_t * deviceArray, unsigned int deviceLength, + pv_string_t * attributeArray, unsigned short attributeLength); // + + int groupDefine (const char * groupName, vector pvArrayV); // PVGroup &pvGroup); + int groupDefine (const char * groupName, vector pvArrayV); // PVGroup &pvGroup); + int groupDefine (const char * groupName, pv_string_t * pvArray, unsigned int pvArrayLength); + //PVGroup &pvGroup); + + //To do: Add shared_ptr for this method to ensure memory release + + int groupMemberList(const char * groupName, boost::shared_ptr &list, unsigned int &listLength); + //int groupMemberList(const char * groupName, dbr_string_t * &list, unsigned int &listLength); + + int groupList (boost::shared_ptr &glist, unsigned int &listLength); + //int groupList (dbr_string_t * &glist, unsigned int &listLength); + + int groupMemberList(const char * groupName, vector &list); + + int groupList (vector &glist); + + int fetchIndexOfGroupMember(const char *groupName, const char * pv); + + void setDeviceAttributeDeliminator(std::string d) {deviceAttributeDeliminator=d;}; + std::string getDeviceAttributeDeliminator() const {return deviceAttributeDeliminator;}; + + +}; + +#endif // CONNECT_H diff --git a/include/defines.h b/include/defines.h new file mode 100644 index 0000000..d751b62 --- /dev/null +++ b/include/defines.h @@ -0,0 +1,80 @@ +/// +/// \file defines.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 + +#ifndef DEFINES_H +#define DEFINES_H + +#include +#include + + +#define EV EPICSVERSION(HAVE_EPICS) + +#if (EPICS_VERSION==3) && (EPICS_MAJOR==14) && (EPICS_MINOR>=11) +#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY +#elif (EPICS_VERSION==3) && (EPICS_MAJOR>14) +#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY +#else +#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM +#endif + +//To match alarmString.h in EPICS +const unsigned short ALARM_SEVERITY_STRING_LENGTH = 4; // "NO_ALARM","MINOR","MAJOR", "INVALID" +const unsigned short ALARM_STATUS_STRING_LENGTH = 22; // "NO_ALARM","READ","WRITE", +//"HIHI","HIGH","LOLO","LOW","STATE","COS","COMM","TIMEOUT","HWLIMIT","CALC","SCAN","LINK", +//"SOFT","BAD_SUB","UDF","DISABLE","SIMM","READ_ACCESS","WRITE_ACCESS" + + +/** + * Define pCallback \n + */ +typedef void (*pCallback) (struct event_handler_args ARGS); +typedef void (*pCallbackConnection) (struct connection_handler_args ARGS); + + +const bool ADD_EXCEPTION_EVENT=false; //set to false for use with MATLAB +// Standard exception event is good enough +/** + * Size of char * array to hold pv and pvAlias names \n + */ +const short PVNAME_SIZE=MAX_STRING_SIZE +20; //from epicsTypes.h 40; +const short PVGROUP_PSEUDO_SIZE=1024; //determines max size of groupNameEntry for Pseudo groups + +//List all possible deliminators; code will separate dev/attriby when first of this list is found; +const std::string DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR=":"; //Only one deliminator + +typedef char pv_string_t[PVNAME_SIZE]; + +/** + * Default configuration parameters. Recall that if pend_event is too short \n + * then create callback function will still be called after the specified period + */ +const bool DEFAULT_SELF_GOVERNING_TIMEOUT = true; + +const double DEFAULT_TIMEOUT_PEND_IO_WF = 5.0; +const double TIMEOUT_PEND_IO_MIN = 0.00001; +const double TIMEOUT_PEND_IO_MAX = 20.0; // max timeout for first attempt (ntries=1) +const unsigned short DEFAULT_PEND_IO_NO_TRIES = 2; +const unsigned short PEND_IO_MAX_TRIES = 10; // safety net +const double DEFAULT_PEND_IO_INCREMENT_TIME = 2.0; +const double PEND_IO_INCREMENT_TIME_MIN= 0.05; +const double PEND_IO_INCREMENT_TIME_MAX= 10.0; +const double DEFAULT_TIMEOUT_PEND_EVENT = 0.4; +const double DEFAULT_TIMEOUT_PEND_IO = 3.0; +const double DEFAULT_TIMEOUT_SG_PEND_EVENT = 0.5; // plus nMember/NMEMBER_PER_SEC_SG_PEND_EVENT +const double NMEMBER_PER_SEC_SG_PEND_EVENT = 400; // +const double DEFAULT_TIMEOUT_SG_PEND_IO = 5.0; + +// Otherwise too many large databuffers are created +const unsigned int MAX_NELEM_FOR_CTRL_BUFFER = 8192; +// Keep at 1, else becomes problematic when wf is made a syn. group member (ch disconnect occurs for STSACK cb) +const unsigned int MAX_NELEM_FOR_STSACK_BUFFER = 1; +const unsigned int DEFAULT_NELEM_FOR_CTRL_BUFFER = 256; // if nelem exceeds above +const unsigned int DEFAULT_NELEM_FOR_STSACK_BUFFER = 1; // if nelem exceeds above + +const unsigned short MAX_NO_MONITORS_PER_CHANNEL = 4; // Can't start more than 4; 1 is more usual. + +#endif // DEFINES_H diff --git a/include/deviceCollection.h b/include/deviceCollection.h new file mode 100644 index 0000000..718a91c --- /dev/null +++ b/include/deviceCollection.h @@ -0,0 +1,115 @@ +/// +/// \file deviceCollection.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef DEVICECOLLECTION_H +#define DEVICECOLLECTION_H + +#include +#include +#include +#include +#include + +class collectionMember { +public: + collectionMember():deviceName(""),devicePosition(0){}; + virtual ~collectionMember(){}; + std::string deviceName; + float devicePosition; +}; + +class deviceCollection { + friend class Connect; + friend class CAFE; + //if HAVE_LIBQTXML + friend class loadCollectionXMLParser; + //endif +private: + std::string name; + std::string description; + std::vector cMembers; + std::vector attributes; + + Helper helper; +public: + deviceCollection():description("collection of devices"){}; + virtual ~deviceCollection(){}; + + std::string getName() const {return name;}; + std::string getDescription() const {return description;}; + std::vector getCMembers() const {return cMembers;}; + + std::vector getAttributes() const {return attributes;}; + std::vector getPositions() { + std::vector posV; posV.clear(); posV.reserve(cMembers.size()); + for (size_t i=0; i getMembers() { + std::vector memberV; memberV.clear(); memberV.reserve(cMembers.size()); + for (size_t i=0; i members; + std::vector xmlMembers; + std::vector collections; +public: + deviceGroup(){}; + virtual ~deviceGroup(){}; + + std::string getName() const {return id;}; + std::string getID() const {return id;}; + + std::string getDescription() const {return description;}; + std::vector getCMembers() const {return members;}; + std::vector getCollections() const {return collections;}; + std::vectorgetXMLMembers() const {return xmlMembers;}; +}; + + + +#endif // DEVICECOLLECTION_H diff --git a/include/enumStrings.h b/include/enumStrings.h new file mode 100644 index 0000000..e1a114f --- /dev/null +++ b/include/enumStrings.h @@ -0,0 +1,98 @@ +/// +/// \file enumStrings.h +/// \author Jan Chrin, PSi +/// \brief Modified from Astari's C++11 version. +/// Use boost::begin() boost::end() for C++ +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef ENUMSTRINGS_H +#define ENUMSTRINGS_H + +#include +#include +#include +#include +#include +#include + + +template +struct enumStrings +{ + static char const* data[]; +}; + +template +struct enumRefHolder +{ + T& enumVal; + enumRefHolder(T& enumVal): enumVal(enumVal) {} +}; + +template +struct enumConstRefHolder +{ + T const& enumVal; + enumConstRefHolder(T const& enumVal): enumVal(enumVal) {} +}; + +template +inline std::ostream& operator<<(std::ostream& str, enumConstRefHolder const& data) +{ + //Add check on enumStrings::data size to ensure correspondence with entries in cafeEnumEpics.h + + if ( boost::size( enumStrings::data) > (unsigned int) data.enumVal) { + return str << enumStrings::data[data.enumVal]; + } + else { + return str << "ERROR: enumStrings.h reports data.enumVal= " << data.enumVal + << " DOES NOT HAVE A STRING EQUIVALENT!"; + } +} + + +template +inline std::istream& operator>>(std::istream& str, enumRefHolder const& data) +{ + std::string value; + str >> value; + + // These two can be made easier to read in C++11 + // using std::begin() and std::end() + + //static auto begin = std::begin(enumStrings::data); + //static auto end = std::end(enumStrings::data); + //auto find = std::find(begin, end, value); + //if (find != end) + + if ( std::find( boost::begin(enumStrings::data), boost::end( enumStrings::data), value) != + boost::end( enumStrings::data)) + { + //data.enumVal = static_cast(std::distance(begin, find)); + data.enumVal = static_cast(std::distance(boost::begin(enumStrings::data), + std::find (boost::begin(enumStrings::data), boost::end(enumStrings::data), value ) )); + } + + + if (data.enumVal > boost::size( enumStrings::data) ) { + + std::cout << "ERROR: enumStrings.h reports data.enumVal = " << data.enumVal + << " is out of enum range = " << boost::size( enumStrings::data) << std::endl; + } + + return str; +} + + +template +enumConstRefHolder enumToString(T const& e) {return enumConstRefHolder(e);} + +template +enumRefHolder enumFromString(T& e) {return enumRefHolder(e);} + + + + +#endif // ENUMSTRINGS_H diff --git a/include/exceptions.h b/include/exceptions.h new file mode 100644 index 0000000..cf1d5d1 --- /dev/null +++ b/include/exceptions.h @@ -0,0 +1,106 @@ +/// +/// \file exceptions.h +/// \author Jan Chrin, PSI +/// \date November 2014 +/// \version CAFE 1.0.0 +/// + +#ifndef EXCEPTIONS_H +#define EXCEPTIONS_H + +#include +#include +#include +#include + +using namespace std; + +/** + * The CAFEException_pv struct for pv error reporting + */ +struct CAFEException_pv +{ + char pv [PVNAME_SIZE]; + char pvAlias[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; +}; + + +/** + * The CAFEException_group struct for group error reporting + */ +struct CAFEException_group +{ + char groupName [PVNAME_SIZE]; + unsigned int groupHandle; + int statusCode; + const char * statusCodeText; + const char * statusMessage; + const char * source; + unsigned int ln; +}; + + +/** + * The CAFEException_open class for ca open error reporting + */ +class CAFEException_open : public exception +{ + public: + virtual const char* what() const throw() + { + return "CAFEException_open exception: Could not establish link to pv"; + }; + + CAFEException_pv pvEx; +}; + +/** + * The CAFEException_groupOpen class for ca group open error reporting + */ +class CAFEException_groupOpen : public exception +{ + public: + virtual const char* what() const throw() + { + return "CAFEException_groupOpen exception: Could not establish link to group"; + }; + + CAFEException_group groupEx; +}; + + +/** + * The CAFEException_init + */ +class CAFEException_init: public exception +{ + public: + virtual const char* what() const throw() + { + return "CAFEException_init exception: \nChannel Access Error: ECA_ALLOCMEM when calling ca_context_create"; + }; +}; + + +/** + * The CAFEException_allocBufferMem + */ +class CAFEException_allocBufferMem: public exception +{ + public: + virtual const char* what() const throw() + { + return "CAFEException_allocBufferMem exception: \nCAFE ERROR: Cannot create space for pv data/ctrl buffer"; + }; +}; + + +#endif // EXCEPTION_H diff --git a/include/exceptionsHelper.h b/include/exceptionsHelper.h new file mode 100644 index 0000000..4e52931 --- /dev/null +++ b/include/exceptionsHelper.h @@ -0,0 +1,38 @@ +/// +/// \file exceptionsHelper.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef EXCEPTIONSHELPER_H +#define EXCEPTIONSHELPER_H + +#include "exceptions.h" +#include "statusCodes.h" +#include "defines.h" + +class ExceptionsHelper +{ +private: + CAFEDataTypeCode cafeDataTypeCode; + CAFEStatus cafeStatus; +public: + CAFEException_pv prepareCAFEException_pv(const char *pv, const char *pvAlias, + unsigned int handle, chid pCh, int status, + const char * source, unsigned int ln); + + CAFEException_group prepareCAFEException_group( + char groupName [PVNAME_SIZE], + unsigned int groupHandle, + int statusCode, + const char * source, + unsigned int ln); + + ExceptionsHelper(void){}; + ~ExceptionsHelper(void){}; + void printCAFEException_pv(CAFEException_pv & e); + + +}; +#endif // EXCEPTIONSHELPER_H diff --git a/include/global.h b/include/global.h new file mode 100644 index 0000000..f26ec17 --- /dev/null +++ b/include/global.h @@ -0,0 +1,36 @@ +/// +/// \file global.h +/// \brief For access to containers for callbacks +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + + +#ifndef GLOBAL_H +#define GLOBAL_H + +#include +#include +#include +#include +#include +#include + +extern bool CHECK_CONSISTENCY_CA_STATE; +extern bool MUTEX; +extern epicsMutex cafeMutex; +extern cafeConduit_set cs; +extern cafeGroup_set gs; +extern vector PVGroupV; +extern vector PVGroupPseudo; +extern vector deviceCollectionV; +extern map, string> groupPseudoMap; + +extern vector globalChannelList; + +extern string globalZmqStream; +extern string contentsS; +extern unsigned long nCBs; + +#endif // GLOBAL_H diff --git a/include/granules.h b/include/granules.h new file mode 100644 index 0000000..53c38d5 --- /dev/null +++ b/include/granules.h @@ -0,0 +1,98 @@ +/// +/// \file granules.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 + +/** + * Contains methods that are used by Instant template + * Among these are the Verify, Prepare, Execute + */ + +#ifndef GRANULES_H +#define GRANULES_H + +#include + +#include + +#if HAVE_BOOST_THREAD +#include +#include +#endif + + +#include +#include +#include + + + +class Granules { +public: + + template friend class Instant; + friend class CAFE; + Granules(){}; + +private: + HandleHelper helper; + CAFEStatus cafeStatus; + + ChannelRequestDataTypePolicy channelRequestDataTypePolicy; + + ChannelRequestPolicyKind methodKind; //for channelExecutePut + + ChannelRequestPolicy channelRequestPolicyPut; + ChannelRequestStatus channelRequestStatusPut; + + ChannelRequestPolicy channelRequestPolicyGet; + ChannelRequestStatus channelRequestStatusGet; + + ChannelRequestMetaDataClient channelRequestMetaDataClient; + ChannelRequestMetaData channelRequestMetaData; + ChannelRequestMetaData channelRequestMetaPrimitive; + + ChannelRequestPolicy channelRequestPolicyGetCtrl; + ChannelRequestStatus channelRequestStatusGetCtrl; + + ChannelRequestMetaDataClient channelRequestMetaCtrlClient; + ChannelRequestMetaData channelRequestMetaCtrl; + + ChannelTimeoutPolicy channelTimeoutPolicyGet; + ChannelTimeoutPolicy channelTimeoutPolicyPut; + + int channelVerifyPut (const unsigned int, chtype); //isChannelConnected //writeAccess + int channelPreparePut (const unsigned int); //nelem offset requestType + int channelExecutePut (const unsigned int); + + int waitForPutEvent (const unsigned int, double); + bool isPutCallbackDone (const unsigned int _handle); + + int channelVerifyGet (const unsigned int, chtype); //isChannelConnected //readAccess + int channelPrepareGet (const unsigned int); //nelem offset requestType + int channelExecuteGet (const unsigned int); //report status + int channelExecuteGetNoWait(const unsigned int); //report status + + int waitForManyGetEvents(const unsigned int * handleArray, unsigned int arrayLength, map & bundleResponse); + + int waitForGetEvent (const unsigned int, double); + bool isGetCallbackDone (const unsigned int _handle); + + int channelVerifyGetCtrl (const unsigned int, chtype); //isChannelConnected //readAccess + int channelPrepareGetCtrl (const unsigned int); //nelem offset requestType + int channelExecuteGetCtrl (const unsigned int); //report status + int channelExecuteGetCtrlNoWait(const unsigned int _handle); + + int waitForGetCtrlEvent(const unsigned int, double); + bool isGetCtrlCallbackDone(const unsigned int _handle); + + int status; + + chtype convertMatrix(const chtype nativeType, const chtype clientT); + +}; + + + +#endif // GRANULES_H diff --git a/include/handleHelper.h b/include/handleHelper.h new file mode 100644 index 0000000..aed7ca2 --- /dev/null +++ b/include/handleHelper.h @@ -0,0 +1,276 @@ +/// +/// \file handleHelper.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef HANDLEHELPER_H +#define HANDLEHELPER_H + +#include +#include +#include +#include +#include +#include +#include + + +class HandleHelper : public Helper { + + private: + CAFEStatus cafeStatus; + cafeConduit_set::iterator itcs; + + cafeGroup_set::iterator itgs; + + ChannelRequestMetaDataClient channelRequestMetaDataClient; + ChannelRequestMetaData channelRequestMetaData; + + ChannelRequestMetaDataClient channelRequestMetaCtrlClient; + ChannelRequestMetaData channelRequestMetaCtrl; + + ChannelDeviceAttribute channelDeviceAttribute; + + CAFEDataTypeCode cafeDataTypeCode; + + PrintErrorPolicy printErrorPolicy; + + struct etsNorm{ unsigned int secPastEpoch; unsigned int nsec;}; + struct etsDate{ int year; int mon; int day; + int hour; int min; int sec; unsigned long nsec;}; + + + public: + + HandleHelper(){}; + ~HandleHelper(){}; + + //Move to private if possible + int setSTS(unsigned int _handle, dbr_short_t a, dbr_short_t s, epicsTimeStamp ets); + + + etsNorm _etsNorm; + etsDate _etsDate; + + int checkConsistency(); + int checkConsistency(unsigned int _handle); + + int setChannelDeviceAttribute(std::string deliminator); + int setChannelDeviceAttribute(unsigned int _handle, std::string deliminator); + + int getChannelDevice(unsigned int _handle, std::string & device); + int getChannelAttribute(unsigned int _handle, std::string & attribute); + + int getChannelRegalia(unsigned int _handle, ChannelRegalia & channelInfo); + + int getChannelRequestStatusGetClassName(unsigned int _handle, ChannelRequestStatus &crsClassName); + int getChannelRequestStatusGetSTSACK (unsigned int _handle, ChannelRequestStatus &crsSTSACK); + int getChannelRequestStatusGetCtrl (unsigned int _handle, ChannelRequestStatus &crsCtrl); + int getChannelRequestStatusGet (unsigned int _handle, ChannelRequestStatus &crs); + + + //Add getPVFromHandle + ca_client_context * getContextFromPV (const char * _pv); + ca_client_context * getContextFromHandle (unsigned int _handle); + + const char * getPVFromHandle (unsigned int _handle); + const char * getPVFromHandle (unsigned int _handle, ca_client_context * ccc); + + unsigned int getHandleFromPV (const char * _pv); + unsigned int getHandleFromPV (const char * _pv, ca_client_context * ccc); + unsigned int getHandleFromPVAlias(const char * _pv); + unsigned int getHandleFromPVAlias(const char * _pv, ca_client_context * ccc); + + + vector getHandlesFromWithinGroupV(unsigned int gh); + unsigned int * getHandlesFromWithinGroup(unsigned int gh); + + unsigned int getHandleFromPVWithinGroup(const char * _pv, unsigned int gh); + unsigned int getHandleFromPVWithinGroup(const char * _pv, + ca_client_context * ccc, unsigned int gh); + + int getStatus (unsigned int h); + int getTimeStamp(unsigned int h, epicsTimeStamp &ts); + + + etsNorm getEpicsTimeStampAsUInt32(unsigned int h) { + epicsTimeStamp ts; + getTimeStamp(h, ts); + _etsNorm.secPastEpoch=ts.secPastEpoch; _etsNorm.nsec=ts.nsec; + return _etsNorm;}; + + etsDate getEpicsTimeStampAsDate(unsigned int h) { + epicsTimeStamp ts; + + getTimeStamp(h, ts); + + epicsTime time(ts); + + local_tm_nano_sec local = (local_tm_nano_sec) time; + _etsDate.year = local.ansi_tm.tm_year + 1900; + _etsDate.mon = local.ansi_tm.tm_mon + 1; + _etsDate.day = local.ansi_tm.tm_mday; + _etsDate.hour = local.ansi_tm.tm_hour; + _etsDate.min = local.ansi_tm.tm_min; + _etsDate.sec = local.ansi_tm.tm_sec; + + _etsDate.nsec = (unsigned long) ts.nsec; + + return _etsDate; + } + + etsDate epicsTimeStampToDate(epicsTimeStamp ts) { + epicsTime time(ts); + local_tm_nano_sec local = (local_tm_nano_sec) time; + _etsDate.year = local.ansi_tm.tm_year + 1900; + _etsDate.mon = local.ansi_tm.tm_mon + 1; + _etsDate.day = local.ansi_tm.tm_mday; + _etsDate.hour = local.ansi_tm.tm_hour; + _etsDate.min = local.ansi_tm.tm_min; + _etsDate.sec = local.ansi_tm.tm_sec; + _etsDate.nsec = (unsigned long) ts.nsec; + return _etsDate; + } + + + + int getPulseID(unsigned int h, unsigned int &pulseID) { + epicsTimeStamp ts; + int status=getTimeStamp(h, ts); + if (status==ICAFE_NORMAL){ + std::string nsS = static_cast( &(ostringstream() << ts.nsec) )->str(); + int l=nsS.length(); + int startPos=max(l-6,0); + std::string pidS = nsS.substr(startPos,min(6,l)); + if ( ! (istringstream(pidS) >> pulseID) ) pulseID = 0; + } + return status; + } + + unsigned int getPulseIDFromTS(epicsTimeStamp ts) { + unsigned int pulseID; + std::string nsS = static_cast( &(ostringstream() << ts.nsec) )->str(); + int l=nsS.length(); + int startPos=max(l-6,0); + std::string pidS = nsS.substr(startPos,min(6,l)); + if ( ! (istringstream(pidS) >> pulseID) ) pulseID = 0; + return pulseID; + } + + int getAlarmStatusSeverity(unsigned int h, dbr_short_t as[2]); + int getAlarmStatusSeverityAsString(unsigned int h, string asas[2]); + unsigned int getNoHandles(); + unsigned int getNextFreeHandle(); + + bool isChannelConnected(unsigned int handle); + + int printHandle (unsigned int h); + int printHandlesV(vector handleV); + int printHandles(unsigned int * handleArray, unsigned int nHandles); + unsigned int printHandles(); + unsigned int printChannels(){return printHandles();}; + unsigned int printDisconnectedHandles(); + unsigned int printDisconnectedChannels(){return printDisconnectedChannels();}; + unsigned int getDisconnectedHandles(vector &, vector &); + unsigned int getConnectedHandles(vector &, vector &); + unsigned int getHandles(vector &, vector &); + unsigned int getHandleStates(vector &, vector &, vector &); + unsigned int printMonitors(); + + vector getHandlesWithMonitors(); + int getMonitorHandlesAndActions(vector & handleV, vector & actionV); + + int setCafeDbrTypeV(vector _handleV, CAFENUM::DBR_TYPE cdt); + int setCafeDbrType(unsigned int _handle, CAFENUM::DBR_TYPE cdt); + int getCafeDbrType(unsigned int _handle, CAFENUM::DBR_TYPE &cdt); + + bool isEnum(unsigned int _handle); + short getEnumFromString(unsigned int _handle, string enumStringValue); + string getStringFromEnum(unsigned int _handle, unsigned short enumValue); + + int getDataTypeNative (unsigned int _handle, chtype &ndt); + int getDataTypeRequest(unsigned int _handle, chtype &rdt); + + int eraseMonitorAction(unsigned int _handle); + int clearMonitorAction(unsigned int _handle); + + int clearMonitorAction(); + + int addMonitorAction(unsigned int _handle, string mAction); + int getMonitorAction(unsigned int _handle, vector &msV); + vector getMonitorAction(bool onlyIfNewData); //all handles; false gives all + + int getMonitorPolicyVector(unsigned int _handle, vector &mpV); + int getMonitorPolicyInWaitingVector(unsigned int _handle, vector &mpV); + int getNmonitor(unsigned int _handle); + int getNmonitorData(unsigned int _handle); + int getNmonitorCtrl(unsigned int _handle); + vector getMonitorIDs(unsigned int _handle); + vector getMonitorIDsInWaiting(unsigned int _handle); + + unsigned int getUsrArgsAsUInt(unsigned int _handle); //From c.channelRequestMetaData.usrArg + chtype getDataTypeCB(unsigned int _handle); + chtype getDbrDataTypeCB(unsigned int _handle); + CAFENUM::DBR_TYPE getCafeDbrTypeCB(unsigned int _handle); + + //setNoElements + int setNelem (); //All handles to native + unsigned int setNelem (unsigned int _handle); //To Native + unsigned int setNelemToNative (unsigned int _handle){return setNelem(_handle);}; //To Native + unsigned int setNelem (unsigned int _handle, unsigned int _nelem); + //For Arrays: + unsigned int setNelemToRetrieveFromCache (unsigned int _handle); + unsigned int setNelemToRetrieveFromCache (unsigned int _handle, unsigned int _nelem); + unsigned int setNelemToRetrieveFromCtrlCache (unsigned int _handle); + unsigned int setNelemToRetrieveFromCtrlCache (unsigned int _handle, unsigned int _nelem); + unsigned int getNelemToRetrieveFromCache (unsigned int _handle); + unsigned int getNelemToRetrieveFromCtrlCache (unsigned int _handle); + + char * getPV (unsigned int _handle); + char * getPVAlias (unsigned int _handle); + + unsigned int getNelemClient (unsigned int _handle); + unsigned int getNelemNative (unsigned int _handle); + unsigned int getNelemRequest (unsigned int _handle); + + int getNelem(unsigned int _handle, unsigned int &c, unsigned int &n, unsigned int &r); + + //Ctrl + + unsigned int setNelemCtrl (unsigned int _handle, unsigned int _nelem); + unsigned int getNelemRequestCtrl (unsigned int _handle); + unsigned int getNelemClientCtrl (unsigned int _handle); + //setOffSet + unsigned int setOffset(unsigned int _handle, unsigned int _offset); + unsigned int getOffset(unsigned int _handle); + unsigned int getOffsetLast(unsigned int _handle); + + void setFirstAndLastArrayElements(unsigned int _handle, + unsigned int _start, unsigned int _last){ + if (_last > _start ) { setOffset(_handle, _start); setNelem(_handle, _last);} + else {std::cout << " offset must be less than the nelements" < +#include + +// boost include +#include +#include +#include +#include +#include + +using boost::multi_index_container; +using namespace boost::multi_index; + +struct by_handle{}; +struct by_channelID{}; +struct by_pv{}; +struct by_pvAlias{}; + + +typedef multi_index_container< + Conduit, + indexed_by< + ordered_unique< + tag, BOOST_MULTI_INDEX_MEMBER(Conduit, unsigned int, handle)>, + ordered_non_unique< + tag, BOOST_MULTI_INDEX_MEMBER(Conduit, chid, channelID)>, + ordered_non_unique< + tag, BOOST_MULTI_INDEX_MEMBER(Conduit, std::string, pv)>, + ordered_non_unique< + tag, BOOST_MULTI_INDEX_MEMBER(Conduit, std::string, pvAlias)>, + //ordered_non_unique< + //tag, BOOST_MULTI_INDEX_MEMBER(Conduit, unsigned int, uniqueID)>, + hashed_unique > + > + > cafeConduit_set; + + +typedef cafeConduit_set::index::type cafeConduit_set_by_channelID; +typedef cafeConduit_set::index::type cafeConduit_set_by_handle; +typedef cafeConduit_set::index::type cafeConduit_set_by_pv; +typedef cafeConduit_set::index::type cafeConduit_set_by_pvAlias; + + +#endif // HASHCONDUIT_H diff --git a/include/hashConduitGroup.h b/include/hashConduitGroup.h new file mode 100644 index 0000000..289dabf --- /dev/null +++ b/include/hashConduitGroup.h @@ -0,0 +1,45 @@ +/// +/// \file hashConduitGroup.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef HASHCONDUIT_GROUP_H +#define HASHCONDUIT_GROUP_H + +#include "conduitGroup.h" + +// boost include +#include +#include +#include +#include +#include + +using boost::multi_index_container; +// namespace multi-indexing of reference handles to CAFEConduit objects +using namespace boost::multi_index; + +struct by_groupHandle{}; +struct by_groupID{}; +struct by_groupName{}; + +typedef multi_index_container< + ConduitGroup, + indexed_by< + ordered_unique< + tag, BOOST_MULTI_INDEX_MEMBER(ConduitGroup, unsigned int, groupHandle)>, + ordered_non_unique< + tag, BOOST_MULTI_INDEX_MEMBER(ConduitGroup, CA_SYNC_GID, groupID)>, + ordered_non_unique< + tag, BOOST_MULTI_INDEX_MEMBER(ConduitGroup, std::string, groupName)>, + hashed_unique > + > +> cafeGroup_set; + +typedef cafeGroup_set::index::type cafeGroup_set_by_groupID; +typedef cafeGroup_set::index::type cafeGroup_set_by_groupHandle; +typedef cafeGroup_set::index::type cafeGroup_set_by_groupName; + +#endif diff --git a/include/helper.h b/include/helper.h new file mode 100644 index 0000000..5f277be --- /dev/null +++ b/include/helper.h @@ -0,0 +1,37 @@ +/// +/// \file helper.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef HELPER_H +#define HELPER_H +#include +#include +#include +#include +#include + + +#include +#include +#include +#include + +class Helper +{ + public: + Helper(){}; + + void removeLeadingAndTrailingSpacesDbrString(const char * _pv, char pvStripped[MAX_STRING_SIZE]); + void removeLeadingAndTrailingSpacesPseudo(const char * _pv, char pvStripped[PVGROUP_PSEUDO_SIZE]); + void removeLeadingAndTrailingSpaces(const char * _pv, char pvStripped[PVNAME_SIZE]); + unsigned int convertToUniqueNumber(const char * pv, ca_client_context * ccc, unsigned int ghs); + unsigned int convertToUniqueNumber(const char * pv, ca_client_context * ccc); + CAFENUM::DBR_TYPE convertToCAFEDbrTypeClass(const chtype _chtype) const; + + std::string concatToString(dbr_char_t * inChar, unsigned int nChar); +}; + +#endif // HELPER_H diff --git a/include/instant.cpp b/include/instant.cpp new file mode 100644 index 0000000..b4f1779 --- /dev/null +++ b/include/instant.cpp @@ -0,0 +1,2145 @@ +/// +/// \file instant.cpp +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef INSTANT_CPP +#define INSTANT_CPP + +/** + * \brief Set values of data type CTYPE + * \param _handle input: handle to CAFEConduit object + * \param _dbrType input: chtype + * \param _val value/array of values of datatype const CTYPE + * \return ECA_NORMAL if all OK else CAFE_ or ECA_ error + * \return CAFE_ error if CAFEConduit::putCallback() operation is not to be executed: + * \return ECAFE_INVALID_HANDLE - Invalid reference handle + * \return ECAFE_NOWTACCESS - Write access denied + * \return ICAFE_CA_OP_CONN_DOWN - Channel is not connected + * \return ECA_ error from CAFEConduit::putCallback() operation: + * \return (*) should not arise due to pre-checks + * \return ECA_NORMAL - Normal successful completion + * \return ECA_BADCHID - Corrupted Channel Identifier (chid) + * \return ECA_BADTYPE (*) - Invalid DBR_XXX type + * \return ECA_BADCOUNT (*) - Requested count larger than native element count + * \return ECA_NOWTACCESS (*) - Write access denied + * \return ECA_ALLOCMEM - Unable to allocate memory + * \return ECA_DISCONN (*) - Channel is disconnected + */ +template int Instant::set(const unsigned int _handle, const chtype _dbrType, + const CTYPE * _val ) { +#define __METHOD__ "Instant::set(_handle, _dbrType, _val)" + + status=ICAFE_NORMAL; + + if (_dbrType > DBR_DOUBLE) { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "INTERNAL CAFE ERROR: HOW DID THIS PERCULIAR DATA TYPE: " + << dbr_type_to_text(_dbrType) << " GET THROUGH!" << endl; + } + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if ( (status=cafeGranules.channelVerifyPut(_handle, _dbrType)) != ICAFE_NORMAL) { + return status; + } + + if ( (status=cafeGranules.channelPreparePut(_handle)) != ICAFE_NORMAL) { + return status; + } + + if ( (status=clientRequests(_handle, _dbrType, _val)) != ICAFE_NORMAL) { + return status; + } + + if ( (status=cafeGranules.channelExecutePut(_handle)) != ICAFE_NORMAL) { + return status; + } + + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + + if(MUTEX) {cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_status(status)); + if(MUTEX) {cafeMutex.unlock();}; //unlock + + return status; + +#undef __METHOD__ +} + +/** + * \brief Retrieve values of data type CTYPE + * \param _handle input: handle to CAFEConduit object + * \param _dbrType input: chtype + * \param _val output: value/array of values of datatype const CTYPE + * \param alarmStatus output + * \param alarmSeverity output + * \param ts output: epicsTimeStamp + * \return ECA_NORMAL if all OK else CAFE_ or ECA_ error + * \return CAFE_ error if CAFEConduit::get() operation is not to be executed: + * \return ECAFE_INVALID_HANDLE - Invalid reference handle + * \return ECAFE_NORDACCESS - Read access denied + * \return ICAFE_CA_OP_CONN_DOWN - Channel is not connected + * \return ECA_ error from CAFEConduit::get() operation: + * \return (*) should not arise due to pre-checks + * \return ECA_NORMAL - Normal successful completion + * \return ECA_BADCHID - Corrupted Channel Identifier (chid) + * \return ECA_BADTYPE (*) - Invalid DBR_XXX type + * \return ECA_BADCOUNT (*) - Requested count larger than native element count + * \return ECA_NORDACCESS(*)- Read access denied + * \return ECA_ALLOCMEM - Unable to allocate memory + * \return ECA_DISCONN (*) - Channel is disconnected + */ +template int Instant::get(const unsigned int _handle, + const chtype _dbrType, CTYPE * _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { +#define __METHOD__ "Instant::get(_handle, dbrType, _val, alarmStatus, alarmSeverity, ts) " + + //cout << __FILE__ << " " << __LINE__ << " " << __METHOD__ << endl; + + status=ICAFE_NORMAL; + + if (_dbrType > DBR_CTRL_DOUBLE) { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "INTERNAL CAFE ERROR: HOW DID THIS PERCULIAR DATA TYPE: " + << dbr_type_to_text(_dbrType) << " GET THROUGH!" << endl; + } + else if (_dbrType > DBR_TIME_DOUBLE) { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "INTERNAL CAFE ERROR: METHOD NOT MEANT FOR THIS DATA TYPE: " + << dbr_type_to_text(_dbrType) << endl; + std::cout << "CAFE WILL THUS TAKE CONTROL OF ALLOCATING APPROPIATE DBR_TYPE" << endl; + } + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + + + if ( (*it_handle).getChannelGetActionWhenMonitorPolicy().getActionKind() == CAFENUM::GET_FROM_CACHE) { + if ( helper.getNmonitorData(_handle) >0){ + return Instant::getCache(_handle, _dbrType, _val, alarmStatus, alarmSeverity, ts); + } + } + + if ( (status=cafeGranules.channelVerifyGet(_handle, _dbrType)) != ICAFE_NORMAL) { + return status; + } + + //Here fill channelRequestMetaData + + if ( (status=cafeGranules.channelPrepareGet(_handle)) != ICAFE_NORMAL) { + return status; + } + + if ( (status=cafeGranules.channelExecuteGet(_handle)) != ICAFE_NORMAL) { + return status; + } + + channelRequestMetaDataClient = (*it_handle).getChannelRequestMetaDataClient(); + + + status=clientRequests( _handle, channelRequestMetaDataClient.getDbrDataType(), + _val, alarmStatus, alarmSeverity, ts, false); + + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + + if(MUTEX) {cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_status(status)); + if(MUTEX) {cafeMutex.unlock();}; //unlock + + return status; + +#undef __METHOD__ +} + + +/** + * \brief Retrieve cached values of data type CTYPE + * \param _handle input: handle to CAFEConduit object + * \param _dbrType input: chtype + * \param _val output: value/array of values of datatype const CTYPE + * \param alarmStatus output + * \param alarmSeverity output + * \param ts output: epicsTimeStamp + * \return ECA_NORMAL if all OK else CAFE_ or ECA_ error + * \return CAFE_ error if CAFEConduit::get() operation is not to be executed: + * \return ECAFE_INVALID_HANDLE - Invalid reference handle + * \return ECAFE_NORDACCESS - Read access denied + * \return ICAFE_CA_OP_CONN_DOWN - Channel is not connected + * \return ECA_ error from CAFEConduit::get() operation: + * \return (*) should not arise due to pre-checks + * \return ECA_NORMAL - Normal successful completion + * \return ECA_BADCHID - Corrupted Channel Identifier (chid) + * \return ECA_BADTYPE (*) - Invalid DBR_XXX type + * \return ECA_BADCOUNT (*) - Requested count larger than native element count + * \return ECA_NORDACCESS(*)- Read access denied + * \return ECA_ALLOCMEM - Unable to allocate memory + * \return ECA_DISCONN (*) - Channel is disconnected + */ +template int Instant::getCache(const unsigned int _handle, + const chtype _dbrType, CTYPE * _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { +#define __METHOD__ "Instant::getCache(_handle, dbrType, _val, alarmStatus, alarmSeverity, ts) " + + //cout << __FILE__ << " " << __LINE__ << " " << __METHOD__ << endl; + + status=ICAFE_NORMAL; + + ts.secPastEpoch= 0; // default value if cache does not have timeStamp + ts.nsec = 0; // default value if cache does not have timeStamp + alarmStatus =-1; // default value if cache does not have alarmStatus + alarmSeverity =-1; // default value if cache does not have alarmSeverity + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + //cout << __METHOD__ << "__" << __LINE__ << endl; + //cout << "(*it_handle).getChannelGetCacheWaitPolicy().getWaitKind()" << + //(*it_handle).getChannelGetCacheWaitPolicy().getWaitKind() << " 0=NO_CHECK 1=NO_WAIT 2=WAIT " << endl; + + + //meant for use in callbacks in monitors! + if ( (*it_handle).getChannelGetCacheWaitPolicy().getWaitKind() == CAFENUM::GET_CACHE_NO_CHECK) { + status=clientRequests(_handle, + _dbrType, _val, alarmStatus, alarmSeverity, ts, true); + + return status; + } + + + //ifNeverConnected - return error + if ( (*it_handle).getChannelRegalia().getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + + return ICAFE_CS_NEVER_CONN; + } + + + if (_dbrType > DBR_CTRL_DOUBLE) { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "INTERNAL CAFE ERROR: HOW DID THIS PERCULIAR DATA TYPE: " + << dbr_type_to_text(_dbrType) << " GET THROUGH!" << endl; + } + else if (_dbrType > DBR_TIME_DOUBLE) { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "INTERNAL CAFE ERROR: METHOD NOT MEANT FOR THIS DATA TYPE: " + << dbr_type_to_text(_dbrType) << endl; + std::cout << "CAFE WILL THUS TAKE CONTROL OF ALLOCATING APPROPIATE DBR_TYPE" << endl; + } + + chtype dbrtype =(*it_handle).getChannelRequestMetaData().getDbrDataType(); + + + //MetaData will have true DBR_XXX_YYY type + //Client is asking from cache for DBR_MMM_NNN + //Therefore have to prepare DBR_MMM_NNN from DBR_XXX_YY + CAFENUM::DBR_TYPE cafedbrtype= (*it_handle).getChannelRequestMetaData().getCafeDbrType(); + + + switch (cafedbrtype) + { + case CAFENUM::DBR_TIME: + dbrtype = dbf_type_to_DBR_TIME(_dbrType%DBR_STS_STRING); + break; + case CAFENUM::DBR_STS: + dbrtype = dbf_type_to_DBR_STS(_dbrType%DBR_STS_STRING); + break; + case CAFENUM::DBR_PRIMITIVE: + dbrtype = dbf_type_to_DBR(_dbrType%DBR_STS_STRING); + break; + default: + dbrtype = (*it_handle).getChannelRequestMetaData().getDbrDataType(); + cout << __METHOD__ << "/" << __LINE__ < int Instant::getCache(const unsigned int *handleArray, const unsigned int nelem, +const chtype _dbrType, CTYPE * val, int *statusArray, +dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts) { +#define __METHOD__ "Instant::getCache(handleArray, nelem, _dbrType, val, statusArray) " + + unsigned int nelemPrevious=1; + HandleHelper helper; + int gStatus=ICAFE_NORMAL; + bool statusSet=false; + + //cout << __FILE__ << " " << __LINE__ << " " << __METHOD__ << endl; + + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handleArray[i]); + + channelRequestStatusGet =(*it_handle).getChannelRequestStatusGet(); + + if (channelRequestStatusGet.getCallbackProgressKind() == CAFENUM::PENDING + && helper.getNmonitorData(handleArray[i])==0 + && (*it_handle).getChannelRequestPolicyGet().getMethodKind() + != CAFENUM::WITH_CALLBACK_USER_SUPPLIED + && (*it_handle).getChannelGetCacheWaitPolicy().getWaitKind() == CAFENUM::GET_CACHE_WAIT + && (*it_handle).isConnected() + ) { + + channelTimeoutPolicyGet = (*it_handle).getChannelTimeoutPolicyGet(); + + ca_flush_io(); + status=cafeGranules.waitForGetEvent(handleArray[i], channelTimeoutPolicyGet.getTimeout()); + + + if (status==ECAFE_TIMEOUT && channelTimeoutPolicyGet.getSelfGoverningTimeout()) { + unsigned short ntries=0; + while (status==ECAFE_TIMEOUT && ntries int Instant::set(const unsigned int *handleArray, const unsigned int nelem, + const chtype _dbrType, const CTYPE * val, int *statusArray) { +#define __METHOD__ \ +"Instant::set(unsigned int *handleArray, unsigned int nelem, const chtype _dbrType, dbr_double_t * val, int *statusArray)" + + int overallStatus=ICAFE_NORMAL; bool isGood=true; + + unsigned int nelemPrevious=1; + + for (unsigned int i=0; i int Instant::clientRequests( + const unsigned int _handle, const chtype _dbrType, const CTYPE * _val) { +#define __METHOD__ "Instant::clientRequests(*it_handle, _dbrType, _val)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + status=ICAFE_NORMAL; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + union db_access_val * PVDataL; + unsigned int nelem; + //unsigned int offset; + chtype dbrTypeRequest_DataBuffer; + + PVDataL = (*it_handle).getPutBuffer (); + nelem = (*it_handle).getChannelRequestMetaPrimitive().getNelem(); + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaPrimitive().getDbrDataType(); + + switch(_dbrType) { + case DBR_STRING: + status=renderString.putString(_handle, (dbr_string_t *) _val); + break; + case DBR_SHORT: + status=renderShort.put(_handle, (dbr_short_t *) _val, _dbrType ); + break; + case DBR_FLOAT: + status=renderFloat.put(_handle, (dbr_float_t *) _val, _dbrType); + break; + case DBR_ENUM: + status=renderEnum.put(_handle, (dbr_enum_t *) _val, _dbrType); + break; + case DBR_CHAR: + status=renderChar.put(_handle, (dbr_char_t *) _val, _dbrType); + break; + case DBR_LONG: + status=renderLong.put(_handle, (dbr_long_t *) _val, _dbrType); + break; + case DBR_DOUBLE: + status=renderDouble.put(_handle, (dbr_double_t *) _val, _dbrType); + break; + default: + cout << "ERROR: " << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_SWITCH_CASE); + cout << "SWITCH STATMENT NOT MEANT FOR CAFE DATATYPE=" << + _dbrType < int Instant::setAndGet(const unsigned int handleSet, const chtype dbrType, CTYPE valSet, CTYPE &valGet) { +#define __METHOD__ "Instant::setAndGet(const unsigned int handleSet,const chtype dbrType, CTYPE valSet, CTYPE &valGet" + //CheckPolicy + + CTYPE valGetA[1]; CTYPE valSetA[1]; + + valGetA[0]=0; valGet=0; + + valSetA[0] = (CTYPE) valSet; + + status=Instant::set(handleSet, dbrType, valSetA); + if (status==ICAFE_NORMAL) { + + unsigned int nelemPrevious, nelemRequestedCheck=0; + unsigned int nelemRequested=1; + nelemPrevious=helper.getNelemClient(handleSet); + //Check the number of elements requested? + if (nelemPrevious>1) { + nelemRequestedCheck = helper.setNelem(handleSet,nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + status=Instant::get(handleSet, dbrType, valGetA); + + if (nelemPrevious>1) { + helper.setNelem(handleSet,nelemPrevious); + } + + valGet=valGetA[0]; + } + else { + return status; + } + if(valSet==valGet) { + return ICAFE_NORMAL; + } + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Process Variable = " << helper.getPVFromHandle(handleSet) << endl; + cout << "Set Value: " << valSet << " Get Value: " << valGet << endl; + return ICAFE_SET_AND_GET_MISMATCH; +#undef __METHOD__ +} + + + + + +/** + * \brief 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 + * \param handleSet input: vector of handleSet + * \param dbrType input: chtype of set value + * \param valSet input: vector of CTYPE values to set + * \param handleMatch input: vector of handles of readback channel + * \param tolerance input: CTYPE of tolerance margin + * \param timeout input: double value; maximum time allowed for agreement to occur + * \param printFlag input: bool, set to true for diagnostics + * \return ECA_NORMAL if all OK, else first ECAFE error encountered, else ECAFE_TIMEOUT_SET_AND_MATCH + */ +template int Instant::setAndMatchMany(vector handleSet, chtype dbrType, vector valSet, vector handleMatch, + CTYPE tolerance, double timeout, bool printFlag){ +#define __METHOD__ "Instant::setAndMatchMany(vectorhandleSet, chtype, vectorvalSet, vectorhandleMatch, tolerance, timeout, printFlag)" + + + Connect connect; + CAFEStatus cstat; + + CTYPE valGetA[1]; CTYPE valSetA[1]; + + status=ICAFE_NORMAL; + + if (handleSet.size() != handleMatch.size() ) { + return ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + } + + if (handleSet.size() != valSet.size() ) { + return ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + } + + for (size_t i=0; i< handleSet.size(); ++i) { + + if (!helper.isChannelConnected(handleSet[i]) + || !helper.isChannelConnected(handleMatch[i])) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "NOT ALL CHANNELS CONNECTED: " << endl; + if (!helper.isChannelConnected(handleSet[i])) {helper.printHandle(handleSet[i]); status=helper.getStatus(handleSet[i]);} + if (!helper.isChannelConnected(handleMatch[i])) {helper.printHandle(handleMatch[i]); status=helper.getStatus(handleMatch[i]);} + } + + } + + + if (status!=ICAFE_NORMAL) {return status;} + + if(printFlag) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + } + + + for (size_t i=0; i< handleSet.size(); ++i) { + + + if (printFlag) { + + if (dbrType==DBR_CHAR) { + cout << "SETTING PV=" << helper.getPVFromHandle(handleSet[i]) << " to " << (unsigned short) valSet[i] << endl; + } + else { + cout << "SETTING PV=" << helper.getPVFromHandle(handleSet[i]) << " to " << valSet[i] << endl; + } + + cout << "READBACK PV=" << helper.getPVFromHandle(handleMatch[i]) + << " tolerance= " << fabs( (double) tolerance) << endl; + cout << "TIME ALLOWED FOR MATCH IS " << timeout << " (sec) " << endl; + + } + + } + + + vector valSetUpper; vector valSetLower; + + vector monitorID; + vector statMonitor; + vector nMonitors; + vector valGet; + + + vector nelemPreviousCache; + + valSetUpper.reserve( handleSet.size()); + + + valSetLower.reserve( handleSet.size()); + monitorID.reserve( handleSet.size()); + statMonitor.reserve( handleSet.size()); + valGet.reserve( handleSet.size()); + nMonitors.reserve( handleSet.size() ); + + + nelemPreviousCache.reserve(handleSet.size()); + + + for (size_t i=0; i< handleSet.size(); ++i) { + + + switch (dbrType) { + case DBR_LONG : + case DBR_SHORT : + case DBR_ENUM: + valSetUpper[i] = valSet[i] + abs((int)tolerance); + valSetLower[i] = valSet[i] - abs((int)tolerance); + break; + case DBR_CHAR : + valSetUpper[i] = (unsigned short) valSet[i] + abs((unsigned short) tolerance); + valSetLower[i] = (unsigned short) valSet[i] - abs((unsigned short) tolerance); + break; + case DBR_FLOAT: + case DBR_DOUBLE: + default: + + valSetUpper[i] = (CTYPE) (valSet[i] + fabs((double)tolerance)); + valSetLower[i] = (CTYPE) (valSet[i] - fabs((double)tolerance)); + + break; + } + + + + vector mpVMatch; + mpVMatch.clear(); + + helper.getMonitorPolicyVector(handleMatch[i], mpVMatch); + + + nMonitors[i]=mpVMatch.size(); + + monitorID[i]=0; + + ////valGetA[0][i]=0; + valGet[i]=0; + + statMonitor[i]=ICAFE_NORMAL; + + } + + + + for (size_t i=0; i< handleSet.size(); ++i) { + + //what is monitorpolicy?? + if (nMonitors[i]==0) { + + unsigned int _nelemPrevious, _nelemRequestedCheck=0; + unsigned int _nelemRequested=1; + _nelemPrevious=helper.getNelemClient(handleMatch[i]); + //Check the number of elements requested? + if (_nelemPrevious>1) { + _nelemRequestedCheck = helper.setNelem(handleMatch[i],_nelemRequested); //change handleSet to handleMatch 23/3/17 + if (_nelemRequestedCheck != _nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << _nelemPrevious << endl; + cout << "to: " << _nelemRequested << " but got instead: " + << _nelemRequestedCheck << endl; + } + } + + //first do get to update cache before monitor starts + status=Instant::get(handleMatch[i], dbrType, valGetA); + + valGet[i]=valGetA[0]; + + if (_nelemPrevious>1) { + helper.setNelem(handleMatch[i],_nelemPrevious); //change handleSet to handleMatch 23/3/17 + } + + + if (status!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + ChannelWhenToFlushSendBufferPolicyKind whenKind= + connect.channelMonitorPolicy.getWhenToFlushSendBuffer(); + connect.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_AUTOMATIC); + + statMonitor[i]=connect.monitorStart(handleMatch[i], monitorID[i]); + + if (statMonitor[i]!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(statMonitor[i]); + } + else { + if(printFlag) {cout << "MONITOR NOW IN PLACE FOR READBACK CHANNEL " << helper.getPVFromHandle(handleMatch[i]) << " WITH ID=" << monitorID[i] << endl;} + } + //revert to previous + if (whenKind != FLUSH_AUTOMATIC) { + connect.channelMonitorPolicy.setWhenToFlushSendBuffer(whenKind); + } + + } //if nMonitors + + ////valSetA[0][i]=valSet[i]; + + //set No of Elements to 1 + + unsigned int nelemPrevious, nelemRequestedCheck=0; + unsigned int nelemRequested=1; + + nelemPrevious=helper.getNelemClient(handleSet[i]); + //Check the number of elements requested? + if (nelemPrevious>1) { + nelemRequestedCheck = helper.setNelem(handleSet[i],nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + + + //policy set synchronous + ChannelRequestPolicy polPrevious, polNow; + + policyHelper.getChannelRequestPolicyPut(handleSet[i], polPrevious); + + polNow.setMethodKind(WITHOUT_CALLBACK); + polNow.setWaitKind(WAIT); + polNow.setWhenToFlushSendBuffer(FLUSH_AUTOMATIC); + + policyHelper.setChannelRequestPolicyPut(handleSet[i], polNow); + + + valSetA[0] = (CTYPE) valSet[i]; + + status=set(handleSet[i], dbrType, valSetA); + + if (status!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + policyHelper.setChannelRequestPolicyPut(handleSet[i], polPrevious); + + unsigned int nelemPreviousCheck=nelemPrevious; + nelemRequested=1; + //Switch back to previous value + //if (nelemPrevious>1) { + if(helper.getNelemRequest(handleSet[i])!= nelemPrevious) { + nelemPreviousCheck= helper.setNelem(handleSet[i],nelemPrevious); + if (nelemPreviousCheck != nelemPrevious) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to re-set the no. elements from: " + << nelemRequested << endl; + cout << "to the previous: " << nelemPrevious << " but got instead: " + << nelemPreviousCheck << endl; + } + } + + + //No of elements to get from Cache + + nelemPreviousCheck=0; + nelemRequested=1; nelemRequestedCheck=0; + nelemPreviousCache[i]=helper.getNelemRequest(handleMatch[i]); + + //Check the number of elements requested + //See set and Match; this needs to be checked + //Avoid problem when readback channel is the very same as the set(!) + if (nelemPreviousCache[i]>0 && helper.getNelemNative(handleMatch[i])>1) { + nelemRequestedCheck = helper.setNelemToRetrieveFromCache(handleMatch[i],nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPreviousCache[i] << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + + + } //for size_t + + //start time + + + + + double timeElapsed=0; double timeElapsed2=0; + double timeElapsedBase=0; + using namespace boost::posix_time; + + ptime timeStart(microsec_clock::local_time()); + + + for (size_t i=0; i< handleSet.size(); ++i) { + + + + valGetA[0]=0; + + status=Instant::getCache(handleMatch[i], dbrType, valGetA); + + valGet[i]=valGetA[0]; + + + + if (status !=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + ///valGet[i]=valGetA[0][i]; + if (dbrType==DBR_CHAR) {valGet[i] = (unsigned short) valGetA[0];} + + if(printFlag) { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + if (dbrType==DBR_CHAR) { + cout << "Current Cached Value = " << (unsigned short) valGet[i] << endl; + cout << "Lower/Upper Target Values = " << (unsigned short) valSetLower[i] << " and " << (unsigned short) valSetUpper[i] << endl; + } + else { + cout << "Current Cached Value = " << valGet[i] << endl; + cout << "Lower/Upper Target Values = " << valSetLower[i] << " and " << valSetUpper[i] << endl; + } + } + + } //for size_t + + + + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + + for (size_t i=0; i< handleSet.size(); ++i) { + + + while ( (valGet[i]>valSetUpper[i] || valGet[i]1 && status==ICAFE_NORMAL) { + + + + for (size_t ij=0; ij< handleMatch.size(); ++ij) { + status=Instant::getCache(handleMatch[ij], dbrType, valGetA); + valGet[ij]=valGetA[0]; + if (valGet[ij]>valSetUpper[ij] || valGet[ij]1) { + nelemPreviousCheck= helper.setNelemToRetrieveFromCache(handleMatch[i],nelemPreviousCache[i]); + if (nelemPreviousCheck != nelemPreviousCache[i]) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to re-set the no. elements from: " + << nelemRequested << endl; + cout << "to the previous: " << nelemPreviousCache[i] << " but got instead: " + << nelemPreviousCheck << endl; + } + } + + + + if (nMonitors[i]==0 && statMonitor[i]==ICAFE_NORMAL && printFlag) { + cout << "MONITOR NOW STOPPED FOR READBACK CHANNEL " << helper.getPVFromHandle(handleMatch[i]) << " WITH ID =" << monitorID[i] << endl; + int statm; + statm=connect.monitorStop(handleMatch[i], monitorID[i]); + if (status==ICAFE_NORMAL) {status=statm;} + } + + } //for + + +return status; +#undef __METHOD__ +} + + + +/** + * \brief Set Channel 1 followed by a readback of Channel 2 \n + * Method verifies whether or not the 2 values agree within the given tolerance and timeout \n + * Method returns with ECA_NORMAL as soon as a match is reached + * \param handleSet input: handleSet + * \param dbrType input: chtype of set value + * \param valSet input: CTYPE value to set + * \param handleMatch input: handle of readback channel + * \param tolerance input: CTYPE of tolerance margin + * \param timeout input: double value; maximum time allowed for agreement to occur + * \param printFlag input: bool, set to true for diagnostics + * \return ECA_NORMAL if all OK else first ECAFE error encountered + */ +template int Instant::setAndMatch(const unsigned int handleSet, const chtype dbrType, CTYPE valSet, const unsigned int handleMatch, + CTYPE tolerance, double timeout, bool printFlag){ +#define __METHOD__ "Instant::setAndMatch(handleSet, dbrType, valSet, handleMatch, tolerance, timeout, printFlag)" + //check both handles exists before proceeding + + Connect connect; + CAFEStatus cstat; + + if (!helper.isChannelConnected(handleSet) + || !helper.isChannelConnected(handleMatch)) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "NOT ALL CHANNELS CONNECTED: " << endl; + if (!helper.isChannelConnected(handleSet)) {helper.printHandle(handleSet); return helper.getStatus(handleSet);} + if (!helper.isChannelConnected(handleMatch)) {helper.printHandle(handleMatch); return helper.getStatus(handleMatch);} + } + + if (printFlag) { + + if (dbrType==DBR_CHAR) { + cout << "SETTING PV=" << helper.getPVFromHandle(handleSet) << " to " << (unsigned short) valSet << endl; + } + else { + cout << "SETTING PV=" << helper.getPVFromHandle(handleSet) << " to " << valSet << endl; + } + cout << "READBACK PV=" << helper.getPVFromHandle(handleMatch) + << " tolerance= " << fabs((double)tolerance) << endl; + cout << "TIME ALLOWED FOR MATCH " << timeout << " (sec) " << endl; + } + + vector mpVMatch; + helper.getMonitorPolicyVector(handleMatch, mpVMatch); + + unsigned short nMonitors=mpVMatch.size(); + + + CTYPE valSetUpper; CTYPE valSetLower; + + + switch (dbrType) { + case DBR_LONG : + case DBR_SHORT : + case DBR_ENUM: + valSetUpper = valSet + abs((int)tolerance); + valSetLower = valSet - abs((int)tolerance); + break; + case DBR_CHAR : + valSetUpper = (unsigned short) valSet + abs((unsigned short) tolerance); + valSetLower = (unsigned short) valSet - abs((unsigned short) tolerance); + break; + case DBR_FLOAT: + case DBR_DOUBLE: + default: + valSetUpper = (CTYPE) (valSet + fabs((double)tolerance)); + valSetLower = (CTYPE) (valSet - fabs((double)tolerance)); + break; + } + + + CTYPE valGetA[1]={0}; + CTYPE valGet=valGetA[0]; + + int statMonitor=ICAFE_NORMAL; + + unsigned int monitorIDis=0; + + //what is monitorpolicy?? + if (nMonitors==0) { + + unsigned int _nelemPrevious, _nelemRequestedCheck=0; + unsigned int _nelemRequested=1; + _nelemPrevious=helper.getNelemClient(handleMatch); + //Check the number of elements requested? + if (_nelemPrevious>1) { + _nelemRequestedCheck = helper.setNelem(handleMatch,_nelemRequested); ////change handleSet to handleMatch 23/3/17 + if (_nelemRequestedCheck != _nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << _nelemPrevious << endl; + cout << "to: " << _nelemRequested << " but got instead: " + << _nelemRequestedCheck << endl; + } + } + + //first do get to update cache before monitor starts + status=Instant::get(handleMatch, dbrType, valGetA); + //valGet=valGetA[0]; + + + if (_nelemPrevious>1) { + helper.setNelem(handleMatch,_nelemPrevious); ////change handleSet to handleMatch 23/3/17 + } + + if (status!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + ChannelWhenToFlushSendBufferPolicyKind whenKind= + connect.channelMonitorPolicy.getWhenToFlushSendBuffer(); + connect.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_AUTOMATIC); + + statMonitor=connect.monitorStart(handleMatch, monitorIDis); + + if (statMonitor!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(statMonitor); + } + else { + if(printFlag) {cout << "MONITOR STARTED WITH ID=" << monitorIDis<< endl;} + } + //revert to previous + if (whenKind != FLUSH_AUTOMATIC) { + connect.channelMonitorPolicy.setWhenToFlushSendBuffer(whenKind); + } + } + + CTYPE valSetA[1]; valSetA[0]=valSet; + + //set No of Elements to 1 + + unsigned int nelemPrevious, nelemRequestedCheck=0; + unsigned int nelemRequested=1; + nelemPrevious=helper.getNelemClient(handleSet); + //Check the number of elements requested? + if (nelemPrevious>1) { + nelemRequestedCheck = helper.setNelem(handleSet,nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + + //policy set synchronous + ChannelRequestPolicy polPrevious, polNow; + + policyHelper.getChannelRequestPolicyPut(handleSet, polPrevious); + + polNow.setMethodKind(WITHOUT_CALLBACK); + polNow.setWaitKind(WAIT); + polNow.setWhenToFlushSendBuffer(FLUSH_AUTOMATIC); + + policyHelper.setChannelRequestPolicyPut(handleSet, polNow); + + status=set(handleSet, dbrType, valSetA); + + if (status!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + policyHelper.setChannelRequestPolicyPut(handleSet, polPrevious); + + unsigned int nelemPreviousCheck=nelemPrevious; + nelemRequested=1; + //Switch back to previous value + //if (nelemPrevious>1) { + if(helper.getNelemRequest(handleSet)!= nelemPrevious) { + nelemPreviousCheck= helper.setNelem(handleSet,nelemPrevious); + if (nelemPreviousCheck != nelemPrevious) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to re-set the no. elements from: " + << nelemRequested << endl; + cout << "to the previous: " << nelemPrevious << " but got instead: " + << nelemPreviousCheck << endl; + } + } + + + //start time + + double timeElapsed=0; double timeElapsed2=0; + double timeElapsedBase=0; + using namespace boost::posix_time; + + ptime timeStart(microsec_clock::local_time()); + + // PVDataHolder pvdMatch; + // status=getCache(handleMatch, dbrType, pvdMatch); + + + //No of elements to get from Cache + + nelemPreviousCheck=0; + nelemRequested=1; nelemRequestedCheck=0; + nelemPrevious=helper.getNelemRequest(handleMatch); + + + + //Check the number of elements requested + if (nelemPrevious>0) { + nelemRequestedCheck = helper.setNelemToRetrieveFromCache(handleMatch,nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + + + + + + status=Instant::getCache(handleMatch, dbrType, valGetA); + + + + + ///if (dbrType==DBR_CHAR) {valGet = (unsigned short) valGetA[0];} + + + + if (status !=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + + + + if(printFlag) { + //cout << __METHOD__ << endl; + cout << "Current Cached Value = " ; + if (dbrType==DBR_CHAR) { + cout << (unsigned short) valGetA[0] << cout << endl; + cout << "Lower/Upper Target Values = " << (unsigned short) valSetLower << " and " << (unsigned short) valSetUpper << endl; + } + else { + cout << valGetA[0] << endl; + cout << "Lower/Upper Target Values = " << valSetLower << " and " << valSetUpper << endl; + } + } + + + + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + + + if (dbrType==DBR_CHAR) {valGet= (unsigned short) valGetA[0];} + + else { valGet=valGetA[0];} + + + + while ( (valGet>valSetUpper || valGetvalSetUpper || pvdMatch.getAsDouble()1) { + nelemRequestedCheck = helper.setNelemToRetrieveFromCache(handleMatch,nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + */ + + status=Instant::getCache(handleMatch, dbrType, valGetA); + + valGet=valGetA[0]; + + if (dbrType==DBR_CHAR) {valGet = (unsigned short) valGetA[0];} + //cout << "getCache(handleMatch, dbrType, valGetA) = " << valGet << endl; + //cout << valSetUpper << " U/L " << valSetLower << endl; + + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + timeElapsed2=timeElapsed-timeElapsedBase; + + if (printFlag && timeElapsed2>1 && status==ICAFE_NORMAL) { + + if (dbrType==DBR_CHAR) { + cout << "SET VALUE " << (unsigned short) valSet << " CURRENT VALUE " << (unsigned short) valGetA[0] + << " TimeElapsed " << timeElapsed << " (sec) " << endl; + } else { + cout << "SET VALUE " << valSet << " CURRENT VALUE " << valGetA[0] //pvdMatch.getAsDouble() + << " TimeElapsed " << timeElapsed << " (sec) " << endl; + } + + + timeElapsedBase=timeElapsed; + + } + + + #if HAVE_BOOST_THREAD + boost::this_thread::sleep_for(boost::chrono::microseconds(20)); + #else + #if HAVE_LINUX + usleep(20); + #endif + #endif + } + + + if (timeout <=timeElapsed ) { + cout << "*****TIMEOUT REACHED****** AFTER " << timeout << " (sec) " << endl; + + status=ECAFE_TIMEOUT_SET_AND_MATCH; + } + else { + if (printFlag) { + status=Instant::getCache(handleMatch, dbrType, valGetA); + if (dbrType==DBR_CHAR) { + cout << "GAME SET AND MATCH: SET VALUE= " << (unsigned short) valSet + << " LAST VALUE READ= " << (unsigned short) valGetA[0] //pvdMatch.getAsDouble() + << " TimeElapsed " << timeElapsed << " (sec) " << endl; + } + else { + cout << "GAME SET AND MATCH: SET VALUE= " << valSet << " LAST VALUE READ= " << valGetA[0] //pvdMatch.getAsDouble() + << " TimeElapsed " << timeElapsed << " (sec) " << endl; + } + + } + } + + + + + if (nelemPrevious>1) { + nelemPreviousCheck= helper.setNelemToRetrieveFromCache(handleMatch,nelemPrevious); + if (nelemPreviousCheck != nelemPrevious) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to re-set the no. elements from: " + << nelemRequested << endl; + cout << "to the previous: " << nelemPrevious << " but got instead: " + << nelemPreviousCheck << endl; + } + } + + + + + if (nMonitors==0 && statMonitor==ICAFE_NORMAL) { + if (monitorIDis !=0 ) { + cout << "STOPPED MONITOR WITH ID =" << monitorIDis << endl; + int statm; + statm=connect.monitorStop(handleMatch, monitorIDis); + + if (status==ICAFE_NORMAL) {status=statm;} + } + } + + return status; +#undef __METHOD__ +} + + +/** + * \brief Set Channel followed by a corresponding readback of Channel \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 + * \param dbrType input: chtype of set value + * \param valSet input: CTYPE value to set + * \param handleMatch input: handle of readback channel + * \param tolerance input: CTYPE of tolerance margin + * \param timeout input: double value; maximum time allowed for agreement to occur + * \param printFlag input: bool, set to true for diagnostics + * \return ECA_NORMAL if all OK else first ECAFE error encountered + */ +template int Instant::match(const chtype dbrType, CTYPE valSet, unsigned int handleMatch, + CTYPE tolerance, double timeout, bool printFlag){ +#define __METHOD__ "Instant::match(const chtype dbrType, CTYPE valSet, unsigned int handleMatch, \ + CTYPE tolerance,double timeout, bool printFlag)" + + vector valSetV; + vectorhandleMatchV; + valSetV.reserve(1); + handleMatchV.reserve(1); + valSetV.push_back(valSet); + handleMatchV.push_back(handleMatch); + + return matchMany(dbrType, valSetV, handleMatchV, tolerance, timeout, printFlag); +#undef __METHOD__ +} + + +/** + * \brief 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 + * \param dbrType input: chtype of set value + * \param valSet input: vector of CTYPE values to set + * \param handleMatch input: vector of handles of readback channel + * \param tolerance input: CTYPE of tolerance margin + * \param timeout input: double value; maximum time allowed for agreement to occur + * \param printFlag input: bool, set to true for diagnostics + * \return ECA_NORMAL if all OK else first ECAFE error encountered + */ +template int Instant::matchMany(const chtype dbrType, vector valSet, vector handleMatch, + CTYPE tolerance, double timeout, bool printFlag){ +#define __METHOD__ "Instant::matchMany(const chtype dbrType, vectorvalSet, vectorhandleMatch, \ + CTYPE tolerance, double timeout, bool printFlag)" + + + Connect connect; + CAFEStatus cstat; + + CTYPE valGetA[1]; + ////CTYPE valSetA[1]; + + status=ICAFE_NORMAL; + + + if (handleMatch.size() != valSet.size() ) { + return ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + } + + for (size_t i=0; i< handleMatch.size(); ++i) { + if ( !helper.isChannelConnected(handleMatch[i])) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "NOT ALL CHANNELS CONNECTED: " << endl; + + helper.printHandle(handleMatch[i]); + status=helper.getStatus(handleMatch[i]); + } + } + + + if (status!=ICAFE_NORMAL) {return status;} + + + for (size_t i=0; i< handleMatch.size(); ++i) { + if (printFlag) { + cout << "SET VALUE IS = " << valSet[i] << endl; + cout << "READBACK PV=" << helper.getPVFromHandle(handleMatch[i]) + << " tolerance= " << fabs((double)tolerance) << endl; + cout << "TIME ALLOWED FOR MATCH IS " << timeout << " (sec) " << endl; + } + } + + + vector valSetUpper; vector valSetLower; + + vector monitorID; + vector statMonitor; + vector nMonitors; + vector valGet; + + vector nelemPreviousCache; + + valSetUpper.reserve( handleMatch.size()); + valSetLower.reserve( handleMatch.size()); + monitorID.reserve( handleMatch.size()); + statMonitor.reserve( handleMatch.size()); + valGet.reserve( handleMatch.size()); + nMonitors.reserve( handleMatch.size() ); + + nelemPreviousCache.reserve(handleMatch.size()); + + for (size_t i=0; i< handleMatch.size(); ++i) { + + switch (dbrType) { + case DBR_LONG : + case DBR_SHORT : + case DBR_ENUM: + valSetUpper[i] = valSet[i] + abs((int)tolerance); + valSetLower[i] = valSet[i] - abs((int)tolerance); + break; + case DBR_CHAR : + valSetUpper[i] = (unsigned short) valSet[i] + abs((unsigned short) tolerance); + valSetLower[i] = (unsigned short) valSet[i] - abs((unsigned short) tolerance); + break; + case DBR_FLOAT: + case DBR_DOUBLE: + default: + + valSetUpper[i] = (CTYPE) (valSet[i] + fabs((double)tolerance)); + valSetLower[i] = (CTYPE) (valSet[i] - fabs((double)tolerance)); + + break; + } + + + vector mpVMatch; + mpVMatch.clear(); + + helper.getMonitorPolicyVector(handleMatch[i], mpVMatch); + + nMonitors[i]=mpVMatch.size(); + + monitorID[i]=0; + + ////valGetA[0][i]=0; + valGet[i]=0; + + statMonitor[i]=ICAFE_NORMAL; + + } + + + + for (size_t i=0; i< handleMatch.size(); ++i) { + + //what is monitorpolicy?? + if (nMonitors[i]==0) { + + unsigned int _nelemPrevious, _nelemRequestedCheck=0; + unsigned int _nelemRequested=1; + _nelemPrevious=helper.getNelemClient(handleMatch[i]); + //Check the number of elements requested? + if (_nelemPrevious>1) { + _nelemRequestedCheck = helper.setNelem(handleMatch[i],_nelemRequested); + if (_nelemRequestedCheck != _nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << _nelemPrevious << endl; + cout << "to: " << _nelemRequested << " but got instead: " + << _nelemRequestedCheck << endl; + } + } + + //first do get to update cache before monitor starts + status=Instant::get(handleMatch[i], dbrType, valGetA); + + valGet[i]=valGetA[0]; + + if (_nelemPrevious>1) { + helper.setNelem(handleMatch[i],_nelemPrevious); + } + + + if (status!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + ChannelWhenToFlushSendBufferPolicyKind whenKind= + connect.channelMonitorPolicy.getWhenToFlushSendBuffer(); + connect.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_AUTOMATIC); + + statMonitor[i]=connect.monitorStart(handleMatch[i], monitorID[i]); + + if (statMonitor[i]!=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(statMonitor[i]); + } + else { + if(printFlag) {cout << "MONITOR STARTED WITH ID=" << monitorID[i] << endl;} + } + //revert to previous + if (whenKind != FLUSH_AUTOMATIC) { + connect.channelMonitorPolicy.setWhenToFlushSendBuffer(whenKind); + } + + } //if nMonitors + + ////valSetA[0][i]=valSet[i]; + + //set No of Elements to 1 + + unsigned int nelemPrevious, nelemRequestedCheck=0; + unsigned int nelemRequested=1; + + + nelemPrevious=helper.getNelemClient(handleMatch[i]); + //Check the number of elements requested? + if (nelemPrevious>1) { + nelemRequestedCheck = helper.setNelem(handleMatch[i],nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + + //No of elements to get from Cache + + ////unsigned int nelemPreviousCheck=0; + nelemRequested=1; nelemRequestedCheck=0; + nelemPreviousCache[i]=helper.getNelemRequest(handleMatch[i]); + + //Check the number of elements requested + //See set and Match; this needs to be checked + //Avoid problem when readback channel is the very same as the set(!) + if (nelemPreviousCache[i]>0 && helper.getNelemNative(handleMatch[i])>1) { + nelemRequestedCheck = helper.setNelemToRetrieveFromCache(handleMatch[i],nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPreviousCache[i] << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + + } //if size_t + + //start time + + double timeElapsed=0; double timeElapsed2=0; + double timeElapsedBase=0; + using namespace boost::posix_time; + + ptime timeStart(microsec_clock::local_time()); + + + for (size_t i=0; i< handleMatch.size(); ++i) { + + valGetA[0]=0; + + status=Instant::getCache(handleMatch[i], dbrType, valGetA); + + valGet[i]=valGetA[0]; + + if (status !=ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cstat.report(status); + } + + ///valGet[i]=valGetA[0][i]; + if (dbrType==DBR_CHAR) {valGet[i] = (unsigned short) valGet[i];} + + if(printFlag) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Current Cached Value = " << valGet[i] << endl; + cout << "Lower/Upper Target Values = " << valSetLower[i] << " and " << valSetUpper[i] << endl; + } + + } //for size_t + + + + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + + for (size_t i=0; i< handleMatch.size(); ++i) { + + + while ( (valGet[i]>valSetUpper[i] || valGet[i]1 && status==ICAFE_NORMAL) { + + for (size_t ij=0; ij< handleMatch.size(); ++ij) { + status=Instant::getCache(handleMatch[ij], dbrType, valGetA); + valGet[ij]=valGetA[0]; + if (valGet[ij]>valSetUpper[ij] || valGet[ij]1) { + nelemPreviousCheck= helper.setNelemToRetrieveFromCache(handleMatch[i],nelemPreviousCache[i]); + if (nelemPreviousCheck != nelemPreviousCache[i]) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to re-set the no. elements from: " + << nelemRequested << endl; + cout << "to the previous: " << nelemPreviousCache[i] << " but got instead: " + << nelemPreviousCheck << endl; + } + } + + + + if (nMonitors[i]==0 && statMonitor[i]==ICAFE_NORMAL) { + cout << "STOPPING MONITOR WITH ID =" << monitorID[i] << endl; + int statm; + statm=connect.monitorStop(handleMatch[i], monitorID[i]); + if(status==ICAFE_NORMAL){status=statm;} + } + + } //for + + +return status; +#undef __METHOD__ +} + + + + + +#endif // instant.cpp + + + + + + + diff --git a/include/instant.h b/include/instant.h new file mode 100644 index 0000000..92545be --- /dev/null +++ b/include/instant.h @@ -0,0 +1,272 @@ +/// +/// \file instant.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef INSTANT_H +#define INSTANT_H + +#include +#include +#include + + +template class Instant { + +private: + Transpose renderString; // 0 + Transpose renderShort; // 1 + Transpose renderFloat; // 2 + Transpose renderEnum; // 3 + Transpose renderChar; // 4 + Transpose renderLong; // 5 + Transpose renderDouble; // 6 + + CAFEStatus cafeStatus; + Granules cafeGranules; + + PolicyHelper policyHelper; + + HandleHelper helper; + + Conduit cc; + ChannelTimeoutPolicy channelTimeoutPolicyGet; + ChannelRequestPolicy channelRequestPolicyGet; + ChannelRequestStatus channelRequestStatusGet; + ChannelRequestDataTypePolicy channelRequestDataTypePolicy; + + ChannelRequestMetaDataClient channelRequestMetaDataClient; //-1 + + int status; + + int clientRequests(const unsigned int _handle, const chtype dbrType, const CTYPE * _val); + + int clientRequests(const unsigned int _handle, const chtype dbrType, CTYPE * _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, + bool isCacheRequest); +public: + + Instant (){}; + ~Instant (){}; + + int set(const unsigned int *handleArray, const unsigned int nelem, + const chtype _dbrType, const CTYPE * val, int *statusArray); + + int set(const unsigned int _handle, const chtype dbrType, const CTYPE * _val); + + int get(const unsigned int _handle, const chtype dbrType, CTYPE * _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); + + int get(const unsigned int _handle, const chtype dbrType, CTYPE * _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + return get(_handle, dbrType, _val, alarmStatus, alarmSeverity, ts); + }; + + int get(const unsigned int _handle, const chtype dbrType, CTYPE * _val){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + return get(_handle, dbrType, _val, alarmStatus, alarmSeverity, ts); + }; + + int getCache(const unsigned int _handle, const chtype dbrType, CTYPE * _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); + + int getCache(const unsigned int _handle, const chtype dbrType, CTYPE * _val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + return getCache(_handle, dbrType, _val, alarmStatus, alarmSeverity, ts); + }; + + int getCache(const unsigned int _handle, const chtype dbrType, CTYPE * _val){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + return getCache(_handle, dbrType, _val, alarmStatus, alarmSeverity, ts); + }; + + int getCache(const unsigned int *handleArray, const unsigned int nelem, + const chtype _dbrType, CTYPE * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts); + + int getCache(const unsigned int *handleArray, const unsigned int nelem, + const chtype _dbrType, CTYPE * val, int *statusArray, + dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity ) { + epicsTimeStamp * ts; + return getCache(handleArray, nelem, _dbrType, val, statusArray, + alarmStatus, alarmSeverity, ts); + }; + int getCache(const unsigned int *handleArray, const unsigned int nelem, + const chtype _dbrType, CTYPE * val, int *statusArray) { + dbr_short_t * alarmStatus; dbr_short_t * alarmSeverity; epicsTimeStamp * ts; + return getCache(handleArray, nelem, _dbrType, val, statusArray, + alarmStatus, alarmSeverity, ts); + }; + + int setAndGet(const unsigned int handleSet, const chtype dbrType, CTYPE valSet, CTYPE &valGet); + int setAndMatch(const unsigned int handleSet, const chtype dbrType, CTYPE valSet, const unsigned int handleMatch, + CTYPE tolerance, double timeout, bool printFlag); + + int setAndMatchMany(vector handleSetV, const chtype dbrType, vector valSet, vector handleMatch, + CTYPE tolerance, double timeout, bool printFlag); + + int matchMany( const chtype dbrType, vector valSet, vector handleMatch, + CTYPE tolerance, double timeout, bool printFlag); + + int match( const chtype dbrType, CTYPE valSet, unsigned int handleMatch, + CTYPE tolerance, double timeout, bool printFlag); + + +/** + * \brief Set followed by an immediate get + * \param handleSet input: handle + * \param valSet input: string value to set + * \param valGet output: string value to get + * \return ECA_NORMAL if all OK else first ECAFE error encountered, else ICAFE_SET_AND_GET_MISMATCH; + */ + int setAndGetString(const unsigned int handleSet, string valSet, string &valGet) { +#define __METHOD__ "Instant::setAndGetString(const unsigned int handleSet, string valSet, string &valGet" + //CheckPolicy + + dbr_string_t valGetA[1]; dbr_string_t valSetA[1]; + + strcpy(valGetA[0],"0"); + valGet="0"; + + helper.removeLeadingAndTrailingSpaces(valSet.c_str(), valSetA[0]); + + status=Instant::set(handleSet, DBR_STRING, valSetA); + if (status==ICAFE_NORMAL) { + status=Instant::get(handleSet, DBR_STRING, valGetA); + + valGet=valGetA[0]; + } + else { + return status; + } + + if (strcmp(valSetA[0],valGetA[0])==0) { + return ICAFE_NORMAL; + } + + //Check if number + istringstream ins, ous; + double oud=0; + ous.clear(); + ous.str(valGetA[0]); + ous>>oud; + double ind=0; + ins.clear(); + ins.str(valSetA[0]); + ins>>ind; + + + if ( !ous.fail() && !ins.fail()) { + if (ind==oud) {return ICAFE_NORMAL;} + } + //Cater for enums that are refered to by their integer values in string format + else if (!ins.fail()) { + short enumval=-1; + + enumval=helper.getEnumFromString(handleSet, valGet); + + //Convert integer to string + + stringstream ss; + ss << enumval; + valGet= ss.str(); + if ((short)ind==enumval) { + return ICAFE_NORMAL; + } + + } + + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Process Variable = " << helper.getPVFromHandle(handleSet) << endl; + cout << "Set Value: " << valSetA[0] << " Get Value: " << valGet.c_str() << endl; + return ICAFE_SET_AND_GET_MISMATCH; +#undef __METHOD__ + + }; + + +/** + * \brief Set followed by an immediate get + * \param handleSet input: handle + * \param valSet input: dbr_string_t value to set + * \param valGet output: dbr_string_t value to get + * \return ECA_NORMAL if all OK else first ECAFE error encountered, else ICAFE_SET_AND_GET_MISMATCH; + */ + int setAndGetDbrString(const unsigned int handleSet, dbr_string_t valSet, dbr_string_t &valGet) { +#define __METHOD__ "Instant::setAndGetDbrString(const unsigned int handleSet, dbr_string_tvalSet, dbr_string_t &valGet" + //CheckPolicy + + dbr_string_t valGetA[1]; dbr_string_t valSetA[1]; + + strcpy(valGetA[0],"0"); + strcpy(valGet,"0"); + + helper.removeLeadingAndTrailingSpaces(valSet, valSetA[0]); + + status=Instant::set(handleSet, DBR_STRING, valSetA); + if (status==ICAFE_NORMAL) { + status=Instant::get(handleSet, DBR_STRING, valGetA); + + strcpy(valGet,valGetA[0]); + } + else { + return status; + } + + if (strcmp(valSetA[0],valGetA[0])==0) { + return ICAFE_NORMAL; + } + + //Check if number + //Check if number + istringstream ins, ous; + double oud=0; + ous.clear(); + ous.str(valGetA[0]); + ous>>oud; + double ind=0; + ins.clear(); + ins.str(valSetA[0]); + ins>>ind; + + if ( !ous.fail() && !ins.fail()) { + if (ind==oud) {return ICAFE_NORMAL;} + } + //Cater for enums that are refered to by their integer values in string format + else if (!ins.fail()) { + short enumval=-1; + + enumval=helper.getEnumFromString(handleSet, valGet); + + //Convert integer to string + stringstream ss; + ss << enumval; + strcpy(valGet, ss.str().c_str()); + + if ((short) ind==enumval) { + return ICAFE_NORMAL; + } + + + } + + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Process Variable = " << helper.getPVFromHandle(handleSet) << endl; + cout << "Set Value: " << valSetA[0] << " Get Value: " << valGet << endl; + return ICAFE_SET_AND_GET_MISMATCH; +#undef __METHOD__ + + }; + +}; + +#include "instant.cpp" + +#endif // INSTANT_H + diff --git a/include/loadCollectionXMLParser.h b/include/loadCollectionXMLParser.h new file mode 100644 index 0000000..f262ddf --- /dev/null +++ b/include/loadCollectionXMLParser.h @@ -0,0 +1,62 @@ +/// +/// \file loadCollectionXMLParser.h +/// \author Jan Chrin, George Prekas, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + + +#include + +#if HAVE_LIBQTXML + +#ifndef LOADCOLLECTIONXMLPARSER_H +#define LOADCOLLECTIONXMLPARSER_H + +#include "deviceCollection.h" + +#include + + +class loadCollectionXMLParser : public QXmlDefaultHandler { +public: + loadCollectionXMLParser(); + virtual ~loadCollectionXMLParser(); + bool startElement(const QString& namespaceURI, + const QString& localName, + const QString& qName, + const QXmlAttributes& atts); + bool endElement (const QString& namespaceURI, + const QString& localName, + const QString& qName); + bool characters (const QString& ch); + + std::vector deviceCollectionV; + + +private: + enum + { + NotWaiting, + WaitingForDescription, + WaitingForDevice, + WaitingForAttribute + } state; + + deviceCollection devCollection; + collectionMember cMember; + + std::string attributeName; + static const QString& tagConfig; + static const QString& tagGroup; + static const QString& tagDescription; + static const QString& tagAttributes; + static const QString& tagAttribute; + static const QString& tagMember; + static const QString& tagDevice; +}; + +#endif + + +#endif // LOADCOLLECTIONXMLPARSER_H diff --git a/include/loadGroupXMLParser.h b/include/loadGroupXMLParser.h new file mode 100644 index 0000000..007d87b --- /dev/null +++ b/include/loadGroupXMLParser.h @@ -0,0 +1,67 @@ +/// +/// \file loadGroupXMLParser.h +/// \author Jan Chrin, G. Prekas, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#include + +#if HAVE_LIBQTXML + +#ifndef LOADGROUPXMLPARSER_H +#define LOADGROUPXMLPARSER_H + +#include "deviceCollection.h" + +#include + +class loadGroupXMLParser : public QXmlDefaultHandler { +public: + loadGroupXMLParser(); + virtual ~loadGroupXMLParser(); + bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts); + bool endElement(const QString& namespaceURI, const QString& localName, const QString& qName); + bool characters(const QString& ch); + + std::vector groups; +private: + enum + { + NotWaiting, + WaitingForDescription, + WaitingForStatusGroup, + WaitingForMember, + WaitingForName, + WaitingForNelem, + WaitingForStatus, + WaitingForRule, + WaitingForDataType, + WaitingForId, + WaitingForAttrib, + WaitingForCollectiveType + } state; + deviceGroup group; + //collectionMember member; + collectionInGroup collection; + std::string xmlMem; + + const static QString& tagCollection_list; + const static QString& tagGroup; + const static QString& tagDescription; + const static QString& tagStatusGroup; + const static QString& tagMember; + const static QString& tagName; + const static QString& tagNelem; + const static QString& tagStatus; + const static QString& tagRule; + const static QString& tagDataType; + const static QString& tagCollection; + const static QString& tagId; + const static QString& tagAttrib; + const static QString& tagCollectiveType; +}; + +#endif /* LOADGROUPXMLPARSER_H */ + +#endif diff --git a/include/makefile b/include/makefile new file mode 100644 index 0000000..2932b8e --- /dev/null +++ b/include/makefile @@ -0,0 +1,483 @@ +# makefile.in generated by automake 1.11.1 from makefile.am. +# include/makefile. Generated from makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/cafe +pkgincludedir = $(includedir)/cafe +pkglibdir = $(libdir)/cafe +pkglibexecdir = $(libexecdir)/cafe +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +#am__append_1 = PyCafe_api.h +#am__append_2 = PyCafe.h +subdir = include +DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/makefile.am \ + $(srcdir)/makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/./include/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__include_HEADERS_DIST = cafe.h cafeCache.h cafeConvert.h \ + cafeDataType.h cafeDataTypeHelper.h cafeEnum.h \ + cafeEnumStrings.h cafeRoast.h cafeVectors.h cafeXML.h \ + caopCodes.h channelRegalia.h conduit.h \ + conduitConnectionHandlerArgs.h conduitEventHandlerArgs.h \ + conduitFriends.h connect.h defines.h deviceCollection.h \ + exceptions.h exceptionsHelper.h global.h enumStrings.h \ + granules.h handleHelper.h hashConduit.h helper.h instant.h \ + instant.cpp loadCollectionXMLParser.h loadGroupXMLParser.h \ + methodCallbacks.h policies.h policyHelper.h PVCtrlHolder.h \ + PVDataHolder.h PVGroup.h PVHolder.h statusCodes.h transpose.h \ + conduitGroup.h hashConduitGroup.h restorePVGroupXMLParser.h \ + PyCafe_api.h PyCafe.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(includedir)" +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run aclocal-1.11 +AMTAR = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run tar +AM_CPPFLAGS = -fexceptions -fPIC -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml +AM_LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64 +AR = ar +AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoconf +AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoheader +AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run automake-1.11 +AWK = gawk +CAFE_CPPFLAGS = -I$(top_srcdir)/include +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = -fexceptions -fPIC -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64 +LIBOBJS = +LIBS = -lQtXml -lQtCore +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = cafe +PACKAGE_BUGREPORT = Bug reports to: jan.chrin@psi.ch +PACKAGE_NAME = CAFE +PACKAGE_STRING = CAFE 1.0.0 +PACKAGE_TARNAME = cafe +PACKAGE_VERSION = 1.0.0 +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.0.0 +abs_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/include +abs_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/include +abs_top_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +abs_top_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh +libdir = /opt/gfa/cafe/cpp/cafe-1.3.0-final-1/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /opt/gfa/cafe/cpp/cafe-1.3.0-final-1 +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +include_HEADERS = cafe.h cafeCache.h cafeConvert.h cafeDataType.h \ + cafeDataTypeHelper.h cafeEnum.h cafeEnumStrings.h cafeRoast.h \ + cafeVectors.h cafeXML.h caopCodes.h channelRegalia.h conduit.h \ + conduitConnectionHandlerArgs.h conduitEventHandlerArgs.h \ + conduitFriends.h connect.h defines.h deviceCollection.h \ + exceptions.h exceptionsHelper.h global.h enumStrings.h \ + granules.h handleHelper.h hashConduit.h helper.h instant.h \ + instant.cpp loadCollectionXMLParser.h loadGroupXMLParser.h \ + methodCallbacks.h policies.h policyHelper.h PVCtrlHolder.h \ + PVDataHolder.h PVGroup.h PVHolder.h statusCodes.h transpose.h \ + conduitGroup.h hashConduitGroup.h restorePVGroupXMLParser.h \ + $(am__append_1) $(am__append_2) +all: all-am + +.SUFFIXES: +$(srcdir)/makefile.in: $(srcdir)/makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/makefile +.PRECIOUS: makefile +makefile: $(srcdir)/makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: makefile $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS + + +#if HAVE_ZEROMQ +#include_HEADERS += cafeService.h zhelpers.h +#endif + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/makefile.am b/include/makefile.am new file mode 100644 index 0000000..bebf61e --- /dev/null +++ b/include/makefile.am @@ -0,0 +1,27 @@ +## Makefile.am - used by automake to produce makefile.in +## +## input file for production of cafe library +## + +include_HEADERS = cafe.h cafeCache.h cafeConvert.h cafeDataType.h cafeDataTypeHelper.h cafeEnum.h \ + cafeEnumStrings.h cafeRoast.h cafeVectors.h cafeXML.h caopCodes.h channelRegalia.h \ + conduit.h conduitConnectionHandlerArgs.h conduitEventHandlerArgs.h conduitFriends.h \ + connect.h defines.h deviceCollection.h exceptions.h exceptionsHelper.h global.h \ + enumStrings.h granules.h handleHelper.h hashConduit.h helper.h instant.h instant.cpp \ + loadCollectionXMLParser.h loadGroupXMLParser.h methodCallbacks.h policies.h policyHelper.h \ + PVCtrlHolder.h PVDataHolder.h PVGroup.h PVHolder.h statusCodes.h transpose.h \ + conduitGroup.h hashConduitGroup.h restorePVGroupXMLParser.h + + + +if HAVE_PYTHON_ +include_HEADERS += PyCafe_api.h +endif + +if HAVE_PYCAFE_EXT +include_HEADERS += PyCafe.h +endif + +#if HAVE_ZEROMQ +#include_HEADERS += cafeService.h zhelpers.h +#endif diff --git a/include/methodCallbacks.h b/include/methodCallbacks.h new file mode 100644 index 0000000..90701f7 --- /dev/null +++ b/include/methodCallbacks.h @@ -0,0 +1,25 @@ +/// +/// \file methodCallbacks.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef METHODCALLBACKS_H +#define METHODCALLBACKS_H + +#include + +namespace CALLBACK_CAFE { + #if HAVE_PYTHON_H + void PyHandlerPut( struct event_handler_args args); + void PyHandlerGet( struct event_handler_args args); + #endif + void handlerPut( struct event_handler_args args) ; + void handlerGet( struct event_handler_args args) ; + void handlerGetCtrl( struct event_handler_args args) ; + void handlerGetSTSACK( struct event_handler_args args) ; + void handlerGetClassName( struct event_handler_args args) ; +}; + +#endif // METHODCALLBACKS_H diff --git a/include/policies.h b/include/policies.h new file mode 100644 index 0000000..1ea1947 --- /dev/null +++ b/include/policies.h @@ -0,0 +1,536 @@ +/// +/// \file policies.h +/// +/// Policies are: +/// ChannelCreatePolicy +/// ChannelOpenPolicy +/// ChannelRequestDataTypePolicy +/// ChannelGetCacheWaitPolicy +/// ChannelGetActionWhenMonitorPolicy +/// ChannelTimeoutPolicy +/// ChannelRequestPolicy +/// ChannelMonitorPolicy +/// +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef POLICIES_H +#define POLICIES_H + +#include +#include +#include +#include +#include +#include + +//include //In the below! +#include + +//include + +using namespace CAFENUM; +using namespace std; + +/** + * Define Policy for printing messages + */ +class PrintErrorPolicy{ +protected: + bool invalidHandle; + bool info; + bool warn; + bool error; +public: + bool setInvalidHandle(bool inv) {return invalidHandle=inv;} + bool setInfo(bool i) {return info=i;} + bool setWarn(bool w) {return warn=w;} + bool setError(bool e) {return error=e;} + bool setAll(bool a) {invalidHandle=a; info=a; warn=a; error=a; return a;} + bool getInvalidHandle() {return invalidHandle;} + bool getInfo() {return info;} + bool getWarn() {return warn;} + bool getError() {return error;} + PrintErrorPolicy():invalidHandle(false),info(true),warn(true),error(true){}; +}; + + +/** + * Define Policy for creating channel; this just sets the priority level + * for dispatch within the server or network + */ +class ChannelCreatePolicy{ +private: + unsigned short priority; + static void callbackHandlerCreate(struct connection_handler_args args); + //special method to find handle thru conduit_set iterator + pCallbackConnection handler; +public: + pCallbackConnection getHandler(){return handler;}; + void setHandler(pCallbackConnection h){handler=h;}; + unsigned short getPriority() const {return priority;} + unsigned short setPriority(unsigned short p){ + priority=std::min(p,(unsigned short) CA_SERVER_DISPATCH_PRIORITY_MAX); + return priority; + } + ChannelCreatePolicy():priority(CA_SERVER_DISPATCH_PRIORITY_DEFAULT),handler(callbackHandlerCreate){}; +}; + + +/** + * Define Policy to open/close/monitor channels one-by-one + * or to accumulate messages for later dispatch + */ +class ChannelOpenPolicy{ +public: + + //Constructors + ChannelOpenPolicy():whenKind(FLUSH_AFTER_EACH_CHANNEL_CREATION), flushKind(WITH_PEND_EVENT), + timeout(DEFAULT_TIMEOUT_PEND_EVENT),defaultTimeout(DEFAULT_TIMEOUT_PEND_EVENT){}; + + ChannelOpenPolicy(ChannelFlushSendBufferPolicyKind f, + ChannelWhenToFlushSendBufferPolicyKind w, double t){ + if (f>=WITH_PEND_EVENT && f<=WITH_POLL) + {setFlushSendBufferKind(f);} else {std::cout << f << " is an INVALID ChannelFlushSendBufferPolicyKind" << endl;} + if (w>=FLUSH_AFTER_EACH_CHANNEL_CREATION && w<=FLUSH_DESIGNATED_TO_CLIENT) + {setWhenToFlushSendBuffer(w);} else {std::cout << w << " is an INVALID ChannelWhenToFlushSendBufferPolicyKind" << endl;} + setTimeout(t), setDefaultTimeout(DEFAULT_TIMEOUT_PEND_EVENT); + }; + ~ChannelOpenPolicy(){}; +private: + ChannelWhenToFlushSendBufferPolicyKind whenKind; + ChannelFlushSendBufferPolicyKind flushKind; + double timeout; + double defaultTimeout; +public: + void flushSendBufferNow() { + switch(flushKind){ + case WITH_PEND_EVENT: + ca_pend_event(timeout); + break; + case WITH_PEND_IO: + ca_pend_io(timeout); + break; + case WITH_FLUSH_IO: + ca_flush_io(); + break; + case WITH_POLL: + ca_poll(); + break; + default: + ca_pend_event(timeout); + break; + } + //Reset to default + setWhenToFlushSendBuffer(FLUSH_AFTER_EACH_CHANNEL_CREATION); + }; + ChannelFlushSendBufferPolicyKind getFlushSendBufferKind() const {return flushKind;} + ChannelWhenToFlushSendBufferPolicyKind getWhenToFlushSendBuffer() const {return whenKind;} + double getTimeout() const { + //std::cout << "CHANNELOPENPOLICY " << " *GET* timeout " << timeout << endl; + return timeout; + } + + double getDefaultTimeout() const {return defaultTimeout;} + + void setFlushSendBufferKind(ChannelFlushSendBufferPolicyKind f){if (f>=WITH_FLUSH_IO && f<=WITH_POLL) + {flushKind=f;} else {std::cout << f << " is an INVALID ChannelFlushSendBufferPolicyKind" << endl;}}; + + void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind w) { + if (w>=FLUSH_AFTER_EACH_CHANNEL_CREATION && w<=FLUSH_DESIGNATED_TO_CLIENT) + {whenKind=w;} else {std::cout << w << " is an INVALID ChannelWhenToFlushSendBufferPolicyKind" << endl;}}; + + + double setTimeout(double t) { + if (t<0){ + std::cout << "CHANNELOPENPOLICY:setTimeout " << t << " seconds is an illegal value!" << endl; + return timeout; + } + else if (t==0) { + timeout=0.001; + std::cout << "CHANNELOPENPOLICY:setTimeout " << " A value of zero would block the ioc for ever! "<< endl; + std::cout << "CHANNELOPENPOLICY:setTimeout " << " Setting timeout to " << timeout << endl; + return timeout=0.001; + } + return timeout=t;} + + double setDefaultTimeout(double t) { + if (t<0){ + std::cout << "CHANNELOPENPOLICY:setDefaultTimeout " << t << " seconds is an illegal value!" << endl; + return defaultTimeout; + } + else if (t==0) { + defaultTimeout=0.001; + std::cout << "CHANNELOPENPOLICY:setDefaultTimeout " << " A value of zero would block the ioc for ever! "<< endl; + std::cout << "CHANNELOPENPOLICY:setDefaultTimeout " << " Setting timeout to " << defaultTimeout << endl; + return defaultTimeout; + } + return defaultTimeout=t;} + + double setTimeoutToDefault() {return timeout=defaultTimeout;} + + void setPolicy(ChannelWhenToFlushSendBufferPolicyKind w, ChannelFlushSendBufferPolicyKind f, double t){ + if (f>=WITH_FLUSH_IO && f<=WITH_POLL){flushKind=f;} + else {std::cout << f << " is an INVALID ChannelFlushSendBufferPolicyKind" << endl;} + if (w>=FLUSH_AFTER_EACH_CHANNEL_CREATION && w<=FLUSH_DESIGNATED_TO_CLIENT) + {whenKind=w;} + else {std::cout << w << " is an INVALID ChannelWhenToFlushSendBufferPolicyKind" << endl;} + timeout = t; + defaultTimeout = t; + //std::cout << "CHANNELOPENPOLICY " << " timeout " << timeout << endl; + }; +}; + + + +/** + * Define Policy to control datatype conversion for data transfer + */ +class ChannelRequestDataTypePolicy{ +private: + CAFENUM::ChannelRequestDataTypePolicyKind requestKind; +public: + void setRequestKind(CAFENUM::ChannelRequestDataTypePolicyKind rk) { + if (rk>=CAFENUM::NATIVE_DATATYPE && rk<=CAFENUM::LOWEST_DATATYPE) + {requestKind=rk;} + else {std::cout << rk << " is an INVALID ChannelDataTypePolicyKind" << endl;} + }; + + CAFENUM::ChannelRequestDataTypePolicyKind getRequestKind() const {return requestKind;} + //Constructors + ChannelRequestDataTypePolicy():requestKind(CAFENUM::NATIVE_DATATYPE){}; + ChannelRequestDataTypePolicy(CAFENUM::ChannelRequestDataTypePolicyKind rk){requestKind=rk;}; +}; + + + +/** + * Define Policy to control wait/nowait strategy in getCache operations + */ +class ChannelGetCacheWaitPolicy{ +private: + CAFENUM::ChannelGetCacheWaitPolicyKind getCacheWaitKind; +public: + void setWaitKind(CAFENUM::ChannelGetCacheWaitPolicyKind wk) { + if (wk>=CAFENUM::GET_CACHE_NO_WAIT && wk<=CAFENUM::GET_CACHE_WAIT) + {getCacheWaitKind=wk;} + else {std::cout << wk << " is an INVALID ChannelGetCacheWaitKind" << endl;} + }; + + CAFENUM::ChannelGetCacheWaitPolicyKind getWaitKind() const {return getCacheWaitKind;} + //Constructors + ChannelGetCacheWaitPolicy():getCacheWaitKind(CAFENUM::GET_CACHE_WAIT){}; + ChannelGetCacheWaitPolicy(CAFENUM::ChannelGetCacheWaitPolicyKind wk){getCacheWaitKind=wk;}; +}; + + + +/** + * Define Policy to control whether the get operations targets the ioc or not when there is a monitor + */ +class ChannelGetActionWhenMonitorPolicy{ +private: + CAFENUM::ChannelGetActionWhenMonitorPolicyKind getActionWhenMonitorKind; +public: + void setActionKind(CAFENUM::ChannelGetActionWhenMonitorPolicyKind ak) { + if (ak>=CAFENUM::GET_FROM_CACHE && ak<=CAFENUM::GET_FROM_IOC) + {getActionWhenMonitorKind=ak;} + else {std::cout << ak << " is an INVALID ChannelGetActionWhenMonitorKind" << endl;} + }; + + CAFENUM::ChannelGetActionWhenMonitorPolicyKind getActionKind() const {return getActionWhenMonitorKind;} + //Constructors + ChannelGetActionWhenMonitorPolicy():getActionWhenMonitorKind(CAFENUM::GET_FROM_IOC){}; + ChannelGetActionWhenMonitorPolicy(CAFENUM::ChannelGetActionWhenMonitorPolicyKind ak){getActionWhenMonitorKind=ak;}; +}; + + + +/** + * Defines Timeout policy for channel access transactions + * and configures the number of transaction attempts in the + * event of an ECA_TIMEOUT error; deltaTimeout gives the + * increment in timeout for each additional attempt. + */ +class ChannelTimeoutPolicy{ +private: + bool selfGoverningTimeout; + double timeout; + double deltaTimeout; + unsigned short ntries; + double defaultTimeout; +public: + bool getSelfGoverningTimeout() const {return selfGoverningTimeout;}; + void setSelfGoverningTimeout(bool sgt){selfGoverningTimeout=sgt;}; + double getTimeout() const {return timeout;}; + double getDefaultTimeout() const {return defaultTimeout;} + double getDeltaTimeout() const {return deltaTimeout;}; + unsigned short getNtries() const {return ntries;}; + double setTimeout(double t) {timeout=max(t,TIMEOUT_PEND_IO_MIN); + return timeout=min(timeout,TIMEOUT_PEND_IO_MAX);}; + double setDeltaTimeout(double dt) { deltaTimeout=max(dt,PEND_IO_INCREMENT_TIME_MIN); + return deltaTimeout=min(deltaTimeout,PEND_IO_INCREMENT_TIME_MAX);}; + unsigned short setNtries(unsigned short nt) {return ntries=min(nt, PEND_IO_MAX_TRIES);}; + + double setDefaultTimeout(double t) {return defaultTimeout=t;} + double setTimeoutToDefault() {return timeout=defaultTimeout;} + + ChannelTimeoutPolicy():selfGoverningTimeout(DEFAULT_SELF_GOVERNING_TIMEOUT), + timeout(DEFAULT_TIMEOUT_PEND_IO),deltaTimeout(DEFAULT_PEND_IO_INCREMENT_TIME), + ntries(DEFAULT_PEND_IO_NO_TRIES),defaultTimeout(DEFAULT_TIMEOUT_PEND_IO){}; + +}; + + +/** + * Define Policy to get/set channels whether in blocking/non-blocking mode: + * Blocking can be achieved with or without callback + */ +class ChannelRequestPolicy{ +private: + + ChannelWhenToFlushSendBufferPolicyKind whenKind; // used for set + ChannelWaitForResponsePolicyKind waitKind; //only for WITH_CALLBACK WAIT or NO_WAIT + + ChannelRequestPolicyKind methodKind; + + pCallback handler; // for blockingKind=WITH_CALLBACK_DEFAULT or WITH_CALLBACK_USER_SUPPLIED + int callbackStatus; // used by CAFE::waitForGetEvent() to record status of callback + +public: + + ChannelWhenToFlushSendBufferPolicyKind getWhenToFlushSendBuffer() const {return whenKind;} + ChannelWaitForResponsePolicyKind getWaitKind() const {return waitKind;}; + + ChannelRequestPolicyKind getMethodKind() const {return methodKind;}; + + pCallback getHandler() const {return handler;}; + + int getCallbackStatus() const {return callbackStatus;}; + + void setHandler(pCallback h){if (h!=NULL) {handler=h; methodKind=WITH_CALLBACK_USER_SUPPLIED;}}; + +#if HAVE_PYTHON_H + void setPyHandlerGet(){handler= CALLBACK_CAFE::PyHandlerGet; methodKind=WITH_CALLBACK_USER_SUPPLIED;}; //CAFE_CALLBACK::PyHandlerGet + void setPyHandlerPut(){handler= CALLBACK_CAFE::PyHandlerPut; methodKind=WITH_CALLBACK_USER_SUPPLIED;}; //CAFE_CALLBACK::PyHandlerPut +#endif + + void setMethodKind(ChannelRequestPolicyKind m) { if (m>=WITHOUT_CALLBACK && m<=WITH_CALLBACK_USER_SUPPLIED) + {methodKind=m;} else {std::cout << m << " is an INVALID ChannelRequestPolicyKind" << std::endl;} }; + + void setWhenToFlushSendBuffer(ChannelWhenToFlushSendBufferPolicyKind w) { + if (w>=FLUSH_AFTER_EACH_MESSAGE && w<=FLUSH_DESIGNATED_TO_CLIENT) + {whenKind=w;} else {std::cout << w << " is an INVALID ChannelWhenToFlushSendBufferPolicyKind" << std::endl;}}; + + void setWaitKind(ChannelWaitForResponsePolicyKind r) { if (r>=WAIT && r<=NO_WAIT) + {waitKind=r;} else {std::cout << r << " is an INVALID ChannelWaitForResponsePolicyKind" << std::endl;}}; + + void setCallbackStatus (int cstatus) {callbackStatus =cstatus;}; + + void setPolicy( + ChannelWhenToFlushSendBufferPolicyKind w, ChannelWaitForResponsePolicyKind r, + ChannelRequestPolicyKind m) + { + if (w>=FLUSH_AFTER_EACH_MESSAGE && w<=FLUSH_DESIGNATED_TO_CLIENT) + {whenKind=w;} else {std::cout << "ERROR in setting ChannelRequestPolicy " << std::endl; + std::cout << w << " is an INVALID ChannelWhenToFlushSendBufferPolicyKind" << endl; + std::cout << "Sticking to default value ChannelWhenToFlushSendBufferPolicyKind=" << whenKind << std::endl; + } + if (r>=WAIT && r<=NO_WAIT) + {waitKind=r;} else {std::cout << "ERROR in setting ChannelRequestPolicy " << std::endl; + std::cout << r<< " is an INVALID ChannelWaitForResponsePolicyKind" << endl; + std::cout << "Sticking to default value ChannelWaitForRespomsePolicyKind=" << waitKind << std::endl; + } + if (m>=WITHOUT_CALLBACK && m<=WITH_CALLBACK_USER_SUPPLIED) + {methodKind=m;} else {std::cout << "ERROR in setting ChannelRequestPolicy " << std::endl; + std::cout << r<< " is an INVALID ChannelRequestPolicyKind" << endl; + std::cout << "Sticking to default value ChannelRequestPolicyKind=" << methodKind << std::endl; + } + + if (methodKind==WITHOUT_CALLBACK && waitKind==NO_WAIT) { + std::cout << "WARNING when setting ChannelRequestPolicy " << std::endl; + std::cout << "waitKind=NO_WAIT does not apply when methodKind=WITHOUT_CALLBACK " << std::endl; + + } + }; + + //Constructors + ChannelRequestPolicy(): + whenKind(FLUSH_AFTER_EACH_MESSAGE),waitKind(WAIT),methodKind(WITH_CALLBACK_DEFAULT), //WITHOUT_CALLBACK), + callbackStatus(ICAFE_NORMAL){ + handler=NULL; + + }; + + ChannelRequestPolicy(ChannelRequestPolicyKind b){ + if (b>=WITHOUT_CALLBACK && b<=WITH_CALLBACK_USER_SUPPLIED) + {methodKind=b;} else {cout << b << " is anINVALID ChannelRequestPolicyKind" << endl;} + handler=NULL; + callbackStatus=ICAFE_NORMAL; + whenKind=FLUSH_AFTER_EACH_MESSAGE; + waitKind=WAIT; + }; + + ChannelRequestPolicy(pCallback h){ + handler=h; + methodKind=WITH_CALLBACK_DEFAULT; + whenKind=FLUSH_AFTER_EACH_MESSAGE; + waitKind=WAIT; + callbackStatus =ICAFE_NORMAL; + } + + ~ChannelRequestPolicy(){}; +}; + + +/** + * Defines policy to start a monitor on a channel + * upon first connection. Note that CAFE will not + * start a monitor on a channel if it is not connected + * as the datatype in such cases is unknown. \n + * The monitor is rather placed in a monitor_in_waiting + * pseudo-queue and only started upon connection + */ +class MonitorPolicy +{ + friend class Conduit; + friend class Connect; +private: + static unsigned int idNext; + chtype dataType; //specify primitive datatype for monitoring + chtype dbrDataType; //1 + CAFENUM::DBR_TYPE cafeDbrType; + unsigned int nelem; //2 + //chid channelID; //3 + unsigned int mask; //4 + pCallback handler;//5 + void * userArgs; //6 + evid eventID; //output + int status; //output + unsigned int id; + + static void callbackHandlerMonitor(struct event_handler_args args); + static void PyCallbackHandlerMonitorData(struct event_handler_args args); //pushes pvd,handle,pvname + static void PyCallbackHandlerMonitor(struct event_handler_args args); //pushes handle + + void setEventID(evid e){eventID=e;}; + +public: + MonitorPolicy():dataType((CAFE_DATATYPE) CAFE_NOT_REQUESTED), + dbrDataType((CAFE_DATATYPE) CAFE_NOT_REQUESTED), + cafeDbrType((CAFENUM::DBR_TYPE) CAFENUM::DBR_TIME), + nelem(0), mask(DBE_VALUE | DBE_LOG | DBE_ALARM), + handler(callbackHandlerMonitor), userArgs(NULL), eventID(NULL), + status(ICAFE_NORMAL){ + ++idNext; + id = idNext; + }; + chtype getDataType() const {return dataType;}; + chtype getDbrDataType() const {return dbrDataType;}; + CAFENUM::DBR_TYPE getCafeDbrType() const {return cafeDbrType;}; + unsigned int getNelem() const {return nelem;}; + //chid getChannelID() const {return channelID;}; + unsigned int getMask() const {return mask;}; + + bool maskHasDBE_PROPERTY() const {bool has=false; +# if (EPICS_MAJOR==3 && EPICS_MINOR>=14 && EPICS_PATCH >=11) + mask & DBE_PROPERTY ? has=true : has=false; +# endif + return has; + }; //8 + bool maskHasDBE_VALUE() const {bool has=false; mask & DBE_VALUE ? has=true : has=false; return has;}; //4 + bool maskHasDBE_LOG() const {bool has=false; mask & DBE_LOG ? has=true : has=false; return has;}; //2 + bool maskHasDBE_ALARM() const {bool has=false; mask & DBE_ALARM ? has=true : has=false; return has;}; //1 + pCallback getHandler() const {return handler;}; + void * getUserArgs() const {return userArgs;}; + //On most platforms pointers and longs are the same size, but ints and pointers often are not the same size + //on 64bit platforms. If you convert (void*) to (long) no precision is lost, then by assigning the (long) to + //an (int), it properly truncates the number to fit. + unsigned int getUserArgsAsInt() const {return (unsigned int) ((long long) (void *)userArgs);}; + evid getEventID() const {return eventID;}; + unsigned int getMonitorID() const {return id;}; + int getStatus() const {return status;}; + unsigned int getID() const {return id;}; + + + void setMask(unsigned int m) {mask=m;}; + + void setPyHandler(){handler= PyCallbackHandlerMonitor;}; + void setPyHandlerData(){handler= PyCallbackHandlerMonitorData;}; + void setDefaultHandler(){handler= callbackHandlerMonitor;}; + + void setHandler(pCallback h){handler=h;}; + void setNelem(unsigned int n){nelem=n;}; + void setDataType(chtype dt){ if (dt < DBR_PUT_ACKT) { + dataType=dt%(LAST_TYPE+1);} else { + cout << "monitorPolicy FUNNY! " << dt << " is an INVALID DATATYPE! " << endl; + return;} + switch(cafeDbrType) { + case CAFENUM::DBR_TIME: + dbrDataType=(dbf_type_to_DBR_TIME(dataType)); + break; + case CAFENUM::DBR_STS: + dbrDataType=(dbf_type_to_DBR_STS (dataType)); + break; + case CAFENUM::DBR_PRIMITIVE: + dbrDataType=(dbf_type_to_DBR (dataType)); + break; + case CAFENUM::DBR_CTRL: + dbrDataType=(dbf_type_to_DBR_CTRL(dataType)); + break; + case CAFENUM::DBR_GR: + dbrDataType=(dbf_type_to_DBR_GR (dataType)); + break; + default: + dbrDataType=(dbf_type_to_DBR_TIME(dataType)); + } + }; + + void setCafeDbrType( CAFENUM::DBR_TYPE cdt) {if (cdt > DBR_PUT) { + cout << "monitorPolicy FUNNY! " << cdt << " is an INVALID CAFENUM::DBR_TYPE! " << endl; + return;} else { cafeDbrType=cdt;} + //cout << "monitorPolicy Class: " << " cafeDbrType = " << cafeDbrType << endl; + //cout << "setDataType: " << dataType << endl; + switch(cafeDbrType) { + case CAFENUM::DBR_TIME: + dbrDataType=(dbf_type_to_DBR_TIME(dataType)); + break; + case CAFENUM::DBR_STS: + dbrDataType=(dbf_type_to_DBR_STS (dataType)); + break; + case CAFENUM::DBR_PRIMITIVE: + dbrDataType=(dbf_type_to_DBR (dataType)); + break; + case CAFENUM::DBR_CTRL: + dbrDataType=(dbf_type_to_DBR_CTRL(dataType)); + break; + case CAFENUM::DBR_GR: + dbrDataType=(dbf_type_to_DBR_GR (dataType)); + break; + default: + dbrDataType=(dbf_type_to_DBR_TIME(dataType)); + } + //cout << "monitorPolicy Class: " << " dbrDataType = " << dbrDataType << endl; + } + + + + void setUserArgs(void * u){userArgs=u;}; + void setStatus(int s){status=s;}; + void print() { + cout << "-------------------------------" << endl; + cout << "Monitor Policy " << endl; + cout << "-------------------------------" << endl; + cout << "dbrDataType = " << dbr_type_to_text(dbrDataType) << endl; + cout << "nelem = " << nelem << endl; + cout << "eventID = " << eventID << endl; + cout << "monitorID = " << id << endl; + cout << "-------------------------------" << endl; + } +}; + + + +#endif // POLICIES_H diff --git a/include/policyHelper.h b/include/policyHelper.h new file mode 100644 index 0000000..f2b3568 --- /dev/null +++ b/include/policyHelper.h @@ -0,0 +1,144 @@ +/// +/// \file policyHelper.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef POLICYHELPER_H +#define POLICYHELPER_H + +#include +#include "helper.h" +#include "defines.h" +#include "hashConduit.h" +#include "hashConduitGroup.h" +#include "conduitFriends.h" + +class PolicyHelper : Helper +{ +private: + CAFEStatus cafeStatus; + cafeConduit_set::iterator itcs; + cafeGroup_set::iterator itgs; +public: + PolicyHelper(){}; + ~PolicyHelper(){}; + + int getChannelGetActionWhenMonitorPolicy(unsigned int _handle, ChannelGetActionWhenMonitorPolicy & awmp); + int setChannelGetActionWhenMonitorPolicy(unsigned int _handle, ChannelGetActionWhenMonitorPolicy awmp); + int setChannelGetActionWhenMonitorPolicy(ChannelGetActionWhenMonitorPolicy awmp); + int setChannelGetActionWhenMonitorPolicyAllHandles(ChannelGetActionWhenMonitorPolicy awmp){ + return setChannelGetActionWhenMonitorPolicy(awmp);} + + int getChannelGetCacheWaitPolicy(unsigned int _handle, ChannelGetCacheWaitPolicy & cwp); + int setChannelGetCacheWaitPolicy(unsigned int _handle, ChannelGetCacheWaitPolicy cwp); + int setChannelGetCacheWaitPolicy(ChannelGetCacheWaitPolicy cwp); + int setChannelGetCacheWaitPolicyAllHandles(ChannelGetCacheWaitPolicy cwp){ + return setChannelGetCacheWaitPolicy(cwp);} + + int getChannelRequestDataTypePolicy(unsigned int _handle, ChannelRequestDataTypePolicy &crdtp); + int setChannelRequestDataTypePolicy(unsigned int _handle, ChannelRequestDataTypePolicy crdtp); + int setChannelRequestDataTypePolicy(ChannelRequestDataTypePolicy crdtp); + int setChannelRequestDataTypePolicyAllHandles(ChannelRequestDataTypePolicy crdtp){ + return setChannelRequestDataTypePolicy(crdtp);} + + int getChannelRequestPolicyGet (unsigned int _handle, ChannelRequestPolicy & crpg); + int setChannelRequestPolicyGet (unsigned int _handle, ChannelRequestPolicy crpg); + int setChannelRequestPolicyGet (ChannelRequestPolicy crpg); + int setChannelRequestPolicyGetAllHandles (ChannelRequestPolicy crpg) {return setChannelRequestPolicyGet (crpg);} + + int getChannelRequestPolicyPut (unsigned int _handle, ChannelRequestPolicy & crpp); + int setChannelRequestPolicyPut (unsigned int _handle, ChannelRequestPolicy crpp); + int setChannelRequestPolicyPut (ChannelRequestPolicy crpp); + int setChannelRequestPolicyPutAllHandles (ChannelRequestPolicy crpp) {return setChannelRequestPolicyPut (crpp);} + + int getChannelTimeoutPolicyGet (unsigned int _handle, ChannelTimeoutPolicy & ctpg); + int setChannelTimeoutPolicyGet (unsigned int _handle, ChannelTimeoutPolicy ctpg); + + int getChannelTimeoutPolicyPut (unsigned int _handle, ChannelTimeoutPolicy & ctpp); + int setChannelTimeoutPolicyPut (unsigned int _handle, ChannelTimeoutPolicy ctpp); + + + int setSelfGoverningTimeout(bool b); + int setSelfGoverningTimeout(unsigned int _handle, bool b); + int setSelfGoverningTimeoutPut(unsigned int _handle, bool p); + int setSelfGoverningTimeoutGet(unsigned int _handle, bool g); + int getSelfGoverningTimeout(unsigned int _handle, bool &p, bool &g); + + int setSGSelfGoverningTimeout(bool b); + int setSGSelfGoverningTimeout(unsigned int _handle, bool b); + int setSGSelfGoverningTimeoutPut(unsigned int _handle, bool p); + int setSGSelfGoverningTimeoutGet(unsigned int _handle, bool g); + int getSGSelfGoverningTimeout(unsigned int _handle, bool &p, bool &g); + + //Short cuts + //put, get, put, get + int getTimeoutRange (double &p, double &p2, double &g, double &g2) { int stp; int stg; + stp=getTimeoutMin(p,g); stg=getTimeoutMax(p2, g2); + if (stp!=ICAFE_NORMAL){return stp;} else if(stg!=ICAFE_NORMAL){return stg;} + else {return ICAFE_NORMAL;} + }; + + int getTimeoutMin (double &p, double &g); + int getTimeoutMax (double &p, double &g); + + int getTimeout (unsigned int _handle, double &p, double &g); + //returns lesser of the two + int getTimeout (unsigned int _handle, double &pg) {double p; double g; int st; + st=getTimeout(_handle, p, g); pg=std::min(p,g); return st;} + int getTimeoutPut(unsigned int _handle, double &p) {double g; return getTimeout(_handle, p, g);} + int getTimeoutGet(unsigned int _handle, double &g) {double p; return getTimeout(_handle, p, g);} + + int printTimeout (); + int printTimeout (unsigned int _handle); + + int setTimeout (double p, double g); // for all handles put and get separately + int setTimeout (double pg){return setTimeout(pg, pg);}; + int setTimeoutPut(double p) {return setTimeout(p, (double) NULL);}; + int setTimeoutGet(double g) {return setTimeout((double) NULL, g);}; + + int setTimeout (unsigned int _handle, double p, double g); + int setTimeout (unsigned int _handle, double pg){return setTimeout(_handle, pg, pg); }; + int setTimeoutPut(unsigned int _handle, double p) {return setTimeout(_handle, p, (double) NULL);}; + int setTimeoutGet(unsigned int _handle, double g) {return setTimeout(_handle, (double) NULL, g);}; + int setTimeoutToDefault(unsigned int _handle); + int setTimeoutToDefault(); + + //get SGTimeout + int getSGTimeoutRange (double &p, double &p2, double &g, double &g2) { int stp; int stg; + stp=getSGTimeoutMin(p,g); stg=getSGTimeoutMax(p2, g2); + if (stp!=ICAFE_NORMAL){return stp;} else if(stg!=ICAFE_NORMAL){return stg;} + else {return ICAFE_NORMAL;} + }; + + int getSGTimeoutMin (double &p, double &g); + int getSGTimeoutMax (double &p, double &g); + int printSGTimeout (); + int printSGTimeout (unsigned int _handle); + + + int getSGTimeout (unsigned int _handle, double &p, double &g); + //returns lesser of the two + int getSGTimeout (unsigned int _handle, double &pg) {double p; double g; int st; + st=getSGTimeout(_handle, p, g); pg=std::min(p,g); return st;} + int getSGTimeoutPut(unsigned int _handle, double &p) {double g; return getSGTimeout(_handle, p, g);} + int getSGTimeoutGet(unsigned int _handle, double &g) {double p; return getSGTimeout(_handle, p, g);} + + + //set SGTimeout + int setSGTimeout (double p, double g); // for all group handles put and get separately + int setSGTimeout (double pg){return setSGTimeout(pg, pg);}; + int setSGTimeoutPut(double p) {return setSGTimeout(p, (double) NULL);}; + int setSGTimeoutGet(double g) {return setSGTimeout((double) NULL, g);}; + int setSGTimeout (unsigned int _gHandle, double p, double g); + int setSGTimeout (unsigned int _gHandle, double pg){return setSGTimeout(_gHandle, pg, pg); }; + int setSGTimeoutPut(unsigned int _gHandle, double p) {return setSGTimeout(_gHandle, p, (double) NULL);}; + int setSGTimeoutGet(unsigned int _gHandle, double g) {return setSGTimeout(_gHandle, (double) NULL, g);}; + + int setSGTimeoutToDefault(unsigned int _handle); + int setSGTimeoutToDefault(); + + +}; +#endif diff --git a/include/restorePVGroupXMLParser.h b/include/restorePVGroupXMLParser.h new file mode 100644 index 0000000..1337564 --- /dev/null +++ b/include/restorePVGroupXMLParser.h @@ -0,0 +1,74 @@ +/// +/// \file restorePVGroupXMLParser.h +/// \author Jan Chrin, G. Prekas, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#include + +#if HAVE_LIBQTXML + +#ifndef RESTOREPVGROUPXMLPARSER_H +#define RESTOREPVGROUPXMLPARSER_H + +#include "PVGroup.h" + + +#include + + +class restorePVGroupXMLParser : public QXmlDefaultHandler { +public: + restorePVGroupXMLParser(); + virtual ~restorePVGroupXMLParser(); + + bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts); + bool endElement(const QString& namespaceURI, const QString& localName, const QString& qName); + bool characters(const QString& ch); + + PVGroup group; +private: + enum + { + NotWaiting, + WaitingForConfig, + WaitingForNPV, + WaitingForGroup, + WaitingForDescription, + WaitingForStatusGroup, + WaitingForMember, + WaitingForName, + WaitingForNelem, + WaitingForStatus, + WaitingForRule, + WaitingForVal, + WaitingForSettable + } state; + + + PVDataHolder * pvd; + bool settable; + unsigned int icount; + + const static QString& tagConfig; + const static QString& tagGroup; + const static QString& tagNPV; + const static QString& tagDescription; + const static QString& tagStatusGroup; + const static QString& tagMember; + const static QString& tagName; + const static QString& tagNelem; + const static QString& tagStatus; + const static QString& tagRule; + const static QString& tagVal; + const static QString& tagSettable; + +}; + + + +#endif /* RESTOREPVGROUPXMLPARSER_H */ + +#endif + diff --git a/include/stamp-h1 b/include/stamp-h1 new file mode 100644 index 0000000..e23cc1b --- /dev/null +++ b/include/stamp-h1 @@ -0,0 +1 @@ +timestamp for ./include/config.h diff --git a/include/statusCodes.h b/include/statusCodes.h new file mode 100644 index 0000000..74a0369 --- /dev/null +++ b/include/statusCodes.h @@ -0,0 +1,974 @@ +/// +/// \file StatusCodes.h +/// +/// class StatusInfo - contains user defined messages (>ICAFE_STATUS_BASE) +/// and ca_message() output string +/// +/// class StatusMap - contains ECA and ECAFE error strings plus ICAFE info strings +/// +/// class Status - contains both above classes by composition +/// +/// \author Jan Chrin, PSI +/// \date Release: Feb. 2015 +/// Revised: May 2017 +/// Added CAFEGlobalAlarmStatus and CAFEGlobalAlarmSeverity +/// \version CAFE 1.1.0 +/// +/// JC, Dec. 2015, additional methods to CAFEStatus +/// + + +#ifndef STATUSCODES_H +#define STATUSCODES_H +#include +#include +#include +#include +#include + +#include + + +const unsigned short ICAFE_STATUS_BASE = 600; +const unsigned short ICAFE_STATUS_CS = ICAFE_STATUS_BASE; +const unsigned short ICAFE_STATUS_CFT = 700; // ca_field_type +const unsigned short ICAFE_STATUS_CA_OP = 800; +const unsigned short ICAFE_STATUS_ERROR = 1000; +const unsigned short ICAFE_FILE_ERROR = 1100; +const unsigned short ICAFE_SERVICE_ERROR =1200; +const unsigned short ICAFE_LINUX_ERROR = 5000; +const unsigned short ICAFE_SUCCESS = ECA_NORMAL; +const unsigned short ICAFE_NORMAL = ECA_NORMAL; + + + +enum CAFE_CS_STATE { ICAFE_CS_NEVER_CONN=ICAFE_STATUS_CS, + ICAFE_CS_PREV_CONN, + ICAFE_CS_CONN, + ICAFE_CS_CLOSED, + ICAFE_CS_DISCONN, + ICAFE_CS_UNKNOWN + }; + +enum CAFE_CFT_STATE{ ICAFE_TYPENOTCONN=ICAFE_STATUS_CFT, + 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 + }; + +enum CAFE_CC_STATE { ICAFE_CA_OP_GET=ICAFE_STATUS_CA_OP, + 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 + }; + +enum CAFE_ERROR_STATE { ECAFE_NODATA=ICAFE_STATUS_ERROR, + 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 + }; + +enum CAFE_FILE_ERROR { ECAFE_LOAD_COLLECTION=ICAFE_FILE_ERROR, + ECAFE_LOAD_GROUP + }; + + +enum CAFE_SERVICE_ERROR { ECAFE_BPM_DATA_IS_INVALID=ICAFE_SERVICE_ERROR + }; +//Used by zeromq +enum CAFE_LINUX_ERROR { LINUX_EINTR =ICAFE_LINUX_ERROR+4, + LINUX_EAGAIN=ICAFE_LINUX_ERROR+11, + LINUX_EFAULT=ICAFE_LINUX_ERROR+14, + LINUX_ENOTSOCK=ICAFE_LINUX_ERROR+88, + LINUX_EPROTONOSUPPORT=ICAFE_LINUX_ERROR+93 + }; + + +//epicsAlarmConditionStrings = {"NO_ALARM","READ","WRITE","HIHI","HIGH", +//"LOLO","LOW","STATE","COS", "COMM","TIMEOUT","HWLIMIT","CALC","SCAN","LINK", +//"SOFT","BAD_SUB","UDF","DISABLE","SIMM","READ_ACCESS", "WRITE_ACCESS"}; + + +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 +}; + +enum EPICS_GLOBAL_ALARM_SEVERITY {SEV_NO_ALARM=0, SEV_MINOR, SEV_MAJOR, SEV_INVALID}; + + +class CAFEGlobalAlarmCondition { + typedef std::map mapIntString; + +private: + mapIntString mapAlarmCondition; + mapIntString::iterator pos; + +public: + CAFEGlobalAlarmCondition() { + mapAlarmCondition.insert(std::make_pair((int) STAT_NO_ALARM, "NO_ALARM")); + mapAlarmCondition.insert(std::make_pair((int) STAT_READ, "READ")); + mapAlarmCondition.insert(std::make_pair((int) STAT_WRITE, "WRITE")); + mapAlarmCondition.insert(std::make_pair((int) STAT_HIHI, "HIHI")); + mapAlarmCondition.insert(std::make_pair((int) STAT_HIGH, "HIGH")); + mapAlarmCondition.insert(std::make_pair((int) STAT_LOLO, "LOLO")); + mapAlarmCondition.insert(std::make_pair((int) STAT_LOW, "LOW")); + mapAlarmCondition.insert(std::make_pair((int) STAT_STATE, "STATE")); + mapAlarmCondition.insert(std::make_pair((int) STAT_COS, "COS")); + mapAlarmCondition.insert(std::make_pair((int) STAT_COMM, "COMM")); + mapAlarmCondition.insert(std::make_pair((int) STAT_TIMEOUT, "TIMEOUT")); + mapAlarmCondition.insert(std::make_pair((int) STAT_HWLIMIT, "HWLIMIT")); + mapAlarmCondition.insert(std::make_pair((int) STAT_CALC, "CALC")); + mapAlarmCondition.insert(std::make_pair((int) STAT_SCAN, "SCAN")); + mapAlarmCondition.insert(std::make_pair((int) STAT_LINK, "LINK")); + mapAlarmCondition.insert(std::make_pair((int) STAT_SOFT, "SOFT")); + mapAlarmCondition.insert(std::make_pair((int) STAT_BAD_SUB, "BAD_SUB")); + mapAlarmCondition.insert(std::make_pair((int) STAT_UDF, "UDF")); + mapAlarmCondition.insert(std::make_pair((int) STAT_DISABLE, "DISABLE")); + mapAlarmCondition.insert(std::make_pair((int) STAT_SIMM, "SIMM")); + mapAlarmCondition.insert(std::make_pair((int) STAT_READ_ACCESS, "READ_ACCESS")); + mapAlarmCondition.insert(std::make_pair((int) STAT_WRITE_ACCESS, "WRITE_ACCESS")); + + }; + + ~CAFEGlobalAlarmCondition() {}; + + std::string asString (int i) { + + pos = mapAlarmCondition.find(i); + if (pos != mapAlarmCondition.end()) { + return pos->second; + } + + std::ostringstream oss; + if (i == -1) { + oss << "NO DATA" ; + return oss.str(); + } + std::cout << "------------------------------------" << std::endl; + oss << "INVALID ENUM VALUE: " << i ; //<< --std::endl; + std::cout << oss.str(); + std::cout << " VALID VALUES ARE: " << std::endl; + printAll(); + std::cout << "--------------------------------------" << std::endl; + return oss.str(); + }; + + + int asInt (std::string message) { + for (pos=mapAlarmCondition.begin(); pos != mapAlarmCondition.end(); ++pos) { + + if (pos->second==message) return pos->first; + // String searches such as s.find(s1) return string::npos on failure + else if ( (pos->second).find(message) != std::string::npos) return pos->first; + } + std::cout << "------------------------------------" << std::endl; + std::cout << "INVALID INPUT: " << message << " VALID VALUES ARE: " << std::endl; + printAll(); + std::cout << "------------------------------------" << std::endl; + return -1; + }; + + void getStates(std::vector &vecI, std::vector &vecS ) { + + vecS.clear(); vecS.reserve(mapAlarmCondition.size()); + vecI.clear(); vecI.reserve(mapAlarmCondition.size()); + + for (pos=mapAlarmCondition.begin(); pos != mapAlarmCondition.end(); ++pos) { + vecI.push_back(pos->first); + vecS.push_back(pos->second); + } + return; + } + + + void printAll() { + std::cout << "-------------------" << std::endl; + std::cout << "EPICS GLOBAL ALARM CONDITION LIST" << std::endl; + std::cout << "-------------------" << std::endl; + for (pos=mapAlarmCondition.begin(); pos != mapAlarmCondition.end(); ++pos) { + if (pos->first < 10) { + std::cout << " " << pos->first << " " << pos->second << std::endl; + } + else { + std::cout << pos->first << " " << pos->second << std::endl; + } + } + std::cout << "------------------" << std::endl; + }; + + }; + + + +class CAFEGlobalAlarmSeverity { + typedef std::map mapIntString; + +private: + mapIntString mapAlarmSeverity; + mapIntString::iterator pos; + +public: + CAFEGlobalAlarmSeverity() { + mapAlarmSeverity.insert(std::make_pair((int) SEV_NO_ALARM, "NO_ALARM")); + mapAlarmSeverity.insert(std::make_pair((int) SEV_MINOR, "MINOR")); + mapAlarmSeverity.insert(std::make_pair((int) SEV_MAJOR, "MAJOR")); + mapAlarmSeverity.insert(std::make_pair((int) SEV_INVALID, "INVALID")); + }; + + ~CAFEGlobalAlarmSeverity() {}; + + std::string asString (int i) { + + pos = mapAlarmSeverity.find(i); + if (pos != mapAlarmSeverity.end()) { + return pos->second; + } + + + std::ostringstream oss; + if (i == -1) { + oss << "NO DATA" ; + return oss.str(); + } + std::cout << "--------------------------------------" << std::endl; + oss << "INVALID ENUM VALUE: " << i ; //<< std::endl; + std::cout << oss.str(); + std::cout << " VALID VALUES ARE: " << std::endl; + printAll(); + std::cout << "--------------------------------------" << std::endl; + return oss.str(); + }; + + + int asInt (std::string message) { + for (pos=mapAlarmSeverity.begin(); pos != mapAlarmSeverity.end(); ++pos) { + + if (pos->second==message) return pos->first; + // String searches such as s.find(s1) return string::npos on failure + else if ( (pos->second).find(message) != std::string::npos) return pos->first; + } + std::cout << "--------------------------------------" << std::endl; + std::cout << "INVALID INPUT: " << message << " VALID VALUES ARE: " << std::endl; + printAll(); + std::cout << "--------------------------------------" << std::endl; + return -1; + }; + + void getStates(std::vector &vecI, std::vector &vecS ) { + + vecS.clear(); vecS.reserve(mapAlarmSeverity.size()); + vecI.clear(); vecI.reserve(mapAlarmSeverity.size()); + + for (pos=mapAlarmSeverity.begin(); pos != mapAlarmSeverity.end(); ++pos) { + + vecI.push_back(pos->first); + vecS.push_back(pos->second); + } + return; + } + + void printAll() { + std::cout << "-------------------" << std::endl; + std::cout << "EPICS GLOBAL ALARM SEVERITY LIST" << std::endl; + std::cout << "-------------------" << std::endl; + for (pos=mapAlarmSeverity.begin(); pos != mapAlarmSeverity.end(); ++pos) { + std::cout << pos->first << " " << pos->second << std::endl; + } + std::cout << "------------------" << std::endl; + }; + + }; + + + +/* class StatusInfo provides information for user defined error/status codes +* and ca defined error/status codes \n +* 1 ECA_NORMAL \n +* 48 ECA_ALLOCMEM \n +* 72 ECA_TOLARGE \n +* 80 ECA_TIMEOUT \n +* 114 ECA_BADTYPE \n +* 142 ECA_INTERNAL \n +* 152 ECA_GETFAIL \n +* 160 ECA_PUTFAIL \n +* 176 ECA_BADCOUNT \n +* 186 ECA_BADSTR \n +* 192 ECA_DISCONN \n +* 200 ECA_DBLCHNL \n +* 210 ECA_EVDISALLOW \n +* 242 ECA_BADMONID \n +* 330 ECA_BADMASK \n +* 339 ECA_IODONE \n +* 347 ECA_IOINPROGRESS \n +* 354 ECA_BADSYNCGRP \n +* 362 ECA_PUTCBINPROG \n +* 368 ECA_NORDACCESS \n +* 376 ECA_NOWTACCESS \n +* 386 ECA_ANACHRONISM \n +* 392 ECA_NOSEARCHADDR \n +* 400 ECA_NOCONVERT \n +* 410 ECA_BADCHID \n +* 418 ECA_BADFUNCPTR \n +* 424 ECA_ISATTACHED \n +* 432 ECA_UNAVAILINSERV \n +* 440 ECA_CHANDESTROY \n +* 450 ECA_BADPRIORITY \n +* 458 ECA_NOTTHREADED \n +* 464 ECA_16KARRAYCLIENT \n +* 472 ECA_CONNSEQTMO \n +* 480 ECA_UNRESPTMO \n +* 600 ICAFE_CS_NEVER_CONN \n +* 601 ICAFE_CS_PREV_CONN \n +* 602 ICAFE_CS_CONN \n +* 603 ICAFE_CS_CLOSED \n +* 604 ICAFE_CS_DISCONN, \n +* 605 ICAFE_CS_UNKNOWN \n +* 700 ICAFE_TYPENOTCONN \n +* 701 ICAFE_RULE_FALSE \n +* 702 ICAFE_BADCOUNT \n +* 703 ICAFE_CALLBACK_NOT_YET_INVOKED \n +* 704 ICAFE_WAITING_FOR_PREV_CALLBACK \n +* 705 ICAFE_CACHE_EMPTY \n +* 706 ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT \n +* 707 ICAFE_MONITOR_DELAYED_AS_CONN_DOWN \n +* 708 ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE \n +* 709 ICAFE_SET_AND_GET_MISMATCH \n +* 806 ICAFE_CA_OP_CONN_UP \n +* 807 ICAFE_CA_OP_CONN_DOWN \n +* 1000 ECAFE_NODATA \n +* 1001 ECAFE_INVALID_TYPE \n +* 1002 ECAFE_BADCOUNT \n +* 1003 ECAFE_BADSTR \n +* 1004 ECAFE_BADTYPE \n +* 1005 ECAFE_NO_CONVERT \n +* 1006 ECAFE_NULLCONTEXT \n +* 1007 ECAFE_NULLCHID \n +* 1008 ECAFE_NULLEVID \n +* 1009 ECAFE_UNKNOWN_COLLECTION \n +* 1010 ECAFE_EMPTY_COLLECTION \n +* 1011 ECAFE_COLLECTION_PREV_DEF \n +* 1012 ECAFE_COLLECTION_INVALID_MEMBER \n +* 1013 ECAFE_RULE_FALSE \n +* 1014 ECAFE_UNKNOWN_GROUP \n +* 1015 ECAFE_EMPTY_GROUP \n +* 1016 ECAFE_GROUP_PREV_DEF \n +* 1017 ECAFE_INVALID_HANDLE \n +* 1018 ECAFE_INVALID_GROUP_HANDLE \n +* 1019 ECAFE_NORDACCESS \n +* 1020 ECAFE_NOWTACCESS \n +* 1021 ECAFE_TIMEOUT \n +* 1022 ECAFE_CANNOT_OPEN_FILE \n +* 1023 ECAFE_INVALID_SWITCH_CASE \n +* 1024 ECAFE_PVALIAS_INVALID \n +* 1025 ECAFE_PVALIAS_PREV_DEF \n +* 1026 ECAFE_PVNAME_PREV_DEF_AS_PVALIAS \n +* 1027 ECAFE_DEVICE_ATTRIB_NOT_FOUND \n +* 1028 ECAFE_HASH_UNIQUEID_EXISTS \n +* 1029 ECAFE_WRONG_CA_CONTEXT \n +* 1030 ECAFE_INVALID_CAFENUM_POLICY_TYPE \n +* 1031 ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED \n +* 1032 ECAFE_INVALID_ENUM_INDEX \n +* 1033 ECAFE_PVGROUP_GROUPHANDLE_MISMATCH \n +* 1034 ECAFE_TIMEOUT_SET_AND_MATCH \n +* 1035 ECAFE_HANDLE_MISMATCH_SET_AND_MATCH \n +* 1100 ECAFE_LOAD_COLLECTION \n +* 1101 ECAFE_LOAD_GROUP \n +* 1200 ECAFE_BPM_DATA_IS_INVALID \n +* 5004 LINUX_EINTR \n +* 5011 LINUX_EGAIN \n +* 5014 LINUX_EFAULT \n +* 5088 LINUX_ENOTSOCK \n +* 5093 LINUX_EPROTONOSUPPORT \n +*/ +class CAFEStatusInfo { + typedef std::map mapLongString; +private: + mapLongString mapStatusInfo; + mapLongString::iterator posStatusInfo; + +public: + CAFEStatusInfo() { + //maximum message length is 80 characters + + mapStatusInfo.insert(std::make_pair((int) ICAFE_CA_OP_CONN_UP, "Status of channel connection: channel UP " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CA_OP_CONN_DOWN, "Status of channel connection: channel DOWN! " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CS_NEVER_CONN, "Valid chid; server not found or unavailable " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CS_PREV_CONN, "Valid chid; previously connected to server " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CS_CONN, "Valid chid; connected to server " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CS_CLOSED, "Channel deleted by user " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CS_DISCONN, "Channel disconnected " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CS_UNKNOWN, "Unknown state!!! " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_TYPENOTCONN, "ca_field_type() channel is disconnected " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_RULE_FALSE, "CAFE collection rule for channel set to false by user " )); + mapStatusInfo.insert(std::make_pair((int) ICAFE_BADCOUNT, "nelemClient exceeds nelemNative (max. allowed)! Set nelemClient/nelemRequest to nelemNative ")); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CALLBACK_NOT_YET_INVOKED, "Callback for get/set operation has not yet been invoked ")); + mapStatusInfo.insert(std::make_pair((int) ICAFE_WAITING_FOR_PREV_CALLBACK, "Callback for previous get/set operation not yet invoked ")); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CACHE_EMPTY, "Data buffer is empty; get message to IOC not yet invoked")); + mapStatusInfo.insert(std::make_pair((int) ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT, "User supplied callback function not provided when expected ")); + + mapStatusInfo.insert(std::make_pair((int) ICAFE_MONITOR_DELAYED_AS_CONN_DOWN, "Channel disconnected. Monitor will be started on connection ")); + mapStatusInfo.insert(std::make_pair((int) ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE, "Handle has monitor, hence data retrieved from cache ")); + + mapStatusInfo.insert(std::make_pair((int) ICAFE_SET_AND_GET_MISMATCH, "Set and Get values from SetAndGetMethod do not match")); + + + mapStatusInfo.insert(std::make_pair((int) ECAFE_NODATA, "Requested data transfer is of zero length! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_INVALID_TYPE, "Invalid data type! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_BADCOUNT, "nelemClient exceeds nelemNative (max. allowed)! Set nelemClient/nelemRequest to nelemNative ")); + mapStatusInfo.insert(std::make_pair((int) ECAFE_BADSTR, "Empty string for process variable name! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_BADTYPE, "Invalid datatype! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_NO_CONVERT, "set()/get() cannot convert to/from native datatype! " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_NULLCONTEXT, "Error: current context is null; CA not initialized. " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_NULLCHID, "Error: chid is null!! " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_NULLEVID, "Monitor() evid is null! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_UNKNOWN_COLLECTION, "CAFE collection is unknown/unregistered or invalid! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_EMPTY_COLLECTION, "CAFE collection is empty; has no members! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_COLLECTION_PREV_DEF, "CAFE collection with this name already exists! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_COLLECTION_INVALID_MEMBER,"Device is not a member of the CAFE collection! " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_RULE_FALSE, "CAFE rule for channel set to false by user " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_UNKNOWN_GROUP, "CAFE group is unknown/unregistered or invalid! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_EMPTY_GROUP, "CAFE group is empty; has no members! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_GROUP_PREV_DEF, "CAFE group with this name already exists! " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_INVALID_HANDLE, "Handle does not exist! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_INVALID_GROUP_HANDLE, "Group handle does not exist! " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_NORDACCESS, "Channel does not have READ access! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_NOWTACCESS, "Channel does not have WRITE access! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_TIMEOUT, "Callback function not activated within specified timeout period " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_CANNOT_OPEN_FILE, "Cannot open file! " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_INVALID_SWITCH_CASE, "Internal CAFE Error: Invalid option for switch case " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_PVALIAS_INVALID, "Requested PVAlias is another handle's PV name. Bizarre! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_PVALIAS_PREV_DEF, "Requested PVAlias already exists! " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_PVNAME_PREV_DEF_AS_PVALIAS, "PVName clashes with previously defined PVAlias!" )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_DEVICE_ATTRIB_NOT_FOUND, "Deliminator - hence dev/attrib - not found in PV name" )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_HASH_UNIQUEID_EXISTS,"cafeConduit object already inserted (handle exists) ")); + mapStatusInfo.insert(std::make_pair((int) ECAFE_WRONG_CA_CONTEXT,"Operation cannot be carried out for this ca_client_context ")); + mapStatusInfo.insert(std::make_pair((int) ECAFE_INVALID_CAFENUM_POLICY_TYPE, "Not a valid CAFENUM type for this policy. See policies.h ")); + mapStatusInfo.insert(std::make_pair((int) ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED, "See define.sh to change the allowed maximum ")); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_INVALID_ENUM_INDEX, "DBR_ENUM value exceeds the number of enum string options " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_PVGROUP_GROUPHANDLE_MISMATCH, "PVGroup previously assigned to another group handle " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_TIMEOUT_SET_AND_MATCH, "Readback channel did not reach set value within specified timeout period ")); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_HANDLE_MISMATCH_SET_AND_MATCH, "Number of set/readback handles do not match")); + mapStatusInfo.insert(std::make_pair((int) ECAFE_LOAD_COLLECTION, "CAFE collection could not be loaded from xml configuration file " )); + mapStatusInfo.insert(std::make_pair((int) ECAFE_LOAD_GROUP, "CAFE group could not be loaded from group xml configuration file " )); + + mapStatusInfo.insert(std::make_pair((int) ECAFE_BPM_DATA_IS_INVALID, "CAFE BPM Service: Data Validity channel reports BPM data is INVALID " )); + + mapStatusInfo.insert(std::make_pair((int) LINUX_EINTR, "C ERROR CODE IN LINUX: Interrupted system call" )); + mapStatusInfo.insert(std::make_pair((int) LINUX_EAGAIN, "C ERROR CODE IN LINUX: Try again" )); + mapStatusInfo.insert(std::make_pair((int) LINUX_EFAULT, "C ERROR CODE IN LINUX: Bad address" )); + mapStatusInfo.insert(std::make_pair((int) LINUX_ENOTSOCK, "C ERROR CODE IN LINUX: Socket operation on non-socket" )); + mapStatusInfo.insert(std::make_pair((int) LINUX_EPROTONOSUPPORT, "C ERROR CODE IN LINUX: Protocol not supported" )); +} + + ~CAFEStatusInfo() {}; + + + std::string message (int i) { + + if (isecond; + } + + std::ostringstream oss; + oss << "INVALID ERROR CODE: " << i ; //<< std::endl; + //std::cout << oss.str(); + + return oss.str(); + + } + }; + + + + void printAll() { + std::cout << "-----------------------" << std::endl; + std::cout << "CAFE ERROR MESSAGE LIST" << std::endl; + std::cout << "-----------------------" << std::endl; + for (posStatusInfo=mapStatusInfo.begin(); posStatusInfo != mapStatusInfo.end(); ++posStatusInfo) { + std::cout << posStatusInfo->first << " " << posStatusInfo->second << std::endl; + } + std::cout << "------------------" << std::endl; + }; +}; + + + + + +class CAFEStatusCode { + typedef std::map mapLongString; + +private: + mapLongString mapStatusCode; + mapLongString::iterator pos; + +public: + CAFEStatusCode() { + mapStatusCode.insert(std::make_pair(ECA_NORMAL, "SUCCESS: ECA_NORMAL")); + mapStatusCode.insert(std::make_pair(ECA_ALLOCMEM, "WARNING: ECA_ALLOCMEM")); + mapStatusCode.insert(std::make_pair(ECA_TOLARGE, "WARNING: ECA_TOLARGE")); + mapStatusCode.insert(std::make_pair(ECA_TIMEOUT, "WARNING: ECA_TIMEOUT")); + mapStatusCode.insert(std::make_pair(ECA_BADTYPE, "ERROR: ECA_BADTYPE")); + mapStatusCode.insert(std::make_pair(ECA_INTERNAL, "FATAL: ECA_INTERNAL")); + mapStatusCode.insert(std::make_pair(ECA_GETFAIL, "WARNING: ECA_GETFAIL")); + mapStatusCode.insert(std::make_pair(ECA_PUTFAIL, "WARNING: ECA_PUTFAIL")); + mapStatusCode.insert(std::make_pair(ECA_BADCOUNT, "WARNING: ECA_BADCOUNT")); + mapStatusCode.insert(std::make_pair(ECA_BADSTR, "ERROR: ECA_BADSTR")); + mapStatusCode.insert(std::make_pair(ECA_DISCONN, "WARNING: ECA_DISCONN")); + mapStatusCode.insert(std::make_pair(ECA_DBLCHNL, "WARNING: ECA_DBLCHNL")); + mapStatusCode.insert(std::make_pair(ECA_EVDISALLOW, "ERROR: ECA_EVDISALLOW")); + mapStatusCode.insert(std::make_pair(ECA_BADMONID, "ERROR: ECA_BADMONID")); + mapStatusCode.insert(std::make_pair(ECA_BADMASK, "ERROR: ECA_BADMASK")); + mapStatusCode.insert(std::make_pair(ECA_IODONE , "INFO: ECA_IODONE ")); + mapStatusCode.insert(std::make_pair(ECA_IOINPROGRESS, "INFO: ECA_IOINPROGRESS")); + mapStatusCode.insert(std::make_pair(ECA_BADSYNCGRP, "ERROR: ECA_BADSYNCGRP")); + mapStatusCode.insert(std::make_pair(ECA_PUTCBINPROG, "ERROR: ECA_PUTCBINPROG")); + mapStatusCode.insert(std::make_pair(ECA_NORDACCESS, "WARNING: ECA_NORDACCESS")); + mapStatusCode.insert(std::make_pair(ECA_NOWTACCESS, "WARNING: ECA_NOWTACCESS")); + mapStatusCode.insert(std::make_pair(ECA_ANACHRONISM, "ERROR: ECA_ANACHRONISM")); + mapStatusCode.insert(std::make_pair(ECA_NOSEARCHADDR, "WARNING: ECA_NOSEARCHADDR")); + mapStatusCode.insert(std::make_pair(ECA_NOCONVERT, "WARNING: ECA_NOCONVERT")); + mapStatusCode.insert(std::make_pair(ECA_BADCHID, "ERROR: ECA_BADCHID")); + mapStatusCode.insert(std::make_pair(ECA_BADFUNCPTR, "ERROR: ECA_BADFUNCPTR")); + mapStatusCode.insert(std::make_pair(ECA_ISATTACHED, "WARNING: ECA_ISATTACHED")); + mapStatusCode.insert(std::make_pair(ECA_UNAVAILINSERV, "WARNING: ECA_UNAVAILINSERV")); + mapStatusCode.insert(std::make_pair(ECA_CHANDESTROY, "WARNING: ECA_CHANDESTROY")); + mapStatusCode.insert(std::make_pair(ECA_BADPRIORITY, "ERROR: ECA_BADPRIORITY")); + mapStatusCode.insert(std::make_pair(ECA_NOTTHREADED, "ERROR: ECA_NOTTHREADED")); + mapStatusCode.insert(std::make_pair(ECA_16KARRAYCLIENT,"WARNING: ECA_16KARRAYCLIENT")); + mapStatusCode.insert(std::make_pair(ECA_CONNSEQTMO, "WARNING: ECA_CONNSEQTMO")); + mapStatusCode.insert(std::make_pair(ECA_UNRESPTMO , "WARNING: ECA_UNRESPTMO")); + mapStatusCode.insert(std::make_pair((int) ICAFE_CS_NEVER_CONN, "CHANNEL STATE: ICAFE_CS_NEVER_CONN" )); + mapStatusCode.insert(std::make_pair((int) ICAFE_CS_PREV_CONN, "CHANNEL STATE: ICAFE_CS_PREV_CONN " )); + mapStatusCode.insert(std::make_pair((int) ICAFE_CS_CONN, "CHANNEL STATE: ICAFE_CS_CONN" )); + mapStatusCode.insert(std::make_pair((int) ICAFE_CS_CLOSED, "CHANNEL STATE: ICAFE_CS_CLOSED" )); + mapStatusCode.insert(std::make_pair((int) ICAFE_CS_DISCONN, "CHANNEL STATE: ICAFE_CS_DISCONN" )); + mapStatusCode.insert(std::make_pair((int) ICAFE_CS_UNKNOWN, "CHANNEL STATE: ICAFE_CS_UNKNOWN" )); + + mapStatusCode.insert(std::make_pair((int) ICAFE_TYPENOTCONN, "CHANNEL FIELD TYPE: ICAFE_CFT_TYPENOTCONN")); + mapStatusCode.insert(std::make_pair((int) ICAFE_RULE_FALSE, "CAFE INFO: ICAFE_RULE_FALSE")); + mapStatusCode.insert(std::make_pair((int) ICAFE_BADCOUNT, "CAFE INFO: ICAFE_BADCOUNT")); + mapStatusCode.insert(std::make_pair((int) ICAFE_CALLBACK_NOT_YET_INVOKED, "CAFE_INFO: ICAFE_CALLBACK_NOT_YET_INVOKED")); + mapStatusCode.insert(std::make_pair((int) ICAFE_WAITING_FOR_PREV_CALLBACK, "CAFE_INFO: ICAFE_WAITING_FOR_PREV_CALLBACK")); + mapStatusCode.insert(std::make_pair((int) ICAFE_CACHE_EMPTY, "CAFE_INFO:ICAFE_CACHE_EMPTY")); + mapStatusCode.insert(std::make_pair((int) ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT, "CAFE_INFO: ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT")); + mapStatusCode.insert(std::make_pair((int) ICAFE_CA_OP_CONN_UP, "CHANNEL CONNECTION: ICAFE_CC_OP_CONN_UP" )); + mapStatusCode.insert(std::make_pair((int) ICAFE_CA_OP_CONN_DOWN, "CHANNEL CONNECTION: ICAFE_CC_OP_CONN_DOWN" )); + + mapStatusCode.insert(std::make_pair((int) ICAFE_MONITOR_DELAYED_AS_CONN_DOWN, "CHANNEL CONNECTION: ICAFE_MONITOR_DELAYED_AS_CONN_DOWN")); + mapStatusCode.insert(std::make_pair((int) ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE, "CAFE_INFO: ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE")); + + mapStatusCode.insert(std::make_pair((int) ICAFE_SET_AND_GET_MISMATCH, "CAFE_INFO: ICAFE_SET_AND_GET_MISMATCH")); + + + mapStatusCode.insert(std::make_pair((int) ECAFE_NODATA, "CAFE ERROR: ECAFE_NODATA")); + mapStatusCode.insert(std::make_pair((int) ECAFE_BADCOUNT, "CAFE ERROR: ECAFE_BADCOUNT")); + mapStatusCode.insert(std::make_pair((int) ECAFE_BADSTR, "CAFE ERROR: ECAFE_BADSTR")); + mapStatusCode.insert(std::make_pair((int) ECAFE_BADTYPE, "CAFE ERROR: ECAFE_BADTYPE")); + + mapStatusCode.insert(std::make_pair((int) ECAFE_NO_CONVERT, "CAFE ERROR: ECAFE_NO_CONVERT")); + mapStatusCode.insert(std::make_pair((int) ECAFE_NULLCONTEXT, "CAFE ERROR: ECAFE_NULLCONTEXT")); + mapStatusCode.insert(std::make_pair((int) ECAFE_NULLCHID, "CAFE ERROR: ECAFE_NULLCHID")); + mapStatusCode.insert(std::make_pair((int) ECAFE_NULLEVID, "CAFE ERROR: ECAFE_NULLEVID")); + mapStatusCode.insert(std::make_pair((int) ECAFE_UNKNOWN_COLLECTION, "CAFE ERROR: ECAFE_UNKNOWN_COLLECTION")); + mapStatusCode.insert(std::make_pair((int) ECAFE_EMPTY_COLLECTION, "CAFE ERROR: ECAFE_EMPTY_COLLECTION")); + mapStatusCode.insert(std::make_pair((int) ECAFE_COLLECTION_PREV_DEF, "CAFE ERROR: ECAFE_COLLECTION_PREV_DEF")); + mapStatusCode.insert(std::make_pair((int) ECAFE_COLLECTION_INVALID_MEMBER, "CAFE ERROR: ECAFE_COLLECTION_INVALID_MEMBER")); + mapStatusCode.insert(std::make_pair((int) ECAFE_RULE_FALSE, "CAFE ERROR/INFO: ECAFE_RULE_FALSE")); + mapStatusCode.insert(std::make_pair((int) ECAFE_UNKNOWN_GROUP, "CAFE ERROR: ECAFE_UNKNOWN_GROUP")); + mapStatusCode.insert(std::make_pair((int) ECAFE_EMPTY_GROUP, "CAFE ERROR: ECAFE_EMPTY_GROUP")); + mapStatusCode.insert(std::make_pair((int) ECAFE_GROUP_PREV_DEF, "CAFE ERROR: ECAFE_GROUP_PREV_DEF")); + mapStatusCode.insert(std::make_pair((int) ECAFE_INVALID_HANDLE, "CAFE ERROR: ECAFE_INVALID_HANDLE")); + mapStatusCode.insert(std::make_pair((int) ECAFE_INVALID_GROUP_HANDLE, "CAFE ERROR: ECAFE_INVALID_GROUP_HANDLE")); + mapStatusCode.insert(std::make_pair((int) ECAFE_NORDACCESS, "CAFE ERROR: ECAFE_NORDACCESS")); + mapStatusCode.insert(std::make_pair((int) ECAFE_NOWTACCESS, "CAFE ERROR: ECAFE_NOWTACCESS")); + mapStatusCode.insert(std::make_pair((int) ECAFE_TIMEOUT, "CAFE ERROR: ECAFE_TIMEOUT")); + + + mapStatusCode.insert(std::make_pair((int) ECAFE_CANNOT_OPEN_FILE, "CAFE ERROR: ECAFE_CANNOT_OPEN_FILE")); + mapStatusCode.insert(std::make_pair((int) ECAFE_INVALID_SWITCH_CASE, "CAFE ERROR: ECAFE_INVALID_SWITCH_CASE")); + mapStatusCode.insert(std::make_pair((int) ECAFE_PVALIAS_INVALID, "CAFE ERROR: ECAFE_PVALIAS_INVALID")); + mapStatusCode.insert(std::make_pair((int) ECAFE_PVALIAS_PREV_DEF, "CAFE ERROR: ECAFE_PVALIAS_PREV_DEF")); + mapStatusCode.insert(std::make_pair((int) ECAFE_PVNAME_PREV_DEF_AS_PVALIAS,"CAFE ERROR: ECAFE_PVNAME_PREV_DEF_AS_PVALIAS")); + mapStatusCode.insert(std::make_pair((int) ECAFE_DEVICE_ATTRIB_NOT_FOUND,"CAFE ERROR: ECAFE_DEVICE_ATTRIB_NOT_FOUND")); + mapStatusCode.insert(std::make_pair((int) ECAFE_HASH_UNIQUEID_EXISTS, "CAFE ERROR: ECAFE_HASH_UNIQUEID_EXISTS")); + mapStatusCode.insert(std::make_pair((int) ECAFE_WRONG_CA_CONTEXT, "CAFE ERROR: ECAFE_WRONG_CA_CONTEXT")); + mapStatusCode.insert(std::make_pair((int) ECAFE_INVALID_CAFENUM_POLICY_TYPE, "CAFE ERROR: ECAFE_INVALID_CAFENUM_POLICY_TYPE")); + mapStatusCode.insert(std::make_pair((int) ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED, "CAFE_ERROR: ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED")); + mapStatusCode.insert(std::make_pair((int) ECAFE_INVALID_ENUM_INDEX, "CAFE_ERROR: ECAFE_INVALID_ENUM_INDEX")); + mapStatusCode.insert(std::make_pair((int) ECAFE_PVGROUP_GROUPHANDLE_MISMATCH, "CAFE ERROR:ECAFE_PVGROUP_GROUPHANDLE_MISMATCH")); + + mapStatusCode.insert(std::make_pair((int) ECAFE_TIMEOUT_SET_AND_MATCH, "CAFE ERROR: CAFE_TIMEOUT_SET_AND_MATCH")); + mapStatusCode.insert(std::make_pair((int) ECAFE_HANDLE_MISMATCH_SET_AND_MATCH, "CAFE ERROR: CAFE_HANDLE_MISMATCH_SET_AND_MATCH")); + mapStatusCode.insert(std::make_pair((int) ECAFE_LOAD_COLLECTION, "CAFE ERROR: ECAFE_LOAD_COLLECTION")); + mapStatusCode.insert(std::make_pair((int) ECAFE_LOAD_GROUP, "CAFE ERROR: ECAFE_LOAD_GROUP")); + + mapStatusCode.insert(std::make_pair((int) ECAFE_BPM_DATA_IS_INVALID, "CAFE_ERROR: ECAFE_BPM_DATA_IS_INVALID" )); + + mapStatusCode.insert(std::make_pair((int) LINUX_EINTR, "CAFE_ERROR: LINUX_EINTR" )); + mapStatusCode.insert(std::make_pair((int) LINUX_EAGAIN, "CAFE_ERROR: LINUX_EAGAIN " )); + mapStatusCode.insert(std::make_pair((int) LINUX_EFAULT, "CAFE_ERROR: LINUX_EFAULT" )); + mapStatusCode.insert(std::make_pair((int) LINUX_ENOTSOCK, "CAFE_ERROR: LINUX_ENOTSOCK" )); + mapStatusCode.insert(std::make_pair((int) LINUX_EPROTONOSUPPORT, "CAFE_ERROR: LINUX_EPROTONOSUPPORT" )); + +}; + + ~CAFEStatusCode() {}; + + std::string message (int i) { + + pos = mapStatusCode.find(i); + if (pos != mapStatusCode.end()) { + return pos->second; + } + + std::ostringstream oss; + oss << "INVALID ERROR CODE: " << i ; //<< std::endl; + //std::cout << oss.str(); + + return oss.str(); + }; + + + void getStates(std::vector &vecI, std::vector &vecS ) { + + vecS.clear(); vecS.reserve(mapStatusCode.size()); + vecI.clear(); vecI.reserve(mapStatusCode.size()); + + for (pos=mapStatusCode.begin(); pos != mapStatusCode.end(); ++pos) { + std::size_t found = (pos->second).find(": "); + if (found!=std::string::npos) { + + vecS.push_back((pos->second).substr(found+2,(pos->second).length())); + } + else { + vecS.push_back(pos->second); + } + vecI.push_back(pos->first); + } + return; + }; + + std::string msgIDAsString (int i) { + + pos = mapStatusCode.find(i); + if (pos != mapStatusCode.end()) { + std::size_t found = (pos->second).find(": "); + if (found!=std::string::npos) { + + return (pos->second).substr(found+2,(pos->second).length()); + } + else { + return pos->second; + } + } + + std::ostringstream oss; + oss << "INVALID ERROR CODE: " << i ; //<< std::endl; + //std::cout << oss.str(); + + return oss.str(); + }; + + + int enumIs (std::string message) { + for (pos=mapStatusCode.begin(); pos != mapStatusCode.end(); ++pos) { + + if (pos->second==message) return pos->first; + // String searches such as s.find(s1) return string::npos on failure + else if ( (pos->second).find(message) != std::string::npos) return pos->first; + } + return -1; + }; + + bool isTimeout(int statusCodeToCheck) { + if (statusCodeToCheck==ECA_TIMEOUT || statusCodeToCheck==ECAFE_TIMEOUT) { + return true; + } + else {return false;} + } + + void printAll() { + std::cout << "-------------------" << std::endl; + std::cout << "CAFE ERROR CODE LIST" << std::endl; + std::cout << "-------------------" << std::endl; + for (pos=mapStatusCode.begin(); pos != mapStatusCode.end(); ++pos) { + std::cout << pos->first << " " << pos->second << std::endl; + } + std::cout << "------------------" << std::endl; + }; + +}; + + + +class CAFEStatusSeverity { + typedef std::map mapLongString; + +private: + mapLongString mapStatusSeverity; + mapLongString::iterator pos; + +public: + CAFEStatusSeverity() { + mapStatusSeverity.insert(std::make_pair(ECA_NORMAL, "INFO")); + mapStatusSeverity.insert(std::make_pair(ECA_ALLOCMEM, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_TOLARGE, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_TIMEOUT, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_BADTYPE, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_INTERNAL, "FATAL")); + mapStatusSeverity.insert(std::make_pair(ECA_GETFAIL, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_PUTFAIL, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_BADCOUNT, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_BADSTR, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_DISCONN, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_DBLCHNL, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_EVDISALLOW, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_BADMONID, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_BADMASK, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_IODONE , "INFO")); + mapStatusSeverity.insert(std::make_pair(ECA_IOINPROGRESS, "INFO")); + mapStatusSeverity.insert(std::make_pair(ECA_BADSYNCGRP, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_PUTCBINPROG, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_NORDACCESS, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_NOWTACCESS, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_ANACHRONISM, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_NOSEARCHADDR, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_NOCONVERT, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_BADCHID, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_BADFUNCPTR, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_ISATTACHED, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_UNAVAILINSERV, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_CHANDESTROY, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_BADPRIORITY, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_NOTTHREADED, "ERROR")); + mapStatusSeverity.insert(std::make_pair(ECA_16KARRAYCLIENT, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_CONNSEQTMO, "WARN")); + mapStatusSeverity.insert(std::make_pair(ECA_UNRESPTMO , "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CS_NEVER_CONN, "WARN" )); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CS_PREV_CONN, "INFO" )); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CS_CONN, "INFO" )); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CS_CLOSED, "INFO" )); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CS_DISCONN, "WARN" )); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CS_UNKNOWN, "ERROR" )); + + mapStatusSeverity.insert(std::make_pair((int) ICAFE_TYPENOTCONN, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_RULE_FALSE, "INFO")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_BADCOUNT, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CALLBACK_NOT_YET_INVOKED, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_WAITING_FOR_PREV_CALLBACK, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CACHE_EMPTY, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CA_OP_CONN_UP, "INFO" )); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_CA_OP_CONN_DOWN, "WARN" )); + + mapStatusSeverity.insert(std::make_pair((int) ICAFE_MONITOR_DELAYED_AS_CONN_DOWN, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE, "INFO")); + + mapStatusSeverity.insert(std::make_pair((int) ICAFE_SET_AND_GET_MISMATCH, "WARN")); + + mapStatusSeverity.insert(std::make_pair((int) ECAFE_NODATA, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_BADCOUNT, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_BADSTR, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_BADTYPE, "ERROR")); + + mapStatusSeverity.insert(std::make_pair((int) ECAFE_NO_CONVERT, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_NULLCONTEXT, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_NULLCHID, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_NULLEVID, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_UNKNOWN_COLLECTION, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_EMPTY_COLLECTION, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_COLLECTION_PREV_DEF, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_COLLECTION_INVALID_MEMBER, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_RULE_FALSE, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_UNKNOWN_GROUP, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_EMPTY_GROUP, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_GROUP_PREV_DEF, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_INVALID_HANDLE, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_INVALID_GROUP_HANDLE, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_NORDACCESS, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_NOWTACCESS, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_TIMEOUT, "WARN")); + + + mapStatusSeverity.insert(std::make_pair((int) ECAFE_CANNOT_OPEN_FILE, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_INVALID_SWITCH_CASE, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_PVALIAS_INVALID, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_PVALIAS_PREV_DEF, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_PVNAME_PREV_DEF_AS_PVALIAS,"ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_DEVICE_ATTRIB_NOT_FOUND,"ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_HASH_UNIQUEID_EXISTS, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_WRONG_CA_CONTEXT, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_INVALID_CAFENUM_POLICY_TYPE, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_INVALID_ENUM_INDEX, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_PVGROUP_GROUPHANDLE_MISMATCH, "ERROR")); + + mapStatusSeverity.insert(std::make_pair((int) ECAFE_TIMEOUT_SET_AND_MATCH, "WARN")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_HANDLE_MISMATCH_SET_AND_MATCH, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_LOAD_COLLECTION, "ERROR")); + mapStatusSeverity.insert(std::make_pair((int) ECAFE_LOAD_GROUP, "ERROR")); + + mapStatusSeverity.insert(std::make_pair((int) ECAFE_BPM_DATA_IS_INVALID, "WARN" )); + + +}; + + ~CAFEStatusSeverity() {}; + + std::string message (int i) { + + pos = mapStatusSeverity.find(i); + if (pos != mapStatusSeverity.end()) { + return pos->second; + } + + std::ostringstream oss; + oss << "INVALID ERROR CODE: " << i ; //<< std::endl; + //std::cout << oss.str(); + + return oss.str(); + }; + + int enumIs (std::string message) { + for (pos=mapStatusSeverity.begin(); pos != mapStatusSeverity.end(); ++pos) { + + if (pos->second==message) return pos->first; + // String searches such as s.find(s1) return string::npos on failure + else if ( (pos->second).find(message) != std::string::npos) return pos->first; + } + return -1; + }; + + void printAll() { + std::cout << "-------------------" << std::endl; + std::cout << "CAFE STATUS SEVERITY LIST" << std::endl; + std::cout << "-------------------" << std::endl; + for (pos=mapStatusSeverity.begin(); pos != mapStatusSeverity.end(); ++pos) { + std::cout << pos->first << " " << pos->second << std::endl; + } + std::cout << "------------------" << std::endl; + }; + +}; + +//Example +//For statusCode=0, we have +//severity: INFO +//asString: ECA_NORMAL +//msgID: ECA_NORMAL +//code: SUCCESS: ECA_NORMAL +//info: Normal successful completion +//message: SUCCESS: ECA_NORMAL Normal successful completion +class CAFEStatus { + + public: + CAFEStatusSeverity css; + CAFEStatusInfo csi; + CAFEStatusCode csc; + CAFEStatus() {}; + + std::string severity(int i) { + return (std::string) css.message(i); + } + + std::string asString(int i) { + return (std::string) csc.msgIDAsString(i); + } + + std::string msgID(int i) { + return (std::string) csc.msgIDAsString(i); + } + + std::string code(int i) { + return (std::string) csc.message(i); + } + + std::string info(int i) { + return (std::string) csi.message(i); + } + + std::string message(int i) { + std::string strRet=""; + strRet.append(csc.message(i)); + strRet.append(" "); + strRet.append(csi.message(i)); + return (std::string) strRet; + } + + void report (int i) { + std::cout << "------------------" << std::endl; + std::cout << "CAFE STATUS REPORT" << std::endl; + std::cout << "------------------" << std::endl; + std::cout << csc.message(i) << std::endl; + std::cout << csi.message(i) << std::endl; + std::cout << "------------------" << std::endl; + }; +}; + +#endif // STATUSCODES_H diff --git a/include/transpose.h b/include/transpose.h new file mode 100644 index 0000000..d7cdf7d --- /dev/null +++ b/include/transpose.h @@ -0,0 +1,2159 @@ +/// +/// \file transpose.h +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#ifndef TRANSPOSE_H +#define TRANSPOSE_H + +#include +#include +#include +#include + +using namespace std; + +/** + * Transpose Template \n + * CTYPE is the type of data to be rendered to/from the client \n + * method get() will receive data transmitted by CA with dataTypeRequest \n + * and then convert to CTYPE + * method getString() will receive data transmitted by CA with dataTypeRequest \n + * and then convert to a string + * method put() will convert data of type CTYPE to the native type \n + * and then transmit to CA + * method putString() will convert a string type to the native type \n + * and then transmit to CA + */ +template class Transpose { + +public: + Transpose (){}; + ~Transpose (){}; + + HandleHelper handleHelper; + + int put(const unsigned int _handle, const CTYPE * val, const chtype cdt); + int put(const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val, CAFE_DATATYPE cdt); + int putString (const unsigned int _handle, dbr_string_t * val); + + int get( + const unsigned int _handle, CTYPE * val, + dbr_short_t & alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, bool isCacheRequest); + + + int get( //union db_access_val * PVDataL, + //ChannelRequestMetaDataClient channelRequestMetaDataClient, + //ChannelRepositoryMetaData channelRepositoryMetaData, + const unsigned int _handle, CTYPE * val, + dbr_short_t & alarmStatus, dbr_short_t &alarmSeverity, bool isCacheRequest) { + + epicsTimeStamp ts; + alarmStatus =0; + alarmSeverity =0; + + return get (//PVDataL, + //channelRequestMetaDataClient, + //channelRepositoryMetaData, + _handle, val, alarmStatus, alarmSeverity, ts, isCacheRequest); + }; + + + int get( //union db_access_val * PVDataL, + //ChannelRequestMetaDataClient channelRequestMetaDataClient, + //ChannelRepositoryMetaData channelRepositoryMetaData, + const unsigned int _handle, CTYPE * val, bool isCacheRequest) { + epicsTimeStamp ts; + dbr_short_t alarmStatus; + dbr_short_t alarmSeverity; + + ts.secPastEpoch=0; + ts.nsec =0; + alarmStatus =0; + alarmSeverity =0; + + return get(//PVDataL, + //channelRequestMetaDataClient, + //channelRepositoryMetaData, + _handle, val, alarmStatus, alarmSeverity, ts, isCacheRequest); + }; + + + int getCtrl ( //const CAFEConduit &cc, union db_access_val * PVDataL, + //ChannelRequestMetaDataClient channelRequestMetaDataClient, + //ChannelRepositoryMetaData channelRepositoryMetaData, + + const unsigned int _handle, CTYPE * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, dbr_short_t &precision, + CTYPE &RISC_pad, + CTYPE &upperDispLimit, CTYPE &lowerDispLimit, + CTYPE &upperAlarmLimit, CTYPE &upperWarningLimit, + CTYPE &lowerWarningLimit, CTYPE &lowerAlarmLimit, + CTYPE &upperCtrlLimit, CTYPE &lowerCtrlLimit, + char units[MAX_UNITS_SIZE], short &noStr, char strs [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE], bool isCacheRequest); + + + +private: + CTYPE * val; + int status; + CAFEStatus cafeStatus; + CAFEDataTypeCode cafeDataTypeCode; + union db_access_val * PVDataL; + unsigned int nelem; + unsigned int offset; + chtype dbrTypeRequest_DataBuffer; + chtype dbrTypeRequest_CtrlBuffer; + chtype _dataTypeClient; + char stig [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]; + +}; + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +/** + * Transpose Template Specialization for dbr_string_t char[40]\n + */ +template <> class Transpose { + //dbr_string_t * val; +public: + Transpose (){}; + ~Transpose (){}; + int putString (const unsigned int _handle, dbr_string_t * val); + int putString (const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val); //dbr_string_t * val); + + int get(//union db_access_val * PVDataL, + //ChannelRequestMetaDataClient channelRequestMetaDataClient, + //ChannelRepositoryMetaData channelRepositoryMetaData, + const unsigned int _handle, dbr_string_t * val, + dbr_short_t & alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, bool isCacheRequest ); + + + int get(//union db_access_val * PVDataL, + //ChannelRequestMetaDataClient channelRequestMetaDataClient, + //ChannelRepositoryMetaData channelRepositoryMetaData, + const unsigned int _handle, dbr_string_t * val, + dbr_short_t & alarmStatus, dbr_short_t &alarmSeverity, bool isCacheRequest ) { + + epicsTimeStamp ts; + alarmStatus =0; + alarmSeverity =0; + + return get (//PVDataL, + //channelRequestMetaDataClient, + //channelRepositoryMetaData, + _handle, val, alarmStatus, alarmSeverity, ts, isCacheRequest); + }; + + + int get(//union db_access_val * PVDataL, + //ChannelRequestMetaDataClient channelRequestMetaDataClient, + //ChannelRepositoryMetaData channelRepositoryMetaData, + const unsigned int _handle, dbr_string_t * val, bool isCacheRequest) { + epicsTimeStamp ts; + dbr_short_t alarmStatus; + dbr_short_t alarmSeverity; + + ts.secPastEpoch=0; + ts.nsec =0; + alarmStatus =0; + alarmSeverity =0; + + return get ( //PVDataL, + //channelRequestMetaDataClient, + //channelRepositoryMetaData, + _handle, val, alarmStatus, alarmSeverity, ts, isCacheRequest ); + }; + + + int getCtrl(//const CAFEConduit & cc, + const unsigned int _handle, dbr_string_t * val, + dbr_short_t & alarmStatus, dbr_short_t &alarmSeverity, bool isCacheRequest ); + +private: + int status; + CAFEStatus cafeStatus; + union db_access_val * PVDataL; + unsigned int nelem; + unsigned int offset; + chtype dbrTypeRequest_DataBuffer; + chtype dbrTypeRequest_CtrlBuffer; + chtype _dataTypeClient; + char stig [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]; +}; + + + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +/** + * Transpose Template Specialization for CAFE_DATATYPE_UNION_SEQ\n + */ +template <> class Transpose { + // CAFE_DATATYPE_UNION_SEQ val; +public: + Transpose (){}; + ~Transpose (){}; + + //long put(const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val, CAFE_DATATYPE cdt); + //long putString (const unsigned int _handle, dbr_string_t * val) { return ICAFE_NORMAL;} + + + int get(//const CAFEConduit & cc, + const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val, + dbr_short_t & alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, bool isCacheRequest); + + int get(//const CAFEConduit & cc, + const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val, + dbr_short_t & alarmStatus, dbr_short_t &alarmSeverity, bool isCacheRequest) { + + epicsTimeStamp ts; + alarmStatus =0; + alarmSeverity =0; + + return get (_handle, val, alarmStatus, alarmSeverity, ts, isCacheRequest); + }; + + + int get(//const CAFEConduit & cc, + const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val, bool isCacheRequest) { + epicsTimeStamp ts; + dbr_short_t alarmStatus; + dbr_short_t alarmSeverity; + + ts.secPastEpoch=0; + ts.nsec =0; + alarmStatus =0; + alarmSeverity =0; + + return get (_handle, val, alarmStatus, alarmSeverity, ts, isCacheRequest); + }; + +private: + int status; + CAFEStatus cafeStatus; + union db_access_val * PVDataL; + unsigned int nelem; + unsigned int offset; + chtype dbrTypeRequest_DataBuffer; + chtype _dataTypeClient; + char stig [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]; +}; + + +/** + * \brief Transforms data from CTYPE * val to PutBuffer + * \param _handle input: Conduit object + * \param val input: CTYPE datatype + * \param _dbrType input: chtype + * \return ICAFE_NORMAL as local data conversion should not incur an error + */ +template int Transpose::put(const unsigned int _handle, + const CTYPE * val, const chtype _dbrType) +{ +#define __METHOD__ "Transpose::put(_handle, CTYPE * val, const chtype cdt)" + + status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + + PVDataL = (*it_handle).getPutBuffer (); + nelem = (*it_handle).getChannelRequestMetaPrimitive().getNelem(); + + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaPrimitive().getDbrDataType(); + + //dbrTypeRequest_DataBuffer is the chtype used in ca_get + //Only ever fille the Union with the native type as + + //Need to first check if this is really an enum!? + + + if (dbrTypeRequest_DataBuffer==DBR_ENUM) { + + dbr_ctrl_enum * dataEnum = (dbr_ctrl_enum *) (*it_handle).getCtrlBuffer(); + dbr_short_t noStrings = ((struct dbr_ctrl_enum *) dataEnum)->no_str; + + if(noStrings >0) { + + for (unsigned int i=0; i= noStrings ) { + + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig )) ; + + + cout << __FILE__ << "//" << __LINE__ << "//" <<__METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_ENUM_INDEX); + cout << val[i] << " is not a a valid enum index " << endl; + cout << "VALID STRING [ENUM] OPTIONS ARE: " << endl; + for (dbr_short_t ij=0; ij0 + + }//if + + switch (dbrTypeRequest_DataBuffer) + { + case DBR_STRING: // 0 + switch(_dbrType){ + case CAFE_SHORT: + for (unsigned int i=0; i(&val[i])); + } + break; + case CAFE_FLOAT: + for (unsigned int i=0; i(&val[i])); + } + break; + case CAFE_ENUM: + for (unsigned int i=0; i(&val[i])); + } + break; + case CAFE_CHAR: + for (unsigned int i=0; i(&val[i])); + } + break; + case CAFE_LONG: + for (unsigned int i=0; i(&val[i])); + } + break; + case CAFE_DOUBLE: + for (unsigned int i=0; i(&val[i])); + } + break; + case CAFE_STRING: + memcpy( PVDataL, val, sizeof(dbr_string_t)*nelem); + + break; + default: + cout << "ERROR: " << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_SWITCH_CASE); + cout << "SWITCH STATMENT NOT MEANT FOR CAFE DATATYPE=" << _dbrType <::put( const unsigned int _handle, + // CAFE_DATATYPE_UNION_SEQ val, CAFE_DATATYPE cdt) + +template int Transpose::put( const unsigned int _handle, + CAFE_DATATYPE_UNION_SEQ val, CAFE_DATATYPE cdt) +{ +#define __METHOD__ "Transpose::put()" + + status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getPutBuffer (); + nelem = (*it_handle).getChannelRequestMetaPrimitive().getNelem(); + + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaPrimitive().getDbrDataType(); + + //dbrTypeRequest_DataBuffer is the chtype used in ca_get + //Only ever fille the Union with the native type as + + dbr_ctrl_enum * dataEnum; + dbr_short_t noStrings =0; + + + switch (dbrTypeRequest_DataBuffer) + { + case DBR_STRING: // 0 + switch(cdt){ + case CAFE_SHORT: + for (unsigned int i=0; i(&val[i].s)); + } + break; + case CAFE_FLOAT: + for (unsigned int i=0; i(&val[i].f)); + } + break; + case CAFE_ENUM: + for (unsigned int i=0; i(&val[i].us)); + } + break; + case CAFE_CHAR: + for (unsigned int i=0; i(&val[i].ch)); + } + break; + case CAFE_LONG: + for (unsigned int i=0; i(&val[i].l)); + } + break; + case CAFE_DOUBLE: + for (unsigned int i=0; i(&val[i].d)); + } + break; + case CAFE_STRING: + for (unsigned int i=0; i(&val[i].str)); + //cout << "after " << *((dbr_string_t *) (PVDataL) + i) << endl; + } + break; + default: + cout << "ERROR: " << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_SWITCH_CASE); + cout << "SWITCH STATMENT NOT MEANT FOR CAFE DATATYPE=" << cdt <no_str; + + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig )) ; + + + switch(cdt) { + + case CAFE_SHORT: + for (unsigned int i=0; i= (dbr_enum_t) noStrings) { + status=ECAFE_INVALID_ENUM_INDEX; + } + } + + break; + + case CAFE_FLOAT: //2 + for (unsigned int i=0; i= (dbr_enum_t) noStrings) { + status=ECAFE_INVALID_ENUM_INDEX; + } + } + + + break; + case CAFE_ENUM: //3 + for (unsigned int i=0; i= (dbr_enum_t) noStrings) { + status=ECAFE_INVALID_ENUM_INDEX; + } + } + break; + case CAFE_CHAR: //4 + for (unsigned int i=0; i= (dbr_enum_t) noStrings) { + status=ECAFE_INVALID_ENUM_INDEX; + } + } + break; + case CAFE_LONG: //5 + for (unsigned int i=0; i= (dbr_enum_t)noStrings) { + status=ECAFE_INVALID_ENUM_INDEX; + } + } + break; + case CAFE_DOUBLE: //6 + for (unsigned int i=0; i= (dbr_enum_t)noStrings) { + status=ECAFE_INVALID_ENUM_INDEX; + } + } + + + break; + case CAFE_STRING: //0 + status=putString(_handle, (dbr_string_t *) val); + + break; + + default: + cout << "ERROR: " << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_SWITCH_CASE); + cout << "SWITCH STATMENT NOT MEANT FOR CAFE DATATYPE=" << cdt < int Transpose::putString + (const unsigned int _handle, dbr_string_t * val) +{ +#define __METHOD__ "Transpose::putString" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getPutBuffer (); + nelem = (*it_handle).getChannelRequestMetaPrimitive().getNelem(); + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaPrimitive().getDbrDataType(); + + dbr_ctrl_enum * dataEnum; + dbr_short_t noStrings =0; + + bool allStringsAreValid=true; + // Client is String + // Native type is one of the following + + istringstream ss; + + switch(dbrTypeRequest_DataBuffer) { + + case DBR_STRING://0 + + + for (unsigned int i=0; i>s; + + if ( !ss.fail()) { + *((dbr_short_t *) (PVDataL) + i ) = s; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_SHORT CONVERSION for ELEMENT " << i + << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO SHORT; PUT REQUEST NOT MADE!" << endl; + //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + allStringsAreValid=false; + } + } + break; + + case DBR_FLOAT://2 + for (unsigned int i=0; i>f; + + if ( !ss.fail()) { + *((dbr_float_t *) (PVDataL) + i ) = f; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_FLOAT CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO FLOAT; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE! " << endl; + allStringsAreValid=false; + } + } + break; + + case DBR_ENUM: //3 + // CHANGE THE STRING TO CORRESPONDING ENUM! + dataEnum = (dbr_ctrl_enum *) (*it_handle).getCtrlBuffer(); + + + noStrings = ((struct dbr_ctrl_enum *) dataEnum)->no_str; + + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig )) ; + + + for (unsigned int i=0; i= b) + { + if (*c == ' ') { + *c = '\0'; + // This was reported at www.programmingforums.org/thread35790.html to cause a bus error!? + } + else { + break; + } + c--; + } + + sprintf(a, "%s", b); + + bool isValidString=false; + for (int j=0; j>us; + + // Is this a valid number? + if ( !ss.fail()) { + if (us==0 || (us>0 && us >ch; + + char *b = (char *) val[i]; + + + if ( !ss.fail()) { + *((dbr_char_t *) (PVDataL) + i ) = ch; + } + + else if (b != '\0') { + + *((dbr_char_t *) (PVDataL) + i ) = *b; + + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_CHAR CONVERSION for ELEMENT index " << i << " in array of length " << nelem; + cout << ", i.e., with index range [0-" << (nelem-1) << "] " << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO UNSIGNED CHAR; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + allStringsAreValid=false; + } + + } + break; + + case DBR_LONG: //5 + for (unsigned int i=0; i>l; + + if ( !ss.fail()) { + *((dbr_long_t *) (PVDataL) + i ) = l; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_LONG CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO LONG; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + + allStringsAreValid=false; + } + } + break; + + case DBR_DOUBLE: //6 + for (unsigned int i=0; i>d; + + if ( !ss.fail()) { + *((dbr_double_t *) (PVDataL) + i ) = d; + } + else { + cout << __METHOD__ << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO DOUBLE; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //PUT REQUEST NOT MADE!" << endl; + + allStringsAreValid=false; + } + + }//for + break; + } //switch + + + if(!allStringsAreValid) { + if (status==ECAFE_INVALID_ENUM_INDEX) {return status;} + return ECAFE_NO_CONVERT;} + else {return ICAFE_NORMAL;} + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + +/** + * \brief Retrieves data transmitted by CA with dbrTypeRequest_DataBuffer + * and then converts to CTYPE i.e. _dataTypeClient + * \param _handle input: handle to Conduit object + * \param val output: CTYPE datatype + * \param alarmStatus output: dbr_short_t + * \param alarmSeverity output: dbr_short_t + * \param ts output: epicsTimeStamp + * \param isCacheRequest input: bool + * \return ICAFE_NORMAL as local data conversion should not incur an error +**/ +template int Transpose::get( + const unsigned int _handle, CTYPE * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, bool isCacheRequest) +{ +#define __METHOD__ "Transpose::get()" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getDataBuffer(); + offset = (*it_handle).getChannelRequestMetaDataClient().getOffset(); + //cout << "offset client " << offset << endl; + //cout << "offset client too...... " << handleHelper.getOffset(_handle) << endl; + //cout << "offsetLast ...... " << handleHelper.getOffsetLast(_handle) << endl; + + // Difference between using cache and not + // when not cache offset is that requested by client.. + // when not cache nelem is no of elements requested by client plus the offset requested by client + // when cache offset is actual offset in last transaction + // when cache nelem is no of elements from cache + + if(isCacheRequest) { + + offset = (*it_handle).getChannelRequestMetaData().getOffset( ); // equivalent to handleHelper.getOffsetLast(_handle); + nelem = (*it_handle).getChannelRequestMetaData().getNelemCache();// + offset; // not (*it_handle).getChannelRequestMetaData().getOffset() + + //Could be that the number of elements in the data buffer is actually less! + //cout << "nelem1 + data offset " << nelem << " " << (*it_handle).getChannelRequestMetaData().getNelemCache() << " + " << + //(*it_handle).getChannelRequestMetaData().getOffset() << endl; + //nelem = min(nelem, (*it_handle).getChannelRequestMetaData().getNelemCache()+ offset); + //cout << "nelem2 " << nelem << " " << (*it_handle).getChannelRequestMetaData().getNelemCache() << " + " << offset << endl; + //cout << __METHOD__ << __LINE__ << endl; + //cout << "nelem = " << (*it_handle).getChannelRequestMetaData().getNelem() << endl; + //cout << "nelemCache = " << (*it_handle).getChannelRequestMetaData().getNelemCache() << endl; + //cout << "offset = " << (*it_handle).getChannelRequestMetaData().getOffset() << endl; + //cout << "offsetLast ...... " << handleHelper.getOffsetLast(_handle) << endl; + //cout << "nelem = " << nelem << endl; + + } + else { + nelem = (*it_handle).getChannelRequestMetaData().getNelem()-offset; + //cout << __METHOD__ << " nelem " << nelem << endl; + //cout << "getChannelRequestMetaData().getNelem()=" << (*it_handle).getChannelRequestMetaData().getNelem() << endl; + //cout << "getChannelRequestMetaDataClient().offset " << offset << endl; + + } + //Something wrong, just read last element + if (nelem <=0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Something funny with the offset; hence will read last element only!"<< endl; + cout << "Changing offset from=" << offset; + + offset = (*it_handle).getChannelRequestMetaData().getNelem()-1; + if(isCacheRequest) { + //this does not mean much for cache + nelem = (*it_handle).getChannelRequestMetaData().getNelemCache(); //(*it_handle).getChannelRequestMetaData().getOffset(); //add offset for cache + } + else { + nelem = (*it_handle).getChannelRequestMetaData().getNelem()-offset; + } + + cout << " to=" << offset << endl; + } + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaData().getDbrDataType(); + _dataTypeClient = (*it_handle).getChannelRequestMetaDataClient().getDataType(); + + //cout << "WHAT IS ON THE DATA BUFFER = " << dbrTypeRequest_DataBuffer << endl; + //cout << "WHAT THE CLIENT WANTS = " << _dataTypeClient << endl; + + ts.secPastEpoch=0; + ts.nsec =0; + alarmStatus =-1; + alarmSeverity =-1; + + + if (_dataTypeClient < DBR_STRING || _dataTypeClient > DBR_DOUBLE) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Datatype requested " << dbr_type_to_text(_dataTypeClient) + << " is not within allowed range: " << endl; + cout << "DBR_STRING <= dataType <= DBR_DOUBLE" << endl; + cout << "CAFE ERROR: ECAFE_INVALID_SWITCH_CASE" << endl; + return ECAFE_INVALID_SWITCH_CASE; + } + + //dbrTypeRequest_DataBuffer is the chtype used in ca_get + //_dataTypeCLient is the chtype requested by client + + switch (dbrTypeRequest_DataBuffer) + { + case DBR_CHAR: + switch(_dataTypeClient) + { + case DBR_CHAR: + memcpy( val, &(&((PVDataL)->charval))[offset], sizeof(dbr_char_t)*nelem); + break; + + default: + for (unsigned int i=0; icharval)+i+offset)); + } + break; + } + break; + + case DBR_FLOAT: + switch(_dataTypeClient) + { + case DBR_FLOAT: + memcpy( val, &(&((PVDataL)->fltval))[offset], sizeof(dbr_float_t)*nelem); + break; + default: + for (unsigned int i=0; ifltval)+i+offset)); + } + break; + } + + break; + + case DBR_DOUBLE: + switch(_dataTypeClient) + { + case DBR_DOUBLE: + memcpy( val, &(&((PVDataL)->doubleval))[offset], sizeof(dbr_double_t)*nelem); + break; + default: + for (unsigned int i=0; idoubleval)+i+offset)); + } + break; + } + break; + + case DBR_SHORT: + switch(_dataTypeClient) + { + case DBR_SHORT: + memcpy( val, &(&((PVDataL)->shrtval))[offset], sizeof(dbr_short_t)*nelem); + break; + default: + for (unsigned int i=0; ishrtval)+i+offset)); + } + break; + } + break; + + case DBR_LONG: + switch(_dataTypeClient) + { + case DBR_LONG: + memcpy( val, &(&((PVDataL)->longval))[offset], sizeof(dbr_long_t)*nelem); + break; + default: + for (unsigned int i=0; ilongval)+i+offset)); + } + break; + } + break; + + case DBR_ENUM: + switch(_dataTypeClient) + { + case DBR_ENUM: + memcpy( val, &(&((PVDataL)->enmval))[offset], sizeof(dbr_enum_t)*nelem); + break; + default: + for (unsigned int i=0; ienmval)+i+offset)); + } + break; + } + break; + + case DBR_STRING: + switch(_dataTypeClient) + { + case DBR_STRING: + memcpy( val, &(&((PVDataL)->strval))[offset], sizeof(dbr_string_t)*nelem); + break; + + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + for (unsigned int i=0; istrval)+i+offset)), NULL, 0); + } + break; + case DBR_FLOAT: + case DBR_DOUBLE: + default: + // If no valid conversion could be performed, the function returns zero (0.0). + for (unsigned int i=0; istrval)+i+offset)), NULL); + } + break; + } + break; + + case DBR_STS_CHAR: + switch(_dataTypeClient) + { + case DBR_CHAR: + memcpy( val, &(&((PVDataL)->schrval.value))[offset], sizeof(dbr_char_t)*nelem); + break; + default: + for (unsigned int i=0; ischrval.value)+i+offset)); + } + break; + } + alarmStatus = ((struct dbr_sts_char *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_char *) PVDataL)->severity; + break; + + case DBR_STS_FLOAT: + switch(_dataTypeClient) + { + case DBR_FLOAT: + memcpy( val, &(&((PVDataL)->sfltval.value))[offset], sizeof(dbr_float_t)*nelem); + break; + default: + for (unsigned int i=0; isfltval.value)+i+offset)); + } + break; + } + alarmStatus = ((struct dbr_sts_float *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_float *) PVDataL)->severity; + break; + + case DBR_STS_DOUBLE: + switch(_dataTypeClient) + { + case DBR_DOUBLE: + memcpy( val, &(&((PVDataL)->sdblval.value))[offset], sizeof(dbr_double_t)*nelem); + break; + default: + for (unsigned int i=0; isdblval.value)+i+offset)); + } + break; + } + alarmStatus = ((struct dbr_sts_double *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_double *) PVDataL)->severity; + break; + + case DBR_STS_SHORT: + switch(_dataTypeClient) + { + case DBR_SHORT: + memcpy( val, &(&((PVDataL)->sshrtval.value))[offset], sizeof(dbr_short_t)*nelem); + break; + default: + for (unsigned int i=0; isshrtval.value)+i+offset)); + } + break; + } + alarmStatus = ((struct dbr_sts_short *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_short *) PVDataL)->severity; + break; + + case DBR_STS_LONG: + switch(_dataTypeClient) + { + case DBR_LONG: + memcpy( val, &(&((PVDataL)->slngval.value))[offset], sizeof(dbr_long_t)*nelem); + break; + default: + for (unsigned int i=0; islngval.value)+i+offset)); + } + break; + } + alarmStatus = ((struct dbr_sts_long *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_long *) PVDataL)->severity; + break; + + case DBR_STS_ENUM: + switch(_dataTypeClient) + { + case DBR_ENUM: + memcpy( val, &(&((PVDataL)->senmval.value))[offset], sizeof(dbr_enum_t)*nelem); + break; + default: + for (unsigned int i=0; isenmval.value)+i+offset)); + } + break; + } + alarmStatus = ((struct dbr_sts_enum *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_enum *) PVDataL)->severity; + break; + + case DBR_STS_STRING: + switch(_dataTypeClient) + { + case DBR_STRING: + memcpy( val, &(&((PVDataL)->sstrval.value))[offset], sizeof(dbr_string_t)*nelem); + break; + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + for (unsigned int i=0; isstrval.value)+i+offset)), NULL, 0); + } + break; + case DBR_FLOAT: + case DBR_DOUBLE: + default: + for (unsigned int i=0; isstrval.value)+i+offset)), NULL); + } + break; + } + alarmStatus = ((struct dbr_sts_string *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_string *) PVDataL)->severity; + break; + + case DBR_TIME_CHAR: + switch(_dataTypeClient) + { + case DBR_CHAR: + memcpy( val, &(&((PVDataL)->tchrval.value))[offset], sizeof(dbr_char_t)*nelem); + break; + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_FLOAT: + case DBR_DOUBLE: + default: + for (unsigned int i=0; itchrval.value)+i+offset)); + } + break; + // strings are handled by getString - but are handled HERE when calling getCache()!! + //case DBR_STRING: + // for (unsigned int i=0; itchrval.value)+i))); + } + ts = ((struct dbr_time_char *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_char *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_char *) PVDataL)->severity; + break; + + case DBR_TIME_FLOAT: + switch(_dataTypeClient) + { + case DBR_FLOAT: + memcpy( val, &(&((PVDataL)->tfltval.value))[offset], sizeof(dbr_float_t)*nelem); + break; + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + case DBR_DOUBLE: + default: + for (unsigned int i=0; itfltval.value)+i+offset)); + } + break; + } + ts = ((struct dbr_time_float *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_float *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_float *) PVDataL)->severity; + break; + + case DBR_TIME_DOUBLE: + switch(_dataTypeClient) + { + case DBR_DOUBLE: + memcpy( val, &(&((PVDataL)->tdblval.value))[offset], sizeof(dbr_double_t)*nelem); + break; + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + case DBR_FLOAT: + default: + for (unsigned int i=0; itdblval.value)+i+offset)); + } + break; + } + ts = ((struct dbr_time_double *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_double *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_double *) PVDataL)->severity; + + break; + + case DBR_TIME_SHORT: + switch(_dataTypeClient) + { + case DBR_SHORT: + memcpy( val, &(&((PVDataL)->tshrtval.value))[offset], sizeof(dbr_short_t)*nelem); + break; + case DBR_DOUBLE: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + case DBR_FLOAT: + default: + for (unsigned int i=0; itshrtval.value)+i+offset)); + } + break; + //case DBR_STRING: + // for (unsigned int i=0; itshrtval.value)+i))); + } + ts = ((struct dbr_time_short *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_short *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_short *) PVDataL)->severity; + break; + + case DBR_TIME_LONG: + switch(_dataTypeClient){ + case DBR_LONG: + memcpy( val, &(&((PVDataL)->tlngval.value))[offset], sizeof(dbr_long_t)*nelem); + break; + case DBR_DOUBLE: + case DBR_SHORT: + case DBR_ENUM: + case DBR_CHAR: + case DBR_FLOAT: + default: + for (unsigned int i=0; itlngval.value)+i+offset)); + } + break; + //case DBR_STRING: + // for (unsigned int i=0; itlngval.value)+i))); + //break; + } + ts = ((struct dbr_time_long *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_long *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_long *) PVDataL)->severity; + break; + + case DBR_TIME_ENUM: + switch(_dataTypeClient) + { + case DBR_ENUM: + memcpy( val, &(&((PVDataL)->tenmval.value))[offset], sizeof(dbr_enum_t)*nelem); + break; + case DBR_DOUBLE: + case DBR_SHORT: + case DBR_LONG: + case DBR_CHAR: + case DBR_FLOAT: + default: + for (unsigned int i=0; itenmval.value)+i+offset)); + } + break; + //case DBR_STRING: + // for (unsigned int i=0; itenmval.value)+i))); + //break; + } + ts = ((struct dbr_time_enum *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_enum *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_enum *) PVDataL)->severity; + break; + + + case DBR_TIME_STRING: + default: + switch(_dataTypeClient){ + case DBR_STRING: + memcpy( val, &(&((PVDataL)->strval))[offset], sizeof(dbr_string_t)*nelem); + break; + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + for (unsigned int i=0; itstrval.value)+i+offset)), NULL, 0); + } + break; + case DBR_FLOAT: + case DBR_DOUBLE: + default: + for (unsigned int i=0; itstrval.value)+i+offset)), NULL); + } + break; + } + ts = ((struct dbr_time_string *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_string *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_string *) PVDataL)->severity; + break; + } + //helper function to set TimeStamps! + //cout <<__METHOD__ << endl; + //cout << "_dbrType" << _dbrTypeRequest_DataBuffer<< endl; + //cout << ts.secPastEpoch << " " << ts.nsec << endl; + + if(!isCacheRequest) { + handleHelper.setSTS(_handle, alarmStatus, alarmSeverity, ts); + } + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + + +#undef __METHOD__ +} + + +/** + * \brief Retrieves ctrl data from buffer + * \param _handle input: handle to Conduit Object + * \param val output: CTYPE + * \param alarmStatus output: dbr_short_t + * \param alarmSeverity output: dbr_short_t + * \param precision output: dbr_short_t + * \param RISC_pad deprecated! + * \param upperDispLimit output + * \param lowerDispLimit output + * \param upperAlarmLimit output + * \param upperWarningLimit output + * \param lowerWarningLimit output + * \param lowerAlarmLimit output + * \param upperCtrlLimit output + * \param lowerCtrlLimit output + * \param units output: units + * \param noStr output: No of ENUM Choices + * \param strs output: ENUM Choices + * \param isCacheRequest input: bool true or false + * \return ICAFE_NORMAL + */ +template int Transpose::getCtrl ( + //const CAFEConduit &cc, union db_access_val * PVDataL, + //ChannelRequestMetaDataClient channelRequestMetaDataClient, + //ChannelRepositoryMetaData channelRepositoryMetaData, + const unsigned int _handle, CTYPE * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, dbr_short_t &precision, + CTYPE &RISC_pad, + CTYPE &upperDispLimit, CTYPE &lowerDispLimit, + CTYPE &upperAlarmLimit, CTYPE &upperWarningLimit, + CTYPE &lowerWarningLimit, CTYPE &lowerAlarmLimit, + CTYPE &upperCtrlLimit, CTYPE &lowerCtrlLimit, + char units[MAX_UNITS_SIZE], short &noStr, char strs [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE], + bool isCacheRequest) { +#define __METHOD__ "Transpose::getCtrl()" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getCtrlBuffer (); + + offset = (*it_handle).getChannelRequestMetaCtrlClient().getOffset(); + + + + if(isCacheRequest) { + offset = (*it_handle).getChannelRequestMetaCtrl().getOffset( ); + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelemCache();; // + (*it_handle).getChannelRequestMetaCtrl().getOffset(); + //nelem = min(nelem, (*it_handle).getChannelRequestMetaCtrl().getNelem() + offset); + + } + else { + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelem()-offset; + } + //Something wrong, just read last element + if (nelem <=0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Something funny with the offset; just read last element! " << endl; + cout << "Changing offset from=" << offset; + + offset = (*it_handle).getChannelRequestMetaCtrl().getNelem()-1; + if(isCacheRequest) { + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelemCache(); // + (*it_handle).getChannelRequestMetaCtrl().getOffset(); //-offset; + } + else { + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelem()-offset; + } + cout << " to=" << offset << endl; + } + + + dbrTypeRequest_CtrlBuffer = (*it_handle).getChannelRequestMetaCtrl().getDbrDataType(); + _dataTypeClient = (*it_handle).getChannelRequestMetaDataClient().getDataType(); + + + alarmStatus = -1; + alarmSeverity = -1; + + if (_dataTypeClient < DBR_STRING || _dataTypeClient > DBR_DOUBLE) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Datatype requested " << dbr_type_to_text(_dataTypeClient) + << " is not within allowed range: " << endl; + cout << "DBR_STRING <= dataType <= DBR_DOUBLE" << endl; + cout << "CAFE ERROR: ECAFE_INVALID_SWITCH_CASE" << endl; + return ECAFE_INVALID_SWITCH_CASE; + } + + + noStr=0; + + //cout << __METHOD__ << endl; + //cout << " dbrTypeRequest_CtrlBuffer " << dbrTypeRequest_CtrlBuffer << endl; + //cout << " _dataTypeClient " << _dataTypeClient << endl; + + + switch (dbrTypeRequest_CtrlBuffer) { + + case DBR_CTRL_CHAR: + + switch(_dataTypeClient){ + case DBR_CHAR: + memcpy(val, &(&((PVDataL)->cchrval.value))[offset], sizeof(dbr_char_t)*nelem); + break; + case DBR_DOUBLE: + case DBR_SHORT: + case DBR_ENUM: + case DBR_LONG: + case DBR_FLOAT: + for (unsigned int i=0; icchrval.value)+i+offset)); + } + break; + // strings are handled by a specialized template + case DBR_STRING: + default: + break; + } + + precision = 0; // struct dbr_ctrl_char does not have the precision member + RISC_pad = ((struct dbr_ctrl_char *) PVDataL)->RISC_pad; + alarmStatus = ((struct dbr_ctrl_char *) PVDataL)->status; + alarmSeverity = ((struct dbr_ctrl_char *) PVDataL)->severity; + + memcpy(units, &(((struct dbr_ctrl_char *) PVDataL)->units), sizeof(char[MAX_UNITS_SIZE])); + + upperDispLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->upper_disp_limit; + lowerDispLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->lower_disp_limit; + upperAlarmLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->upper_alarm_limit; + upperWarningLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->upper_warning_limit; + lowerWarningLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->lower_warning_limit; + lowerAlarmLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->lower_alarm_limit; + upperCtrlLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->upper_ctrl_limit; + lowerCtrlLimit = (CTYPE) ((struct dbr_ctrl_char *) PVDataL)->lower_ctrl_limit; + + break; + + case DBR_CTRL_ENUM: + switch(_dataTypeClient){ + case DBR_ENUM: + memcpy(val, &(&((PVDataL)->cenmval.value))[offset], sizeof(dbr_enum_t)*nelem); + //for (unsigned int i=0; icenmval.value)+i)); + } + break; + // strings are handled by a specialized template + case DBR_STRING: + default: + break; + } + + precision = 0; // struct dbr_ctrl_enum does not have the precision member + RISC_pad = 0; // struct dbr_ctrl_char does not have the RISC_pad member + alarmStatus = ((struct dbr_ctrl_enum *) PVDataL)->status; + alarmSeverity = ((struct dbr_ctrl_enum *) PVDataL)->severity; + noStr = ((struct dbr_ctrl_enum *) PVDataL)->no_str; + + memcpy(strs , &(((struct dbr_ctrl_enum *) PVDataL)->strs), + sizeof(char)*MAX_ENUM_STRING_SIZE*MAX_ENUM_STATES); + + //for (unsigned int i=0; icfltval.value))[offset], sizeof(dbr_float_t)*nelem); + + break; + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + case DBR_DOUBLE: + for (unsigned int i=0; icfltval.value)+i+offset)) ; + } + break; + // strings are handled by a specialized template + case DBR_STRING: + default: + break; + } + + precision = ((struct dbr_ctrl_float *) PVDataL)->precision; + RISC_pad = ((struct dbr_ctrl_float *) PVDataL)->RISC_pad; + + //std::cout << " RISC_PAD " << ((struct dbr_ctrl_float *) PVDataL)->RISC_pad << std::endl; + //std::cout << " RISC_PAD " << (short) ((struct dbr_ctrl_float *) PVDataL)->RISC_pad << std::endl; + + alarmStatus = ((struct dbr_ctrl_float *) PVDataL)->status; + alarmSeverity = ((struct dbr_ctrl_float *) PVDataL)->severity; + + memcpy(units, &(((struct dbr_ctrl_float *) PVDataL)->units), sizeof(char[MAX_UNITS_SIZE])); + + upperDispLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->upper_disp_limit; + lowerDispLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->lower_disp_limit; + upperAlarmLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->upper_alarm_limit; + upperWarningLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->upper_warning_limit; + lowerWarningLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->lower_warning_limit; + lowerAlarmLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->lower_alarm_limit; + upperCtrlLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->upper_ctrl_limit; + lowerCtrlLimit = (CTYPE) ((struct dbr_ctrl_float *) PVDataL)->lower_ctrl_limit; + + //cout << "upperCtrlLimit= " << upperCtrlLimit << " upperDispLimit=" << upperDispLimit << endl; + // cout << "value " << val[0] << endl; + + break; + + case DBR_CTRL_DOUBLE: + switch(_dataTypeClient){ + case DBR_DOUBLE: + memcpy(val, &(&((PVDataL)->cdblval.value))[offset], sizeof(dbr_double_t)*nelem); + + break; + case DBR_SHORT: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + case DBR_FLOAT: + for (unsigned int i=0; icdblval.value)+i+offset)); + } + break; + // strings are handled by a specialized template + case DBR_STRING: + default: + break; + } + + precision = ((struct dbr_ctrl_double *) PVDataL)->precision; + RISC_pad = (short) ((struct dbr_ctrl_double *) PVDataL)->RISC_pad0; //short + alarmStatus = ((struct dbr_ctrl_double *) PVDataL)->status; + alarmSeverity = ((struct dbr_ctrl_double *) PVDataL)->severity; + + memcpy(units, &(((struct dbr_ctrl_double *) PVDataL)->units), sizeof(char[MAX_UNITS_SIZE])); + + upperDispLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->upper_disp_limit; + lowerDispLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->lower_disp_limit; + upperAlarmLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->upper_alarm_limit; + upperWarningLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->upper_warning_limit; + lowerWarningLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->lower_warning_limit; + lowerAlarmLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->lower_alarm_limit; + upperCtrlLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->upper_ctrl_limit; + lowerCtrlLimit = (CTYPE) ((struct dbr_ctrl_double *) PVDataL)->lower_ctrl_limit; + + break; + + case DBR_CTRL_SHORT: + switch(_dataTypeClient){ + case DBR_SHORT: + memcpy(val, &(&((PVDataL)->cshrtval.value))[offset], sizeof(dbr_short_t)*nelem); + + break; + case DBR_DOUBLE: + case DBR_LONG: + case DBR_ENUM: + case DBR_CHAR: + case DBR_FLOAT: + for (unsigned int i=0; icshrtval.value)+i+offset)); + } + break; + // strings are handled by a specialized template + case DBR_STRING: + default: + break; + } + + + precision = 0; // struct dbr_ctrl_shrt does not have the precision member + RISC_pad = 0; // struct dbr_ctrl_shrt does not have the RISC_pad member + alarmStatus = ((struct dbr_ctrl_short *) PVDataL)->status; + alarmSeverity = ((struct dbr_ctrl_short *) PVDataL)->severity; + + memcpy(units, &(((struct dbr_ctrl_short *) PVDataL)->units), sizeof(char[MAX_UNITS_SIZE])); + + upperDispLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->upper_disp_limit; + lowerDispLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->lower_disp_limit; + upperAlarmLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->upper_alarm_limit; + upperWarningLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->upper_warning_limit; + lowerWarningLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->lower_warning_limit; + lowerAlarmLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->lower_alarm_limit; + upperCtrlLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->upper_ctrl_limit; + lowerCtrlLimit = (CTYPE) ((struct dbr_ctrl_short *) PVDataL)->lower_ctrl_limit; + + break; + + + case DBR_CTRL_LONG: + switch(_dataTypeClient){ + case DBR_LONG: + memcpy(val, &(&((PVDataL)->clngval.value))[offset], sizeof(dbr_long_t)*nelem); + break; + case DBR_DOUBLE: + case DBR_SHORT: + case DBR_ENUM: + case DBR_CHAR: + case DBR_FLOAT: + for (unsigned int i=0; iclngval.value)+i+offset)); + } + break; + // strings are handled by a specialized template + case DBR_STRING: + default: + break; + } + + precision = 0; // struct dbr_ctrl_long does not have the precision member + RISC_pad = 0; // struct dbr_ctrl_long does not have the RISC_pad member + + alarmStatus = ((struct dbr_ctrl_long *) PVDataL)->status; + alarmSeverity = ((struct dbr_ctrl_long *) PVDataL)->severity; + + memcpy(units, &(((struct dbr_ctrl_long *) PVDataL)->units),sizeof(char[MAX_UNITS_SIZE])) ; + + upperDispLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->upper_disp_limit; + lowerDispLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->lower_disp_limit; + upperAlarmLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->upper_alarm_limit; + upperWarningLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->upper_warning_limit; + lowerWarningLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->lower_warning_limit; + lowerAlarmLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->lower_alarm_limit; + upperCtrlLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->upper_ctrl_limit; + lowerCtrlLimit = (CTYPE) ((struct dbr_ctrl_long *) PVDataL)->lower_ctrl_limit; + + break; + } + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + +return ICAFE_NORMAL; +#undef __METHOD__ +} + + +#endif // TRANSPOSE_H + + + + + + diff --git a/include/zhelpers.h b/include/zhelpers.h new file mode 100644 index 0000000..42579f3 --- /dev/null +++ b/include/zhelpers.h @@ -0,0 +1,830 @@ +/* ===================================================================== + zhelpers.h + + Helper header file for example applications. + ===================================================================== +*/ + + + +#ifndef __ZHELPERS_H_INCLUDED__ +#define __ZHELPERS_H_INCLUDED__ + +#if HAVE_ZEROMQ + + +// Include a bunch of headers that we will need in the examples + +#include + +#include +#include +#include +#include +#include + +#if (defined (WIN32)) +# include +#else +# include +#endif + +#include +#include + +// Version checking, and patch up missing constants to match 2.1 +#if ZMQ_VERSION_MAJOR == 2 +# error "Please upgrade to ZeroMQ/3.2 for these examples" +#endif + +// Provide random number from 0..(num-1) +#if (defined (WIN32)) +# define randof(num) (int) ((float) (num) * rand () / (RAND_MAX + 1.0)) +#else +# define randof(num) (int) ((float) (num) * random () / (RAND_MAX + 1.0)) +#endif + +#if HAVE_JSON + #include +#endif + +#include + + +unsigned short inDumpFlag=2; +string hashIs=""; +string hashOriginal=""; +unsigned short hashOriginalFlag=0; +bool fillBSPV=false; +vector bsPV; + +// Receive 0MQ string from socket and convert into C string +// Caller must free returned string. Returns NULL if the context +// is being terminated. +static char * +s_recv (void *socket) { + char buffer [4096]; + int size = zmq_recv (socket, buffer, 4096, 0); //ZMQ_DONTWAIT); + if (size == -1) + return NULL; + if (size > 4096) + size = 4096; + buffer [size] = 0; + return strdup (buffer); +} + +// Convert C string to 0MQ string and send to socket +static int +s_send (void *socket, char *string) { + int size = zmq_send (socket, string, strlen (string), 0); + return size; +} + +// Sends string as 0MQ string, as multipart non-terminal +static int +s_sendmore (void *socket, char *string) { + int size = zmq_send (socket, string, strlen (string), ZMQ_SNDMORE); + return size; +} + + + +// Receives all message parts from socket, prints neatly +// +static void +s_dump (DBPMKeeper & dbpm) +{ + + if (inDumpFlag==1) { + cout << "zeroMQ socket is busy " << endl; + cout << "waiting got zmq timeout " << endl; + } + + puts ("//START----------------------------------------//"); + + void * socket = dbpm.subscriber; + + + #if HAVE_JSON + Json::Value parsedFromString; + Json::Reader reader; + bool parsingSuccessful; + Json::FastWriter fastWriter; + + #endif + + int64_t more; // Multipart detection + more = 0; + size_t more_size = sizeof (more); + + int bsPVIdx=-1; + dbpm.status=ICAFE_NORMAL; + + int nZeroSize=0; + + cout << "df = " << inDumpFlag << endl; + + while (inDumpFlag==1) { + cout << "df/ = " << inDumpFlag << endl; + cout << " sleeping " << endl; + sleep(1); + } + + int subMessage=0; + int nSequentialHeader=0; + + while (1) { + inDumpFlag=1; + + // puts ("//WHILE LOOP ----------------------------------------//"); + //cout << "subMessage " << subMessage << endl; + // Process all parts of the message + zmq_msg_t message; + zmq_msg_init (&message); + + size_t size = zmq_msg_recv (&message, socket, 0); + //puts ("//MESSAGE RECEIVED ----------------------------------------//"); + + if (size == -1) { + cout << " Error is " << zmq_errno() << " " << zmq_strerror(zmq_errno()) << endl; + //Resource unavailable means that there is nothing to read now + + zmq_msg_close (&message); + dbpm.status=ICAFE_LINUX_ERROR+zmq_errno() ; + break; + } + + + else if (size == 0) { + + //cout << " Data of Zero SIZE for submessage " << subMessage << endl; + + ++nZeroSize; + + //zmq_msg_close (&message); + //dbpm.status=ECAFE_NODATA; + //break; + //Comes in pairs; one for val one for timestamp + if (nZeroSize%2==1) { + ++bsPVIdx; + + // cout << " pv with zero size: " << bsPV[bsPVIdx] << endl; + + } + + ++subMessage; + + continue; + } + else { + + // Dump the message as text or binary + char *data = (char*)zmq_msg_data (&message); + int is_text = 1; + int char_nbr; + + //char cmd[5000]=""; + + for (char_nbr = 0; char_nbr < size; char_nbr++) + if ((unsigned char) data [char_nbr] < 32 + || (unsigned char) data [char_nbr] > 127) + is_text = 0; + + // printf (" SIZE [%03d] ", size); + + /* + if (is_text) { + cout << " TEXT +++++++++++ " << endl; + } + else { + cout << " NOT TEXT +++++++++++ " << endl; + } + + + for (char_nbr = 0; char_nbr < size; char_nbr++) { + if (is_text) { + printf ("%c", data [char_nbr]); + //snprintf(cmd + strlen(cmd), (sizeof cmd) - strlen(cmd), "%c", data [char_nbr]); + + } + else { + printf ("%02X", (unsigned char) data [char_nbr]); + //printf ("%d", (unsigned char) data [char_nbr]); + + //snprintf(cmd + strlen(cmd), (sizeof cmd) - strlen(cmd), "%d", (unsigned char)data [char_nbr]); + + //if (data[0] == '\x7') { + // cout << " little endian " << endl; + //} + //else { + // cout << "big endian " << endl; + //} + + + } + }//for + printf ("\n"); + */ + + + if (is_text) { + parsingSuccessful=reader.parse(data, parsedFromString); + if (parsingSuccessful) { + Json::StyledWriter styledWriter; + //cout << "STYLED: --------------------------------" << endl; + //cout << styledWriter.write(parsedFromString) << endl; + //cout << "----------------------------------" << endl; + cout << parsedFromString["htype"] << endl; + + + if (fastWriter.write(parsedFromString["htype"]).find("bsr_m-1.1") != std::string::npos) { + + ++nSequentialHeader; + + hashIs=parsedFromString["hash"].asString(); + + if (hashOriginalFlag<2) { + cout << hashIs << " is different to original/// " << hashOriginal << endl; + hashOriginal=hashIs; + ++hashOriginalFlag; + fillBSPV=true; + } + + if (hashOriginal.compare(hashIs)!=0) { + cout << hashIs << " is different to original " << hashOriginal << endl; + fillBSPV=true; + + } + cout << "p id " << parsedFromString["pulse_id"].asUInt64() << endl; + + //Reset values as a change of hash signifies that data from two pulse ids + //is being sent in one zeromq messages + + subMessage=0; + + bsPVIdx=-1; + dbpm.status=ICAFE_NORMAL; + + nZeroSize=0; + + + /* + cout << "(1)++++++++++++++++++++++++++++++++++++++++MAIN++++++++++++++++++++++++++++++++++++++++++" << endl; + + cout << "hash " << parsedFromString["hash"] << endl; + cout << "p id " << parsedFromString["pulse_id"].asUInt64() << endl; + cout << "g ts " << parsedFromString["global_timestamp"] << endl; + cout << "comp " << parsedFromString["dh_compression"] << endl; + + cout << "sec " << parsedFromString["global_timestamp"]["sec"].asUInt() << endl; + cout << "nsec " << parsedFromString["global_timestamp"]["ns"].asUInt() << endl; + */ + + } + else if (fastWriter.write(parsedFromString["htype"]).find("bsr_d-1.1") != std::string::npos) { + + + + //if (fillBSPV) { + + bsPV.clear(); + bsPV.reserve(dbpm.getNPV()); + /* + if (dbpm.getNPV() != parsedFromString["channels"].size() ) { + cout << "No of CONFIGURED BPMS: " << dbpm.getNPV() + << " is diffent to that being channeled " << parsedFromString["channels"].size() << endl; + bsPV.reserve( max( (size_t) parsedFromString["channels"].size(),dbpm.getNPV()) ); + + } + + */ + + + //cout << "chan " << parsedFromString["channels"] << endl; + + cout << "No of channels " << parsedFromString["channels"].size() << endl; + + cout << "(2)++++++++++++++++++++++++++++++++++++++++HEADER++++++++++++++++++++++++++++++++++++++++++" << endl; + + for (Json::Value::ArrayIndex i=0; i < parsedFromString["channels"].size(); ++ i) { + + //cout << "name " << parsedFromString["channels"][i]["name"].asString() << endl; + //cout << "enco " << parsedFromString["channels"][i]["encoding"] << endl; + //cout << "type " << parsedFromString["channels"][i]["type"] << endl; + + bsPV.push_back( (parsedFromString["channels"][i]["name"]).asString()); + } + /* + cout << "LIST OF PVS " << endl; + for (size_t i=0; i< bsPV.size(); ++i ) { + cout << i << " // " << bsPV[i].c_str() << " " << endl; + } + cout << endl; + */ + + //cout << "NEW FILL: size of bsPV " << bsPV.size() << endl; + fillBSPV=false; + //} + + } + + else { + + cout << "HEADER IS SOMETHING ELSE: " << endl; + cout << parsedFromString["htype"] << endl; + + exit(1); + + } + + + //cout << "----------------------------------" << endl; + + } + } + + + if (nSequentialHeader >5) { + cout << "WARNING: ZEROMQ SUB-MESSAGE DOES NOT CLOSE " << endl; + cout << "WARNING: FORCING CLOSE AND BREAKING FROM LOOP " << endl; + zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); + + zmq_msg_close (&message); + cout << "message mulipart --> more == " << more << endl; + + dbpm.status=LINUX_EAGAIN; //ICAFE_LINUX_ERROR +zmq_errno() ; + //break; + + } + + + union foo + { + char c[sizeof(double)]; + double d; + + } bar; + + //SIZE 16 is timestamp + //SIZE 8 is x,y,Q + //SIZE 2 is valid + + if (subMessage > 1430) { + cout << " SIZE " << size << " subMessage " << subMessage << endl; + cout << "size of bsPV " << bsPV.size() << endl; + } + + if (subMessage > 0 && subMessage%2 ==0) { + if (size==8) { + + // big endian + for (char_nbr = 0; char_nbr < size; char_nbr++) { + bar.c[char_nbr]=data[size-1-char_nbr]; // THis works for big engian + } + // little endian + //for (char_nbr = 0; char_nbr < size; char_nbr++) { + // bar.c[char_nbr]=data[char_nbr]; + //} + + + //cout << "UNION D " << bar.d << endl; + + + double v; // = (double*) data; + memcpy(&v, bar.c, sizeof(double)); + //cout << " double val " << v << endl; + + //This is BPM Data - value + ++bsPVIdx; + + if (dbpm.getPVIdx(bsPV[bsPVIdx]) <0) { + cout << " WARNING--> THIS CHANNEL WAS NOT REQUESTED IN CONFIGURATION FILE " << endl; + cout << " bsPV index = " << bsPVIdx << endl; + cout << " pv from bs = " << bsPV[bsPVIdx] << endl; + cout << " Illegal index Value =" << dbpm.getPVIdx(bsPV[bsPVIdx]) << endl; + cout << " SKIPPING THIS BPM... " << endl; + continue; + } + + + dbpm.pvd[dbpm.getPVIdx(bsPV[bsPVIdx])].set(v); + + //cout << " readback of value that was set = " << dbpm.pvd[dbpm.getPVIdx(bsPV[bsPVIdx])].val[0].d << endl; + + } + else if (size==2) { + unsigned short iv; + //memcpy(&iv, cmd, size); + //big endian + for (size_t n=0; n < size; n++) { + iv = (iv << 8) + data[n]; + } + //little endian + //for (size_t n = size; n >= 0; n--) { + // iv = (iv << 8) + data[n]; + //} + + //This is BPM Data - VALID/INVALID + + //cout << "uint val (1 means valid) " << iv << endl; + + /* + std::copy(data, data + 32, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 8, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 4, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 2, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 1, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + + */ + ++bsPVIdx; + + + if (dbpm.getPVIdx(bsPV[bsPVIdx]) <0) { + cout << " WARNING--> THIS CHANNEL WAS NOT REQUESTED IN CONFIGURATION FILE " << endl; + cout << " bsPV index = " << bsPVIdx << endl; + cout << " pv from bs = " << bsPV[bsPVIdx] << endl; + cout << " Illegal index Value =" << dbpm.getPVIdx(bsPV[bsPVIdx]) << endl; + cout << " SKIPPING THIS BPM ENUM TYPE " << endl; + continue; + } + + + + + if (iv==1) { + dbpm.pvd[dbpm.getPVIdx(bsPV[bsPVIdx])].set((std::string) "VALID"); + + } + else { + dbpm.pvd[dbpm.getPVIdx(bsPV[bsPVIdx])].set((std::string) "INVALID"); + } + + //cout << "value DBPM = " << dbpm.pvd[dbpm.getPVIdx(bsPV[bsPVIdx])].val[0].str << endl; + } + + + } + else if (subMessage > 1 && subMessage%2 ==1) { + //cout << "timestamp " << endl; + unsigned int a,b; + for (size_t n=0; n < size/2; n++) { + a = (a << 8) + data[n]; + } + for (size_t n=size/2; n < size; n++) { + b = (b << 8) + data[n]; + } + + //cout << "a " << a << " b " << b << endl; + + + if (dbpm.getPVIdx(bsPV[bsPVIdx]) <0) { + cout << " WARNING--> THIS CHANNEL WAS NOT REQUESTED IN CONFIGURATION FILE " << endl; + cout << " bsPV index = " << bsPVIdx << endl; + cout << " pv from bs = " << bsPV[bsPVIdx] << endl; + cout << " Illegal index Value =" << dbpm.getPVIdx(bsPV[bsPVIdx]) << endl; + cout << " SKIPPING THIS BPM TIMESTAMP " << endl; + continue; + } + + + + dbpm.pvd[dbpm.getPVIdx(bsPV[bsPVIdx])].ts.secPastEpoch=a; + dbpm.pvd[dbpm.getPVIdx(bsPV[bsPVIdx])].ts.nsec=b; + } + + + + //cout << "subMessage above: " << subMessage << endl; + + ++subMessage; + + + } //ifelse + + + zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); + zmq_msg_close (&message); + + + + if (!more) { + cout << "subMessage total: " << subMessage << endl; + puts ("//------------------------------------END-------------------------------------//"); + + break; // Last message part + } + } //while 1 + + inDumpFlag=0; + + + return; +} + + + + + + + + + +// Receives all message parts from socket, prints neatly +// +static void +s_dump (void *socket) +{ + puts ("//START----------------------------------------//"); + int subMessage=0; + #if HAVE_JSON + Json::Value parsedFromString; + Json::Reader reader; + bool parsingSuccessful; + Json::FastWriter fastWriter; + + #endif + + + + while (1) { + // Process all parts of the message + zmq_msg_t message; + zmq_msg_init (&message); + size_t size = zmq_msg_recv (&message, socket, 0); + + if (size == -1) { + cout << " Error is " << zmq_errno() << " " << zmq_strerror(zmq_errno()) << endl; + //Resource unavailable means that there is nothing to read now + + zmq_msg_close (&message); + break; + } + else { + + // Dump the message as text or binary + char *data = (char*)zmq_msg_data (&message); + int is_text = 1; + int char_nbr; + + //char cmd[5000]=""; + + for (char_nbr = 0; char_nbr < size; char_nbr++) + if ((unsigned char) data [char_nbr] < 32 + || (unsigned char) data [char_nbr] > 127) + is_text = 0; + + printf ("[%03d] ", size); + + for (char_nbr = 0; char_nbr < size; char_nbr++) { + if (is_text) { + printf ("%c", data [char_nbr]); + //snprintf(cmd + strlen(cmd), (sizeof cmd) - strlen(cmd), "%c", data [char_nbr]); + + } + else { + printf ("%02X", (unsigned char) data [char_nbr]); + //printf ("%d", (unsigned char) data [char_nbr]); + + //snprintf(cmd + strlen(cmd), (sizeof cmd) - strlen(cmd), "%d", (unsigned char)data [char_nbr]); + + //if (data[0] == '\x7') { + // cout << " little endian " << endl; + //} + //else { + // cout << "big endian " << endl; + //} + + + } + }//for + printf ("\n"); + /* + for (char_nbr = 0; char_nbr < size; char_nbr++) { + if (is_text) { + printf ("%c", data [char_nbr]); + snprintf(cmd + strlen(cmd), (sizeof cmd) - strlen(cmd), "%c", data [char_nbr]); + } + else { + printf ("%02X", (unsigned char) data [char_nbr]); + snprintf(cmd + strlen(cmd), (sizeof cmd) - strlen(cmd), "%02X", (unsigned char)data [size-1-char_nbr]); + } + } + */ + + + + + + if (is_text) { + parsingSuccessful=reader.parse(data, parsedFromString); + if (parsingSuccessful) { + Json::StyledWriter styledWriter; + cout << "STYLED: --------------------------------" << endl; + cout << styledWriter.write(parsedFromString) << endl; + cout << "----------------------------------" << endl; + cout << parsedFromString["htype"] << endl; + + + if (fastWriter.write(parsedFromString["htype"]).find("bsr_m-1.1") != std::string::npos) { + + cout << "hash " << parsedFromString["hash"] << endl; + cout << "p id " << parsedFromString["pulse_id"].asUInt64() << endl; + cout << "g ts " << parsedFromString["global_timestamp"] << endl; + cout << "comp " << parsedFromString["dh_compression"] << endl; + + cout << "sec " << parsedFromString["global_timestamp"]["sec"].asUInt() << endl; + cout << "nsec " << parsedFromString["global_timestamp"]["ns"].asUInt() << endl; + + + } + else if (fastWriter.write(parsedFromString["htype"]).find("bsr_d-1.1") != std::string::npos) { + + + + + cout << "chan " << parsedFromString["channels"] << endl; + + + + for (Json::Value::ArrayIndex i=0; i < parsedFromString["channels"].size(); ++ i) { + + cout << "name " << parsedFromString["channels"][i]["name"] << endl; + cout << "enco " << parsedFromString["channels"][i]["encoding"] << endl; + cout << "type " << parsedFromString["channels"][i]["type"] << endl; + } + + } + + + cout << "----------------------------------" << endl; + + } + } + + + + + union foo + { + char c[sizeof(double)]; + double d; + + } bar; + + + + if (subMessage > 0 && subMessage%2 ==0) { + if (size==8) { + + // big endian + for (char_nbr = 0; char_nbr < size; char_nbr++) { + bar.c[char_nbr]=data[size-1-char_nbr]; // THis works for big engian + } + // little endian + //for (char_nbr = 0; char_nbr < size; char_nbr++) { + // bar.c[char_nbr]=data[char_nbr]; + //} + + + cout << "UNION D " << bar.d << endl; + + + double v; // = (double*) data; + memcpy(&v, bar.c, sizeof(double)); + cout << "double val " << v << endl; + + + + } + else if (size==2) { + unsigned short i; + //memcpy(&i, cmd, size); + //big endian + for (size_t n=0; n < size; n++) { + i = (i << 8) + data[n]; + } + //little endian + //for (size_t n = size; n >= 0; n--) { + // i = (i << 8) + data[n]; + //} + + + cout << "uint val " << i << endl; + + /* + std::copy(data, data + 32, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 8, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 4, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 2, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + std::copy(data, data + 1, reinterpret_cast(&i)); + cout << "uint16 val " << i << endl; + + */ + + } + } + else if (subMessage > 1 && subMessage%2 ==1) { + cout << "timestamp " << endl; + unsigned int a,b; + for (size_t n=0; n < size/2; n++) { + a = (a << 8) + data[n]; + } + for (size_t n=size/2; n < size; n++) { + b = (b << 8) + data[n]; + } + + cout << "a " << a << " b " << b << endl; + } + + ++subMessage; + + } //ifelse + + int64_t more; // Multipart detection + more = 0; + size_t more_size = sizeof (more); + zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); + zmq_msg_close (&message); + if (!more) { + puts ("//END----------------------------------------//"); + break; // Last message part + } + } //while 1 + + +} + +// Set simple random printable identity on socket +// +static void +s_set_id (void *socket) +{ + char identity [10]; + sprintf (identity, "%04X-%04X", randof (0x10000), randof (0x10000)); + zmq_setsockopt (socket, ZMQ_IDENTITY, identity, strlen (identity)); +} + +/* +// Sleep for a number of milliseconds +static void +s_sleep (int msecs) +{ +#if (defined (WIN32)) + Sleep (msecs); +#else + struct timespec t; + t.tv_sec = msecs / 1000; + t.tv_nsec = (msecs % 1000) * 1000000; + nanosleep (&t, NULL); +#endif +} +*/ + +// Return current system clock as milliseconds +static int64_t +s_clock (void) +{ +#if (defined (WIN32)) + SYSTEMTIME st; + GetSystemTime (&st); + return (int64_t) st.wSecond * 1000 + st.wMilliseconds; +#else + struct timeval tv; + gettimeofday (&tv, NULL); + return (int64_t) (tv.tv_sec * 1000 + tv.tv_usec / 1000); +#endif +} + +// Print formatted string to stdout, prefixed by date/time and +// terminated with a newline. + +/* +static void +s_console (const char *format, ...) +{ + time_t curtime = time (NULL); + struct tm *loctime = localtime (&curtime); + char *formatted = (char*)malloc (20); + strftime (formatted, 20, "%y-%m-%d %H:%M:%S ", loctime); + printf ("%s", formatted); + free (formatted); + + va_list argptr; + va_start (argptr, format); + vprintf (format, argptr); + va_end (argptr); + printf ("\n"); +} +*/ +#endif // __ZHELPERS_H_INCLUDED__ + +#endif diff --git a/libtool b/libtool new file mode 100755 index 0000000..3a3c730 --- /dev/null +++ b/libtool @@ -0,0 +1,9056 @@ +#! /bin/sh + +# libtool - Provide generalized library-building support services. +# Generated automatically by config.status (cafe) 1.0.0 +# Libtool was configured on host gfa-lc6-64: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=2.2.6b +macro_revision=1.3017 + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# What type of objects to build. +pic_mode=default + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias= +host=x86_64-unknown-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias= +build=x86_64-unknown-linux-gnu +build_os=linux-gnu + +# A sed program that does not truncate output. +SED="/bin/sed" + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP="/bin/grep" + +# An ERE matcher. +EGREP="/bin/grep -E" + +# A literal string matcher. +FGREP="/bin/grep -F" + +# A BSD- or MS-compatible name lister. +NM="/usr/bin/nm -B" + +# Whether we need soft or hard links. +LN_S="ln -s" + +# What is the maximum length of a command? +max_cmd_len=1966080 + +# Object file suffix (normally "o"). +objext=o + +# Executable file suffix (normally ""). +exeext= + +# whether the shell understands "unset". +lt_unset=unset + +# turn spaces into newlines. +SP2NL="tr \\040 \\012" + +# turn newlines into spaces. +NL2SP="tr \\015\\012 \\040\\040" + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# An object symbol dumper. +OBJDUMP="objdump" + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd="\$MAGIC_CMD" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A symbol stripping program. +STRIP="strip" + +# Commands used to install an old-style archive. +RANLIB="ranlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# A C compiler. +LTCC="gcc" + +# LTCC compiler flags. +LTCFLAGS="-g -O2" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p'" + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/ {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"lib\\2\", (void *) \\&\\2},/p'" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# Shell to use when invoking shell scripts. +SHELL="/bin/sh" + +# An echo program that does not interpret backslashes. +ECHO="echo" + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=file + +# Must we lock files when doing compilation? +need_locks="no" + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL="" + +# Tool to change global to local symbols on Mac OS X. +NMEDIT="" + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO="" + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL="" + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64="" + +# Old archive suffix (normally "a"). +libext=a + +# Shared library suffix (normally ".so"). +shrext_cmds=".so" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Do we need the "lib" prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Library versioning type. +version_type=linux + +# Shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# Shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Command to use after installation of a shared archive. +postinstall_cmds="" + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval="" + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Compile-time system search path for libraries. +sys_lib_search_path_spec="/usr/lib/gcc/x86_64-redhat-linux/4.4.7 /usr/lib64 /lib64" + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/atlas /usr/lib64/ctapi /usr/lib64/llvm /usr/lib64/mysql /usr/lib64/papi-4.1.3 /usr/lib64/papi-5.1.1/usr/lib /usr/lib/qt-3.3/lib /usr/lib64/qt-3.3/lib /usr/lib64/tcl8.5/tclx8.4 /usr/lib64/tcl8.5 /usr/lib64/xulrunner " + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + + +# The linker used to build libraries. +LD="/usr/bin/ld -m elf_x86_64" + +# Commands used to build an old-style archive. +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" + +# A language specific compiler. +CC="gcc" + +# Is the compiler the GNU compiler? +with_gcc=yes + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" + +# Compiler flag to prevent dynamic linking. +link_static_flag="" + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=no + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object="no" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build a shared archive. +archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ + cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ + echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ + \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds="" +module_expsym_cmds="" + +# Whether we are building with GNU ld or not. +with_gnu_ld="yes" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that enforces no undefined symbols. +no_undefined_flag="" + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist +hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into a binary +# during linking. This must work even if $libdir does not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator="" + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=no + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting ${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=no + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=no + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=no + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=no + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to "yes" if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" + +# Symbols that must always be exported. +include_expsyms="" + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds="" + +# Specify filename containing input files. +file_list_spec="" + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs="" + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects="" +postdep_objects="" +predeps="" +postdeps="" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="" + +# ### END LIBTOOL CONFIG + +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6b +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6b +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=2.2.6b +TIMESTAMP="" +package_revision=1.3017 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# NLS nuisances: We save the old values to restore during execute mode. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done + +$lt_unset CDPATH + + + + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/bin/sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "X$my_tmpdir" | $Xsed +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit +} + +exit_cmd=: + + + + + +# Check that we have a working $ECHO. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --config) func_config ;; + + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; + + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; + + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac + + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$mode' for more information." +} + + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command="$command -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { +test "$mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac + + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." + + exit $? +} + + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + $ECHO >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac + + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + + +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 + fi + + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} + + +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path + +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif + +const char *program_name = NULL; + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF + + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} + +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; +} + +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + + +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO + if test "X$deplibs_check_method" = "Xnone"; then + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + else + $ECHO "*** Warning: inter-library dependencies are not known to be supported." + fi + $ECHO "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; + *) files="$files $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD="/usr/bin/ld -m elf_x86_64" + +# Commands used to build an old-style archive. +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" + +# A language specific compiler. +CC="g++" + +# Is the compiler the GNU compiler? +with_gcc=yes + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" + +# Compiler flag to prevent dynamic linking. +link_static_flag="" + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=no + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object="no" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build a shared archive. +archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds="" +module_expsym_cmds="" + +# Whether we are building with GNU ld or not. +with_gnu_ld="yes" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that enforces no undefined symbols. +no_undefined_flag="" + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist +hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into a binary +# during linking. This must work even if $libdir does not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator="" + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=no + +# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting ${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=no + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=no + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=no + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=no + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=unknown + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to "yes" if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" + +# Symbols that must always be exported. +include_expsyms="" + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds="" + +# Specify filename containing input files. +file_list_spec="" + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs="/usr/lib/gcc/x86_64-redhat-linux/4.4.7 /usr/lib/gcc/x86_64-redhat-linux/4.4.7 /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../.." + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtbeginS.o" +postdep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crtn.o" +predeps="" +postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="-L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../.." + +# ### END LIBTOOL TAG CONFIG: CXX diff --git a/makeManual.make b/makeManual.make new file mode 100644 index 0000000..4ace9c4 --- /dev/null +++ b/makeManual.make @@ -0,0 +1,30 @@ +INCLUDES = -I./include -I./ -I/opt/gfa/cafe/boost/boost -I/usr/local/epics/base/include -I/usr/local/epics/base/include/os/Linux -I/usr/include +CC=g++ +COMPILE.cpp =$(CC) -c +CPPFLAGS = -fPIC +OUTPUT_OPTION = -o $@ +LIB_LOCAL = -L/usr/local/epics/base/lib/SL6-x86_64 -L/afs/psi.ch/project/zeromq/devl/mate/deps/boost/lib \ + -Wl,-rpath,/afs/psi.ch/project/zeromq/devl/mate/deps/boost/lib \ + -L/usr/lib64 +LIBS = -lca -lCom -lQtCore -lQtXml -lboost_thread-mt -lboost_system +#LIB_LOCAL = -L/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 +#LIBS = -lca -lCom -lQtCore -lQtXml + + +libcafe.so: src/cafeCache.o src/cafeGroup.o src/cafe.o src/cafeVectors.o \ + src/cafeXML.o src/callbackHandlerCreate.o src/callbackHandlerMonitor.o src/conduitGroup.o src/conduit.o \ + src/connectCallbacks.o src/connectGroup.o \ + src/connect.o src/exceptionsHelper.o src/granules.o src/handleHelper.o src/helper.o \ + src/loadCollectionXMLParser.o src/loadGroupXMLParser.o src/methodCallbacks.o src/policyHelper.o \ + src/restorePVGroupXMLParser.o src/transpose.o + $(CC) $(CPPFLAGS) -shared src/cafeCache.o src/cafeGroup.o src/cafe.o src/cafeVectors.o \ + src/cafeXML.o src/callbackHandlerCreate.o src/callbackHandlerMonitor.o src/conduitGroup.o src/conduit.o \ + src/connectCallbacks.o src/connectGroup.o \ + src/connect.o src/exceptionsHelper.o src/granules.o src/handleHelper.o src/helper.o \ + src/loadCollectionXMLParser.o src/loadGroupXMLParser.o src/methodCallbacks.o src/policyHelper.o \ + src/restorePVGroupXMLParser.o src/transpose.o $(LIB_LOCAL) $(LIBS) -o libcafe.so +%.o: %.cpp + $(COMPILE.cpp) $(CPPFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $< + + + diff --git a/makeManualWin.make b/makeManualWin.make new file mode 100644 index 0000000..dee656a --- /dev/null +++ b/makeManualWin.make @@ -0,0 +1,35 @@ +INCLUDES = -IC:\CAFE\CAFE\cpp\include -IC:\CAFE\CAFE\cpp -IC:\local\boost_1_62_0\boost \ +-IC:\local\boost_1_62_0 -IC:\epics\base-3.14.12.5\include -IC:\epics\base-3.14.12.5\include\os\WIN32 \ +-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \ +-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml \ +-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include +CXX=cl +CXXFLAGS = /W4 /EHsc /c /MT +OUTPUT_OPTION = /o "$@" +LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \ +C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \ +C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib \ +#C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_62.lib \ +#C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_62.lib \ + +LIBS = -lca -lCom -lQtCore4 -lQtXml4 + +OBJS= src\cafeCache.obj src\cafeGroup.obj src\cafe.obj src\cafeVectors.obj \ + src\callbackHandlerCreate.obj src\callbackHandlerMonitor.obj src\conduitGroup.obj src\conduit.obj \ + src\connectCallbacks.obj src\connectGroup.obj \ + src\connect.obj src\exceptionsHelper.obj src\granules.obj src\handleHelper.obj src\helper.obj \ + src\methodCallbacks.obj src\policyHelper.obj src\transpose.obj \ + src\cafeXML.obj src\loadCollectionXMLParser.obj src\loadGroupXMLParser.obj \ + src\restorePVGroupXMLParser.obj $(LIB_LOCAL) + +cafe.lib: $(OBJS) + LIB $(OBJS) /out:cafe.lib + +%.obj: %.cpp + $(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $< + + +clean: + del src\*.obj + + diff --git a/makefile b/makefile new file mode 100644 index 0000000..f2cdb6e --- /dev/null +++ b/makefile @@ -0,0 +1,773 @@ +# makefile.in generated by automake 1.11.1 from makefile.am. +# makefile. Generated from makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/cafe +pkgincludedir = $(includedir)/cafe +pkglibdir = $(libdir)/cafe +pkglibexecdir = $(libexecdir)/cafe +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = . +DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ + $(srcdir)/makefile.am $(srcdir)/makefile.in \ + $(top_srcdir)/./include/config.in $(top_srcdir)/configure \ + .//AUTHORS .//COPYING .//ChangeLog .//INSTALL .//NEWS \ + .//README .//config.guess .//config.sub .//depcomp \ + .//install-sh .//ltmain.sh .//missing AUTHORS COPYING \ + ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/./include/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(includedir)" +HEADERS = $(include_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run aclocal-1.11 +AMTAR = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run tar +AM_CPPFLAGS = -fexceptions -fPIC -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml -I$(top_srcdir)/include +AM_LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64 @CAFE_LIBS@ +AR = ar +AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoconf +AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoheader +AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run automake-1.11 +AWK = gawk +CAFE_CPPFLAGS = -I$(top_srcdir)/include +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = -fexceptions -fPIC -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64 +LIBOBJS = +LIBS = -lQtXml -lQtCore +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = cafe +PACKAGE_BUGREPORT = Bug reports to: jan.chrin@psi.ch +PACKAGE_NAME = CAFE +PACKAGE_STRING = CAFE 1.0.0 +PACKAGE_TARNAME = cafe +PACKAGE_VERSION = 1.0.0 +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.0.0 +abs_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +abs_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +abs_top_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +abs_top_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh +libdir = /opt/gfa/cafe/cpp/cafe-1.3.0-final-1/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /opt/gfa/cafe/cpp/cafe-1.3.0-final-1 +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = +top_builddir = . +top_srcdir = . +include_HEADERS = include/config.h +SUBDIRS = src include +ACLOCAL_AMFLAGS = -I m4 +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/makefile.in: $(srcdir)/makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu makefile +.PRECIOUS: makefile +makefile: $(srcdir)/makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +./include/config.h: ./include/stamp-h1 + @if test ! -f $@; then \ + rm -f ./include/stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) ./include/stamp-h1; \ + else :; fi + +./include/stamp-h1: $(top_srcdir)/./include/config.in $(top_builddir)/config.status + @rm -f ./include/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status ./include/config.h +$(top_srcdir)/./include/config.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f ./include/stamp-h1 + touch $@ + +distclean-hdr: + -rm -f ./include/config.h ./include/stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includedir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod u+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: makefile $(HEADERS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-includeHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-includeHEADERS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-includeHEADERS install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-includeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/makefile.am b/makefile.am new file mode 100644 index 0000000..c18152c --- /dev/null +++ b/makefile.am @@ -0,0 +1,15 @@ +## Makefile.am -- processed by automake to produce Makefile.in +## + +##libexecdir = $(exec_prefix)/libexec + +include_HEADERS = include/config.h + +SUBDIRS = src include + +ACLOCAL_AMFLAGS = -I m4 + +AM_CPPFLAGS = @AM_CPPFLAGS@ @CAFE_CPPFLAGS@ +AM_LDFLAGS= @AM_LDFLAGS@ @CAFE_LIBS@ + + diff --git a/src/PyCafe.cpp b/src/PyCafe.cpp new file mode 120000 index 0000000..da43e40 --- /dev/null +++ b/src/PyCafe.cpp @@ -0,0 +1 @@ +PyCafe3.cpp \ No newline at end of file diff --git a/src/PyCafe3.cpp b/src/PyCafe3.cpp new file mode 100644 index 0000000..76a032f --- /dev/null +++ b/src/PyCafe3.cpp @@ -0,0 +1,119252 @@ +/* Generated by Cython 0.23.4 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/opt/gfa/cafe/boost/boost_1_57_0/boost/multi_index_container.hpp", + "/opt/gfa/cafe/boost/boost_1_57_0/boost/smart_ptr/shared_ptr.hpp", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/PVCtrlHolder.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/PVDataHolder.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/PVGroup.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/cafe.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/cafeDataType.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/cafeEnum.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/caopCodes.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/channelRegalia.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/defines.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/exceptions.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/handleHelper.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/policies.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/policyHelper.h", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include/statusCodes.h", + "/opt/gfa/python-3.5/latest/include/python3.5m/Python.h", + "/opt/gfa/python-3.5/latest/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h", + "/opt/gfa/python-3.5/latest/lib/python3.5/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.5/latest/include/python3.5m", + "/usr/local/epics/base/include", + "/usr/local/epics/base/include/os/Linux", + "/opt/gfa/cafe/boost/boost_1_57_0", + "/opt/gfa/cafe/boost/boost_1_57_0/boost", + "/opt/gfa/cafe/python/python-3.5/pycafe-1.0.0-beta-1/include", + ".", + "/opt/gfa/python-3.5/latest/lib/python3.5/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.5/pycafe-1.0.0-beta-1/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/pycafe-1.0.0-beta-1/lib", + "/opt/gfa/python-3.5/latest/lib" + ] + } +} +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 < 0x03020000) + #error Cython requires Python 2.6+ or Python 3.2+. +#else +#define CYTHON_ABI "0_23_4" +#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 +#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_CPYTHON 0 +#else +#define CYTHON_COMPILING_IN_PYPY 0 +#define CYTHON_COMPILING_IN_CPYTHON 1 +#endif +#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 +#define CYTHON_USE_PYLONG_INTERNALS 1 +#endif +#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 +#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_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) +#else + #define CYTHON_PEP393_ENABLED 0 + #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_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])) +#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 +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? 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 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#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 +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#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) : PyInstanceMethod_New(func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if PY_VERSION_HEX >= 0x030500B1 +#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) +#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; +} __Pyx_PyAsyncMethodsStruct; +#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) +#else +#define __Pyx_PyType_AsAsync(obj) NULL +#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 +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) + +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #define CYTHON_INLINE inline +#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; } + operator T&() { return *ptr; } + private: + T *ptr; +}; + +#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 PY_MAJOR_VERSION >= 3 + #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_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#endif + +#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 +#include "string.h" +#include +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include "stdio.h" +#include "stdlib.h" +#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 "caeventmask.h" +#include "time.h" +#include "epicsTime.h" +#include "db_access.h" +#include "caerr.h" +#include "caopCodes.h" +#include "defines.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 "PVDataHolder.h" +#include "PVCtrlHolder.h" +#include "PVGroup.h" +#include "cafe.h" +#include "pythread.h" +#include "pystate.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#ifdef PYREX_WITHOUT_ASSERTIONS +#define CYTHON_WITHOUT_ASSERTIONS +#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_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +typedef struct {PyObject **p; 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))) ) +#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) && defined (_M_X64) + #define __Pyx_sst_abs(value) _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 char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE 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_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((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) +#if PY_MAJOR_VERSION < 3 +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); +} +#else +#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen +#endif +#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) +#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_COMPILING_IN_CPYTHON +#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 && __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)); + 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 PyObject *__pyx_m; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +#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.pxi", + "PyCafe.pyx", + "__init__.pxd", + "stringsource", + "type.pxd", +}; +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 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; + +#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 + + +/* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":725 + * # 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":726 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":727 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":728 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":732 + * #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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":733 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":734 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":735 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":739 + * #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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":740 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":749 + * # 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":750 + * # 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":751 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":753 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":754 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":755 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":757 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":758 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":760 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":761 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":762 + * 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; +#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 + +#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 + + +/*--- Type declarations ---*/ +struct __pyx_obj_6PyCafe__finalizer; +struct __pyx_obj_6PyCafe_CyCa; +struct __pyx_obj_6PyCafe_channelInfo; +struct __pyx_obj_6PyCafe__epicsTimeStampAsDate; +struct __pyx_obj_6PyCafe_pvctrl; +struct __pyx_obj_6PyCafe_CyCafeException; +struct __pyx_obj_6PyCafe_monitorpolicy; +struct __pyx_obj_6PyCafe_pvdata; +struct __pyx_obj_6PyCafe_pvgroup; +struct __pyx_obj_6PyCafe_CyCafe; +struct __pyx_array_obj; +struct __pyx_MemviewEnum_obj; +struct __pyx_memoryview_obj; +struct __pyx_memoryviewslice_obj; + +/* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":764 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":765 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":766 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":768 + * 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_checkForHandle; +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForHandleList; +struct __pyx_opt_args_6PyCafe_6CyCafe_checkForGroupHandle; + +/* "PyCafeDefs.pxi":118 + * cdef int PYCAFE_PRINT_LEVEL=PYCAFE_PRINT_MED + * + * ctypedef shared_ptr[vector [double]] vdouble_ptr # <<<<<<<<<<<<<< + * ctypedef shared_ptr[vector [float]] vfloat_ptr + * + */ +typedef boost::shared_ptr > __pyx_t_6PyCafe_vdouble_ptr; + +/* "PyCafeDefs.pxi":119 + * + * ctypedef shared_ptr[vector [double]] vdouble_ptr + * ctypedef shared_ptr[vector [float]] vfloat_ptr # <<<<<<<<<<<<<< + * + * cdef object py_cb = None + */ +typedef boost::shared_ptr > __pyx_t_6PyCafe_vfloat_ptr; + +/* "PyCafeDefs.pxi":1106 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * #global p1 + */ +struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct { + int __pyx_n; + PyObject *dt; +}; + +/* "PyCafeDefs.pxi":1185 + * ################################################################################# + * + * cdef pvctrl PVCtrlHolderToStruct(PVCtrlHolder pvc, dt=None): # <<<<<<<<<<<<<< + * + * #global c1 + */ +struct __pyx_opt_args_6PyCafe_PVCtrlHolderToStruct { + int __pyx_n; + PyObject *dt; +}; + +/* "PyCafe.pyx":699 + * ################################################################################## + * ### 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":713 + * + * ################################################################################## + * 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":736 + * + * ################################################################################## + * 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":198 + * ''' + * #Correct memory management a la KWSmith p.190 + * cdef class _finalizer: # <<<<<<<<<<<<<< + * cdef void *_data + * def __dealloc__(self): + */ +struct __pyx_obj_6PyCafe__finalizer { + PyObject_HEAD + void *_data; +}; + + +/* "PyCafeDefs.pxi":211 + * return + * + * 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_TIMEOUT; + 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_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 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; + 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; +}; + + +/* "PyCafeDefs.pxi":584 + * + * + * 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; + 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":633 + * + * ################################################################################## + * cdef class _epicsTimeStampAsDate: # <<<<<<<<<<<<<< + * cdef epicsTime *_time + * cdef local_tm_nano_sec local + */ +struct __pyx_obj_6PyCafe__epicsTimeStampAsDate { + PyObject_HEAD + epicsTime *_time; + struct local_tm_nano_sec local; + PyObject *etsDate; +}; + + +/* "PyCafeDefs.pxi":661 + * + * ################################################################################## + * 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; + std::string 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; + PyObject *pythonVersion; +}; + + +/* "PyCafeDefs.pxi":774 + * ################################################################################## + * + * cdef class CyCafeException: # <<<<<<<<<<<<<< + * cdef readonly str type + * cdef readonly str source + */ +struct __pyx_obj_6PyCafe_CyCafeException { + PyObject_HEAD + PyObject *type; + PyObject *source; + int handle; + PyObject *pv; + int errorCode; + PyObject *errorText; + PyObject *errorInfo; +}; + + +/* "PyCafeDefs.pxi":824 + * + * + * 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":872 + * + * ################################################################################## + * 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 *ts; + PyObject *tsDate; + PyObject *value; + int status; + PyObject *pythonVersion; +}; + + +/* "PyCafeDefs.pxi":961 + * + * ################################################################################## + * 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; + PyObject *pythonVersion; +}; + + +/* "PyCafe.pyx":34 + * + * ################################################################################## + * cdef class CyCafe: # <<<<<<<<<<<<<< + * + * cdef: + */ +struct __pyx_obj_6PyCafe_CyCafe { + PyObject_HEAD + struct __pyx_vtabstruct_6PyCafe_CyCafe *__pyx_vtab; + CAFE *_c_cafe; + double valFloat; + std::string valStr; + int valInt; + std::vector vStr; + std::vector vFloat; + std::vector vInt; + HandleHelper hh; + PolicyHelper ph; + CAFEException_pv expv; + CAFEException_open exopen; + CAFEStatus cs; + CAFEStatusSeverity css; + PyObject *pythonVersion; + int haveExceptions; + ChannelRegalia channelInfo; + PyObject *exString; +}; + + +/* "View.MemoryView":101 + * + * @cname("__pyx_array") + * cdef class array: # <<<<<<<<<<<<<< + * + * cdef: + */ +struct __pyx_array_obj { + PyObject_HEAD + 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":271 + * + * @cname('__pyx_MemviewEnum') + * cdef class Enum(object): # <<<<<<<<<<<<<< + * cdef object name + * def __init__(self, name): + */ +struct __pyx_MemviewEnum_obj { + PyObject_HEAD + PyObject *name; +}; + + +/* "View.MemoryView":304 + * + * @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":923 + * + * @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 *); +}; + + + +/* "PyCafeDefs.pxi":661 + * + * ################################################################################## + * 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":872 + * + * ################################################################################## + * 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":961 + * + * ################################################################################## + * 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":34 + * + * ################################################################################## + * cdef class CyCafe: # <<<<<<<<<<<<<< + * + * cdef: + */ + +struct __pyx_vtabstruct_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":304 + * + * @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":923 + * + * @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) --- */ +#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) + +#if CYTHON_COMPILING_IN_CPYTHON +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); +} +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +#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 + +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); + +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +#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()) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) + PyErr_SetObject(PyExc_KeyError, args); + Py_XDECREF(args); + } + return NULL; + } + Py_INCREF(value); + return value; +} +#else + #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#endif + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); + +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); + +static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); + +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +#if CYTHON_COMPILING_IN_CPYTHON +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 + +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); +#else +#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ + PyObject_RichCompare(op1, op2, Py_EQ) + #endif + +#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 CYTHON_INLINE 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); + +#include + +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); + +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); + +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)); +} + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +#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 + +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); + +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact); + +#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 CYTHON_INLINE 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); + +static void __Pyx_RaiseBufferIndexError(int axis); + +static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); + +#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); + +#if CYTHON_COMPILING_IN_CPYTHON +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 + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +static CYTHON_INLINE int __Pyx_IterFinish(void); + +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) + +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)); +} + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); + +#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 *get_memview(PyObject *__pyx_v_self); /*proto*/ +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + +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)); + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ +static PyObject *__pyx_memoryview_transpose(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview__get__base(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_shape(PyObject *__pyx_v_self); /*proto*/ +#if CYTHON_COMPILING_IN_CPYTHON +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 + +static PyObject *__pyx_memoryview_get_strides(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_suboffsets(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_ndim(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_itemsize(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_nbytes(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_size(PyObject *__pyx_v_self); /*proto*/ +#if CYTHON_COMPILING_IN_CPYTHON +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 + +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 +} + +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); + +static CYTHON_INLINE long __Pyx_div_long(long, long); + +static PyObject *__pyx_memoryviewslice__get__base(PyObject *__pyx_v_self); /*proto*/ +static int __Pyx_SetVtable(PyObject *dict, void *vtable); + +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); + +static PyObject* __Pyx_patch_inspect(PyObject* module); + +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_setattr)) + return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); +#endif + return PyObject_SetAttr(obj, attr_name, value); +} +#else +#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +typedef struct { + int code_line; + PyCodeObject* code_object; +} __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); + +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +#include + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DBR_TYPE(DBR_TYPE value); + +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; + +#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 + + +static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0}; +static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1}; + +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); + +static CYTHON_INLINE ChannelWhenToFlushSendBufferPolicyKind __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(PyObject *); + +static CYTHON_INLINE ChannelWaitForResponsePolicyKind __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(PyObject *); + +static CYTHON_INLINE ChannelRequestPolicyKind __Pyx_PyInt_As_ChannelRequestPolicyKind(PyObject *); + +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +static CYTHON_INLINE DBR_TYPE __Pyx_PyInt_As_DBR_TYPE(PyObject *); + +static CYTHON_INLINE ChannelGetCacheWaitPolicyKind __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(PyObject *); + +static CYTHON_INLINE ChannelGetActionWhenMonitorPolicyKind __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(PyObject *); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_chtype(chtype value); + +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value); + +#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::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 + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(ChannelGetCacheWaitPolicyKind value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(ChannelGetActionWhenMonitorPolicyKind value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_CFT_STATE(CAFE_CFT_STATE value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int16(npy_int16 value); + +static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *); + +static PyObject *__pyx_memview_get_nn___pyx_t_5numpy_int16_t(const char *itemp); +static int __pyx_memview_set_nn___pyx_t_5numpy_int16_t(const char *itemp, PyObject *obj); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value); + +static PyObject *__pyx_memview_get_int(const char *itemp); +static int __pyx_memview_set_int(const char *itemp, PyObject *obj); + +static PyObject *__pyx_memview_get_float(const char *itemp); +static int __pyx_memview_set_float(const char *itemp, PyObject *obj); + +static PyObject *__pyx_memview_get_double(const char *itemp); +static int __pyx_memview_set_double(const char *itemp, PyObject *obj); + +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_long_t(dbr_long_t value); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value); + +static CYTHON_INLINE dbr_long_t __Pyx_PyInt_As_dbr_long_t(PyObject *); + +static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *); + +static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *); + +static CYTHON_INLINE dbr_char_t __Pyx_PyInt_As_dbr_char_t(PyObject *); + +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *); + +static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *); + +#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(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX + #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 + +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eqf(a, b) ((a)==(b)) + #define __Pyx_c_sumf(a, b) ((a)+(b)) + #define __Pyx_c_difff(a, b) ((a)-(b)) + #define __Pyx_c_prodf(a, b) ((a)*(b)) + #define __Pyx_c_quotf(a, b) ((a)/(b)) + #define __Pyx_c_negf(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zerof(z) ((z)==(float)0) + #define __Pyx_c_conjf(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_absf(z) (::std::abs(z)) + #define __Pyx_c_powf(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zerof(z) ((z)==0) + #define __Pyx_c_conjf(z) (conjf(z)) + #if 1 + #define __Pyx_c_absf(z) (cabsf(z)) + #define __Pyx_c_powf(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq(a, b) ((a)==(b)) + #define __Pyx_c_sum(a, b) ((a)+(b)) + #define __Pyx_c_diff(a, b) ((a)-(b)) + #define __Pyx_c_prod(a, b) ((a)*(b)) + #define __Pyx_c_quot(a, b) ((a)/(b)) + #define __Pyx_c_neg(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero(z) ((z)==(double)0) + #define __Pyx_c_conj(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs(z) (::std::abs(z)) + #define __Pyx_c_pow(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero(z) ((z)==0) + #define __Pyx_c_conj(z) (conj(z)) + #if 1 + #define __Pyx_c_abs(z) (cabs(z)) + #define __Pyx_c_pow(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); + +static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice *mvs, + char order, int ndim); + +static int __pyx_slices_overlap(__Pyx_memviewslice *slice1, + __Pyx_memviewslice *slice2, + int ndim, size_t itemsize); + +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); + +static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig); + +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); + +static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); + +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); + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(PyObject *); + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *); + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *); + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *); + +static int __Pyx_check_binary_version(void); + +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +#if !defined(__Pyx_PyIdentifier_FromString) +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) +#else + #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) +#endif +#endif + +static PyObject *__Pyx_ImportModule(const char *name); + +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); + +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_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 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 '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' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'libc.stdlib' */ + +/* 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*/ +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ + +/* Module declarations from 'PyCafe' */ +static PyTypeObject *__pyx_ptype_6PyCafe__finalizer = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_CyCa = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_channelInfo = 0; +static PyTypeObject *__pyx_ptype_6PyCafe__epicsTimeStampAsDate = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_pvctrl = 0; +static PyTypeObject *__pyx_ptype_6PyCafe_CyCafeException = 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_CyCafe = 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 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_LEVEL; +static PyObject *__pyx_v_6PyCafe_py_cb = 0; +static PyObject *__pyx_v_6PyCafe_py_cb_handle = 0; +static PyObject *__pyx_v_6PyCafe_py_cb_ctrl = 0; +static PyObject *__pyx_v_6PyCafe_monDictGlobal = 0; +static PyObject *generic = 0; +static PyObject *strided = 0; +static PyObject *indirect = 0; +static PyObject *contiguous = 0; +static PyObject *indirect_contiguous = 0; +static void __pyx_f_6PyCafe_py_cb_wrapper(PVDataHolder, unsigned int, std::string); /*proto*/ +static void __pyx_f_6PyCafe_py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string); /*proto*/ +static void __pyx_f_6PyCafe_py_cb_handle_wrapper(unsigned int); /*proto*/ +static void __pyx_f_6PyCafe_py_cb_handle_monid_wrapper(unsigned int, unsigned long); /*proto*/ +static void __pyx_f_6PyCafe_py_cb_handle_get_wrapper(unsigned int); /*proto*/ +static void __pyx_f_6PyCafe_py_cb_handle_put_wrapper(unsigned 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 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 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 struct epicsTimeStamp __pyx_convert__from_py_epicsTimeStamp(PyObject *); /*proto*/ +static std::string __pyx_convert_string_from_py_std__in_string(PyObject *); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_unsigned_int(const std::vector &); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_std_3a__3a_string(const std::vector &); /*proto*/ +static std::vector __pyx_convert_vector_from_py_std_3a__3a_string(PyObject *); /*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 __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_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" +int __pyx_module_is_main_PyCafe = 0; + +/* Implementation of 'PyCafe' */ +static PyObject *__pyx_builtin_print; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_MemoryError; +static PyObject *__pyx_builtin_RuntimeError; +static PyObject *__pyx_builtin_Exception; +static PyObject *__pyx_builtin_memoryview; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_enumerate; +static PyObject *__pyx_builtin_Ellipsis; +static PyObject *__pyx_builtin_TypeError; +static PyObject *__pyx_builtin_id; +static PyObject *__pyx_builtin_IndexError; +static PyObject *__pyx_builtin_KeyError; +static char __pyx_k_B[] = "B"; +static char __pyx_k_C[] = "C"; +static char __pyx_k_H[] = "H"; +static char __pyx_k_I[] = "I"; +static char __pyx_k_L[] = "L"; +static char __pyx_k_O[] = "O"; +static char __pyx_k_Q[] = "Q"; +static char __pyx_k_b[] = "b"; +static char __pyx_k_c[] = "c"; +static char __pyx_k_d[] = "[%d]"; +static char __pyx_k_f[] = "f"; +static char __pyx_k_g[] = "g"; +static char __pyx_k_h[] = "h"; +static char __pyx_k_i[] = "i"; +static char __pyx_k_l[] = "l"; +static char __pyx_k_q[] = "q"; +static char __pyx_k_s[] = "[%s]"; +static char __pyx_k_PV[] = "PV ="; +static char __pyx_k_VA[] = "VA"; +static char __pyx_k_Zd[] = "Zd"; +static char __pyx_k_Zf[] = "Zf"; +static char __pyx_k_Zg[] = "Zg"; +static char __pyx_k_cb[] = "cb"; +static char __pyx_k_dt[] = "dt"; +static char __pyx_k_ec[] = "_ec"; +static char __pyx_k_ei[] = "_ei"; +static char __pyx_k_et[] = "_et"; +static char __pyx_k_id[] = "id"; +static char __pyx_k_mv[] = "mv"; +static char __pyx_k_np[] = "np"; +static char __pyx_k_os[] = "os"; +static char __pyx_k_pv[] = "_pv"; +static char __pyx_k_ts[] = "ts"; +static char __pyx_k__85[] = ""; +static char __pyx_k__93[] = " "; +static char __pyx_k__98[] = "------------------------------------------------------------------------"; +static char __pyx_k_art[] = "art"; +static char __pyx_k_d_2[] = "d"; +static char __pyx_k_dbr[] = "dbr"; +static char __pyx_k_end[] = "end"; +static char __pyx_k_get[] = "get"; +static char __pyx_k_has[] = "has"; +static char __pyx_k_int[] = "int"; +static char __pyx_k_obj[] = "obj"; +static char __pyx_k_str[] = "str"; +static char __pyx_k_sys[] = "sys"; +static char __pyx_k_wpk[] = "wpk"; +static char __pyx_k_PV_2[] = "PV="; +static char __pyx_k_PV_3[] = "PV"; +static char __pyx_k__108[] = "!!"; +static char __pyx_k__109[] = "---------------------------------"; +static char __pyx_k__113[] = "--------------------------------------------"; +static char __pyx_k__120[] = "{} {} {}"; +static char __pyx_k__122[] = "{} {} {} {} {}"; +static char __pyx_k__199[] = "======================================================"; +static char __pyx_k__206[] = "=============="; +static char __pyx_k__212[] = "["; +static char __pyx_k__213[] = "]"; +static char __pyx_k__236[] = " : "; +static char __pyx_k_args[] = "args"; +static char __pyx_k_base[] = "base"; +static char __pyx_k_bool[] = "bool_"; +static char __pyx_k_byte[] = "byte"; +static char __pyx_k_cafe[] = "cafe"; +static char __pyx_k_int8[] = "int8"; +static char __pyx_k_intc[] = "intc"; +static char __pyx_k_intp[] = "intp"; +static char __pyx_k_long[] = "long"; +static char __pyx_k_main[] = "__main__"; +static char __pyx_k_mask[] = "mask ="; +static char __pyx_k_mode[] = "mode"; +static char __pyx_k_mpid[] = "mpid"; +static char __pyx_k_name[] = "name="; +static char __pyx_k_ndim[] = "ndim"; +static char __pyx_k_nsec[] = "nsec"; +static char __pyx_k_open[] = "open"; +static char __pyx_k_pack[] = "pack"; +static char __pyx_k_pv_2[] = ".pv ="; +static char __pyx_k_pv_3[] = "pv"; +static char __pyx_k_show[] = "show"; +static char __pyx_k_size[] = "size"; +static char __pyx_k_step[] = "step"; +static char __pyx_k_stop[] = "stop"; +static char __pyx_k_test[] = "__test__"; +static char __pyx_k_time[] = "time"; +static char __pyx_k_ts_2[] = "ts ="; +static char __pyx_k_type[] = "_type"; +static char __pyx_k_uint[] = "uint"; +static char __pyx_k_utf8[] = "utf8"; +static char __pyx_k_wait[] = "wait"; +static char __pyx_k_what[] = "what"; +static char __pyx_k_when[] = "when"; +static char __pyx_k_wmpk[] = "wmpk"; +static char __pyx_k_ASCII[] = "ASCII"; +static char __pyx_k_Array[] = "Array"; +static char __pyx_k_UTF_8[] = "UTF-8"; +static char __pyx_k_array[] = "array"; +static char __pyx_k_bool8[] = "bool8"; +static char __pyx_k_bytes[] = "bytes"; +static char __pyx_k_c_int[] = "c_int"; +static char __pyx_k_class[] = "__class__"; +static char __pyx_k_close[] = "close"; +static char __pyx_k_ctype[] = "ctype"; +static char __pyx_k_dtype[] = "dtype"; +static char __pyx_k_empty[] = "empty"; +static char __pyx_k_error[] = "error"; +static char __pyx_k_flags[] = "flags"; +static char __pyx_k_float[] = "float"; +static char __pyx_k_force[] = "force"; +static char __pyx_k_gName[] = "gName"; +static char __pyx_k_getPV[] = "getPV"; +static char __pyx_k_gname[] = "gname"; +static char __pyx_k_int16[] = "int16"; +static char __pyx_k_int32[] = "int32"; +static char __pyx_k_int64[] = "int64"; +static char __pyx_k_int_2[] = "int_"; +static char __pyx_k_monid[] = "monid ="; +static char __pyx_k_nelem[] = "nelem ="; +static char __pyx_k_numpy[] = "numpy"; +static char __pyx_k_order[] = "order"; +static char __pyx_k_print[] = "print"; +static char __pyx_k_range[] = "range"; +static char __pyx_k_shape[] = "shape"; +static char __pyx_k_short[] = "short"; +static char __pyx_k_sleep[] = "sleep"; +static char __pyx_k_start[] = "start"; +static char __pyx_k_str_2[] = "str_"; +static char __pyx_k_ubyte[] = "ubyte"; +static char __pyx_k_uchar[] = "uchar"; +static char __pyx_k_uint8[] = "uint8"; +static char __pyx_k_uintc[] = "uintc"; +static char __pyx_k_uintp[] = "uintp"; +static char __pyx_k_ulong[] = "ulong"; +static char __pyx_k_utf_8[] = "utf-8"; +static char __pyx_k_value[] = "value ="; +static char __pyx_k_Cython[] = "Cython"; +static char __pyx_k_Handle[] = "Handle="; +static char __pyx_k_Member[] = "Member: "; +static char __pyx_k_PyCafe[] = "PyCafe"; +static char __pyx_k_append[] = "append"; +static char __pyx_k_c_bool[] = "c_bool"; +static char __pyx_k_c_byte[] = "c_byte"; +static char __pyx_k_c_char[] = "c_char"; +static char __pyx_k_c_int8[] = "c_int8"; +static char __pyx_k_c_long[] = "c_long"; +static char __pyx_k_c_uint[] = "c_uint"; +static char __pyx_k_ctypes[] = "ctypes"; +static char __pyx_k_cycafe[] = "cycafe"; +static char __pyx_k_decode[] = "decode"; +static char __pyx_k_double[] = "double"; +static char __pyx_k_dt_int[] = "dt=int"; +static char __pyx_k_encode[] = "encode"; +static char __pyx_k_format[] = "format"; +static char __pyx_k_handle[] = "_handle"; +static char __pyx_k_import[] = "__import__"; +static char __pyx_k_mask_2[] = "mask"; +static char __pyx_k_method[] = "method"; +static char __pyx_k_name_2[] = "__name__"; +static char __pyx_k_name_3[] = "name"; +static char __pyx_k_native[] = "native"; +static char __pyx_k_netrfc[] = "netrfc"; +static char __pyx_k_pvList[] = "pvList"; +static char __pyx_k_pvlist[] = "_pvlist"; +static char __pyx_k_single[] = "single"; +static char __pyx_k_source[] = "_source"; +static char __pyx_k_status[] = "status ="; +static char __pyx_k_string[] = "string"; +static char __pyx_k_struct[] = "struct"; +static char __pyx_k_timeit[] = "timeit"; +static char __pyx_k_tsDate[] = "tsDate ="; +static char __pyx_k_type_2[] = ".type ="; +static char __pyx_k_type_3[] = "type"; +static char __pyx_k_uint16[] = "uint16"; +static char __pyx_k_uint32[] = "uint32"; +static char __pyx_k_uint64[] = "uint64"; +static char __pyx_k_unpack[] = "unpack"; +static char __pyx_k_ushort[] = "ushort"; +static char __pyx_k_valSet[] = "valSet"; +static char __pyx_k_values[] = "values\t = "; +static char __pyx_k_Channel[] = "Channel"; +static char __pyx_k_Options[] = "Options"; +static char __pyx_k_c_float[] = "c_float"; +static char __pyx_k_c_int16[] = "c_int16"; +static char __pyx_k_c_int32[] = "c_int32"; +static char __pyx_k_c_int64[] = "c_int64"; +static char __pyx_k_c_short[] = "c_short"; +static char __pyx_k_c_ubyte[] = "c_ubyte"; +static char __pyx_k_c_uint8[] = "c_uint8"; +static char __pyx_k_c_ulong[] = "c_ulong"; +static char __pyx_k_c_voidp[] = "c_voidp"; +static char __pyx_k_c_wchar[] = "c_wchar"; +static char __pyx_k_dbrBase[] = "dbrBase"; +static char __pyx_k_float16[] = "float16"; +static char __pyx_k_float32[] = "float32"; +static char __pyx_k_float64[] = "float64"; +static char __pyx_k_float_2[] = "float_"; +static char __pyx_k_fortran[] = "fortran"; +static char __pyx_k_getAsyn[] = "getAsyn"; +static char __pyx_k_getList[] = "getList"; +static char __pyx_k_inspect[] = "inspect"; +static char __pyx_k_memview[] = "memview"; +static char __pyx_k_monid_2[] = "_monid"; +static char __pyx_k_ndarray[] = "ndarray"; +static char __pyx_k_nelem_2[] = "nelem"; +static char __pyx_k_nelem_d[] = "nelem = %d"; +static char __pyx_k_open_pv[] = "open(pv)"; +static char __pyx_k_timeout[] = "timeout"; +static char __pyx_k_unicode[] = "unicode"; +static char __pyx_k_units_s[] = "units = %s"; +static char __pyx_k_valList[] = "valList"; +static char __pyx_k_value_2[] = "value = "; +static char __pyx_k_value_3[] = "value"; +static char __pyx_k_Compiler[] = "Compiler"; +static char __pyx_k_Ellipsis[] = "Ellipsis"; +static char __pyx_k_KeyError[] = "KeyError"; +static char __pyx_k_annotate[] = "annotate"; +static char __pyx_k_c_char_p[] = "c_char_p"; +static char __pyx_k_c_double[] = "c_double"; +static char __pyx_k_c_size_t[] = "c_size_t"; +static char __pyx_k_c_uint16[] = "c_uint16"; +static char __pyx_k_c_uint32[] = "c_uint32"; +static char __pyx_k_c_uint64[] = "c_uint64"; +static char __pyx_k_c_ushort[] = "c_ushort"; +static char __pyx_k_c_void_p[] = "c_void_p"; +static char __pyx_k_datatype[] = "datatype ="; +static char __pyx_k_getArray[] = "getArray"; +static char __pyx_k_getCache[] = "getCache"; +static char __pyx_k_getGroup[] = "getGroup"; +static char __pyx_k_handlePV[] = "handlePV"; +static char __pyx_k_handle_2[] = "(handle="; +static char __pyx_k_handle_3[] = ".handle ="; +static char __pyx_k_itemsize[] = "itemsize"; +static char __pyx_k_longlong[] = "longlong"; +static char __pyx_k_source_2[] = ".source ="; +static char __pyx_k_status_2[] = "status"; +static char __pyx_k_status_d[] = "status = %d"; +static char __pyx_k_tsDate_2[] = "tsDate"; +static char __pyx_k_userArgs[] = "userArgs ="; +static char __pyx_k_values_2[] = "values\t = "; +static char __pyx_k_Exception[] = "Exception"; +static char __pyx_k_TypeError[] = "TypeError"; +static char __pyx_k_a_mapping[] = "a mapping"; +static char __pyx_k_c_ssize_t[] = "c_ssize_t"; +static char __pyx_k_c_wchar_p[] = "c_wchar_p"; +static char __pyx_k_cafe_init[] = "cafe.init()"; +static char __pyx_k_enumValue[] = "enumValue"; +static char __pyx_k_enumerate[] = "enumerate"; +static char __pyx_k_errorCode[] = "errorCode:"; +static char __pyx_k_errorInfo[] = "\nerrorInfo:"; +static char __pyx_k_errorText[] = "errorText:"; +static char __pyx_k_getPVList[] = "getPVList"; +static char __pyx_k_getStatus[] = "getStatus"; +static char __pyx_k_groupOpen[] = "groupOpen"; +static char __pyx_k_has_error[] = " has error: "; +static char __pyx_k_printFlag[] = "printFlag"; +static char __pyx_k_tolerance[] = "tolerance"; +static char __pyx_k_ulonglong[] = "ulonglong"; +static char __pyx_k_unicode_2[] = "unicode_"; +static char __pyx_k_GROUP_NAME[] = "GROUP NAME = "; +static char __pyx_k_IndexError[] = "IndexError"; +static char __pyx_k_ValueError[] = "ValueError"; +static char __pyx_k_c_longlong[] = "c_longlong"; +static char __pyx_k_enumString[] = "enumString"; +static char __pyx_k_exceptions[] = "exceptions"; +static char __pyx_k_getDbrBase[] = "getDbrBase"; +static char __pyx_k_getPVCache[] = "getPVCache"; +static char __pyx_k_getPVGroup[] = "getPVGroup"; +static char __pyx_k_getargspec[] = "getargspec"; +static char __pyx_k_handleList[] = "handleList"; +static char __pyx_k_hostName_s[] = "hostName = %s"; +static char __pyx_k_memoryview[] = "memoryview"; +static char __pyx_k_openNoWait[] = "openNoWait"; +static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static char __pyx_k_setDbrBase[] = "setDbrBase"; +static char __pyx_k_statusList[] = "statusList"; +static char __pyx_k_vectorList[] = "vectorList"; +static char __pyx_k_MemoryError[] = "MemoryError"; +static char __pyx_k_alarmStatus[] = "alarmStatus"; +static char __pyx_k_array_array[] = "array.array"; +static char __pyx_k_c_ulonglong[] = "c_ulonglong"; +static char __pyx_k_cafeDbrType[] = "cafeDbrType="; +static char __pyx_k_channelID_x[] = "channelID = %x"; +static char __pyx_k_className_s[] = "className = %s"; +static char __pyx_k_dbrDataType[] = "dbrDataType="; +static char __pyx_k_enumStrings[] = "enumStrings ="; +static char __pyx_k_errorCode_2[] = ".errorCode="; +static char __pyx_k_errorInfo_2[] = "errorInfo:"; +static char __pyx_k_errorInfo_3[] = ".errorInfo="; +static char __pyx_k_errorText_2[] = ".errorText="; +static char __pyx_k_ghandleName[] = "ghandleName"; +static char __pyx_k_handlePVSet[] = "handlePVSet"; +static char __pyx_k_isConnected[] = "isConnected"; +static char __pyx_k_precision_d[] = "precision = %d"; +static char __pyx_k_printHandle[] = "printHandle"; +static char __pyx_k_GROUP_HANDLE[] = "GROUP HANDLE = "; +static char __pyx_k_GROUP_STATUS[] = "GROUP STATUS = "; +static char __pyx_k_RuntimeError[] = "RuntimeError"; +static char __pyx_k_accessRead_d[] = "accessRead = %d"; +static char __pyx_k_c_longdouble[] = "c_longdouble"; +static char __pyx_k_cafe_openNow[] = "cafe.openNow()"; +static char __pyx_k_dataType_s_d[] = "dataType = %s (%d)"; +static char __pyx_k_getTimeStamp[] = "getTimeStamp"; +static char __pyx_k_secPastEpoch[] = "secPastEpoch"; +static char __pyx_k_version_info[] = "version_info"; +static char __pyx_k_CAFEException[] = "CAFEException"; +static char __pyx_k_accessWrite_d[] = "accessWrite = %d"; +static char __pyx_k_alarmSeverity[] = "alarmSeverity"; +static char __pyx_k_alarmStatus_d[] = "alarmStatus = %d"; +static char __pyx_k_attachContext[] = "attachContext"; +static char __pyx_k_connectFlag_d[] = "connectFlag = %d"; +static char __pyx_k_getArrayCache[] = "getArrayCache"; +static char __pyx_k_getScalarList[] = "getScalarList"; +static char __pyx_k_handlePVMatch[] = "handlePVMatch"; +static char __pyx_k_not_connected[] = " not connected"; +static char __pyx_k_numpy_ndarray[] = "numpy.ndarray"; +static char __pyx_k_printHandlesV[] = "printHandlesV"; +static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; +static char __pyx_k_checkForHandle[] = "checkForHandle"; +static char __pyx_k_getChannelInfo[] = "getChannelInfo"; +static char __pyx_k_getNonBlocking[] = "getNonBlocking"; +static char __pyx_k_maskHasDBE_LOG[] = "maskHasDBE_LOG ="; +static char __pyx_k_monitorStopAll[] = "monitorStopAll()"; +static char __pyx_k_not_recognized[] = "not recognized! "; +static char __pyx_k_openNowAndWait[] = "openNowAndWait"; +static char __pyx_k_setCallbackGet[] = "setCallbackGet"; +static char __pyx_k_setCallbackPut[] = "setCallbackPut"; +static char __pyx_k_withExceptions[] = "withExceptions"; +static char __pyx_k_CyCafeException[] = "------CyCafeException-----------------------------------------------------"; +static char __pyx_k_Unknown_type_in[] = "Unknown type in {}"; +static char __pyx_k_alarmSeverity_d[] = "alarmSeverity = %d"; +static char __pyx_k_allocate_buffer[] = "allocate_buffer"; +static char __pyx_k_cafe_openNoWait[] = "cafe.openNoWait()"; +static char __pyx_k_dtype_is_object[] = "dtype_is_object"; +static char __pyx_k_getCompoundList[] = "getCompoundList"; +static char __pyx_k_getPVGroupCache[] = "getPVGroupCache"; +static char __pyx_k_memoryviewslice[] = "memoryviewslice"; +static char __pyx_k_noEnumStrings_d[] = "noEnumStrings = %d"; +static char __pyx_k_cyca_PyCafe_CyCa[] = "cyca=PyCafe.CyCa()"; +static char __pyx_k_maskHasDBE_ALARM[] = "maskHasDBE_ALARM ="; +static char __pyx_k_maskHasDBE_VALUE[] = "maskHasDBE_VALUE ="; +static char __pyx_k_py_cb_handle_get[] = "py_cb_handle_get"; +static char __pyx_k_py_cb_handle_put[] = "py_cb_handle_put"; +static char __pyx_k_Assuming_DBR_TIME[] = "Assuming DBR_TIME"; +static char __pyx_k_ENUM_string_value[] = ": ENUM string value:"; +static char __pyx_k_cafe_allConnected[] = "cafe.allConnected()"; +static char __pyx_k_cafe_printHandles[] = "cafe.printHandles()"; +static char __pyx_k_def_getScalarList[] = "def getScalarList:"; +static char __pyx_k_getEnumFromString[] = "getEnumFromString"; +static char __pyx_k_getStringFromEnum[] = "getStringFromEnum"; +static char __pyx_k_getimeStampAsDate[] = "getimeStampAsDate"; +static char __pyx_k_lowerAlarmLimit_f[] = "lowerAlarmLimit = %f"; +static char __pyx_k_memoryviewslice_2[] = "_memoryviewslice"; +static char __pyx_k_upperAlarmLimit_f[] = "upperAlarmLimit = %f"; +static char __pyx_k_with_error_status[] = "with error status="; +static char __pyx_k_Possible_types_are[] = "'. Possible types are:"; +static char __pyx_k_cafe_PyCafe_CyCafe[] = "cafe=PyCafe.CyCafe()"; +static char __pyx_k_cafe_closeChannels[] = "cafe.closeChannels()"; +static char __pyx_k_checkForHandleList[] = "checkForHandleList"; +static char __pyx_k_getCompoundPVGroup[] = "getCompoundPVGroup"; +static char __pyx_k_getTimeStampAsDate[] = "getTimeStampAsDate"; +static char __pyx_k_printStatusIfError[] = "printStatusIfError"; +static char __pyx_k_strided_and_direct[] = ""; +static char __pyx_k_ICAFE_CS_NEVER_CONN[] = "ICAFE_CS_NEVER_CONN"; +static char __pyx_k_checkForGroupHandle[] = "checkForGroupHandle"; +static char __pyx_k_connectionState_s_d[] = "connectionState = %s (%d)"; +static char __pyx_k_lowerControlLimit_f[] = "lowerControlLimit = %f"; +static char __pyx_k_lowerDisplayLimit_f[] = "lowerDisplayLimit = %f"; +static char __pyx_k_lowerWarningLimit_f[] = "lowerWarningLimit = %f"; +static char __pyx_k_maskHasDBE_PROPERTY[] = "maskHasDBE_PROPERTY="; +static char __pyx_k_set_handlePV_valSet[] = "set(handlePV, valSet)"; +static char __pyx_k_upperControlLimit_f[] = "upperControlLimit = %f"; +static char __pyx_k_upperDisplayLimit_f[] = "upperDisplayLimit = %f"; +static char __pyx_k_upperWarningLimit_f[] = "upperWarningLimit = %f"; +static char __pyx_k_Analysing_statusList[] = "Analysing statusList[]..."; +static char __pyx_k_Returning_memoryview[] = "Returning memoryview"; +static char __pyx_k_groupOpen_char_gname[] = "groupOpen(char * gname)"; +static char __pyx_k_strided_and_indirect[] = ""; +static char __pyx_k_Expected_16s_got_200s[] = "Expected %.16s, got %.200s"; +static char __pyx_k_ICAFE_CA_OP_CONN_DOWN[] = "ICAFE_CA_OP_CONN_DOWN"; +static char __pyx_k_The_value_entered_was[] = "The value entered was"; +static char __pyx_k_contiguous_and_direct[] = ""; +static char __pyx_k_setGetCacheWaitPolicy[] = "setGetCacheWaitPolicy"; +static char __pyx_k_Entering_0_for_element[] = "Entering 0 for element"; +static char __pyx_k_MemoryView_of_r_object[] = ""; +static char __pyx_k_No_of_group_members_is[] = "No of group members is "; +static char __pyx_k_cafe_checkForHandle_pv[] = "cafe.checkForHandle()"; +static char __pyx_k_cafe_printDisconnected[] = "cafe.printDisconnected()"; +static char __pyx_k_getAlarmStatusSeverity[] = "getAlarmStatusSeverity"; +static char __pyx_k_getMonitorIDs_handlePV[] = "getMonitorIDs(handlePV)"; +static char __pyx_k_getNoMonitors_handlePV[] = "getNoMonitors(handlePV)"; +static char __pyx_k_groupClose_gHandleName[] = "groupClose(gHandleName)"; +static char __pyx_k_Cython_Compiler_Options[] = "Cython.Compiler.Options"; +static char __pyx_k_MemoryView_of_r_at_0x_x[] = ""; +static char __pyx_k_cafeConnectionState_s_d[] = "cafeConnectionState = %s (%d)"; +static char __pyx_k_contiguous_and_indirect[] = ""; +static char __pyx_k_hence_assuming_DBR_TIME[] = "hence assuming DBR_TIME"; +static char __pyx_k_members_while_group_has[] = "members while group has"; +static char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'"; +static char __pyx_k_and_thus_assume_a_string[] = " and thus assume a string"; +static char __pyx_k_getbuffer_obj_view_flags[] = "getbuffer(obj, view, flags)"; +static char __pyx_k_waitForGetEvent_handlePV[] = "waitForGetEvent(handlePV)"; +static char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct"; +static char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d."; +static char __pyx_k_getHandlesFromWithinGroup[] = "getHandlesFromWithinGroup"; +static char __pyx_k_raised_from_CyCafe_method[] = "raised from CyCafe method:"; +static char __pyx_k_Error_in_def_getScalarList[] = "Error in def getScalarList: "; +static char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)"; +static char __pyx_k_setChannelRequestPolicyGet[] = "setChannelRequestPolicyGet"; +static char __pyx_k_ERROR_GROUP_MEMBER_MISMATCH[] = "ERROR: GROUP MEMBER MISMATCH!!"; +static char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)"; +static char __pyx_k_as_channel_is_not_connected[] = "as channel is not connected!"; +static char __pyx_k_cafe_get_handlePV_handle_pv[] = "cafe.get(handlePV=)"; +static char __pyx_k_cafe_openNowAndWait_timeout[] = "cafe.openNowAndWait(timeout)"; +static char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array"; +static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; +static char __pyx_k_reports_the_following_error[] = ") reports the following error:"; +static char __pyx_k_Error_in_def_getCompoundList[] = "Error in def getCompoundList: "; +static char __pyx_k_cafe_getHandleFromPVName_str[] = "cafe.getHandleFromPVName(str)"; +static char __pyx_k_cafe_getPVNameFromHandle_int[] = "cafe.getPVNameFromHandle(int)"; +static char __pyx_k_ghandle_groupopen_char_gname[] = "ghandle = groupopen(char * gname)"; +static char __pyx_k_groupMonitorStop_ghandleName[] = "groupMonitorStop(ghandleName)"; +static char __pyx_k_cafe_close_handlePV_handle_pv[] = "cafe.close(handlePV=)"; +static char __pyx_k_cafe_getPV_handlePV_handle_pv[] = "cafe.getPV(handlePV=)"; +static char __pyx_k_memoryview_numpy_array_ctypes[] = "memoryview, numpy, array, ctypes"; +static char __pyx_k_setGetActionWhenMonitorPolicy[] = "setGetActionWhenMonitorPolicy"; +static char __pyx_k_status_groupClose_gHandleName[] = "status = groupClose()"; +static char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data."; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_pyx[] = "EXCEPTION RAISED IN PyCafe.pyx:"; +static char __pyx_k_Error_Warning_from_def_getAsyn[] = "Error/Warning from def getAsyn: "; +static char __pyx_k_Warning_from_groupMonitorStart[] = "***Warning*** from groupMonitorStart for handle(orPV)="; +static char __pyx_k_cafe_checkForHandleList_pvList[] = "cafe.checkForHandleList()"; +static char __pyx_k_cafe_getInt_handlePV_handle_pv[] = "cafe.getInt(handlePV=)"; +static char __pyx_k_cafe_getStr_handlePV_handle_pv[] = "cafe.getStr(handlePV=)"; +static char __pyx_k_getCtrl_handlePV_str_dt_native[] = "getCtrl(handlePV, str dt='native')"; +static char __pyx_k_getList_handlePV_str_dt_native[] = "getList(handlePV, str dt='native')"; +static char __pyx_k_groupMemberList_self_str_gname[] = "groupMemberList(self, str gname)"; +static char __pyx_k_handle_handleList_cafe_open_pv[] = "=cafe.open()"; +static char __pyx_k_monitorStop_handlePV_mpid_None[] = "monitorStop(handlePV, mpid=None)"; +static char __pyx_k_setNelemToNative_self_handlePV[] = "setNelemToNative(self, handlePV)"; +static char __pyx_k_strided_and_direct_or_indirect[] = ""; +static char __pyx_k_while_list_of_callback_objects[] = " while list of callback objects is"; +static char __pyx_k_Allowed_DBR_TYPEs_are_DBR_PLAIN[] = "Allowed DBR_TYPEs are DBR_PLAIN (0), DBR_STS(1), DBR_TIME(2)"; +static char __pyx_k_Error_in_def_grouping_for_group[] = "Error in def grouping for group named"; +static char __pyx_k_Second_input_argument_should_be[] = "Second input argument should be of "; +static char __pyx_k_TIMEOUT_in_getGroup_swithing_to[] = "TIMEOUT in getGroup; swithing to getCompoundList"; +static char __pyx_k_ThandlePVSet_list_member_should[] = "ThandlePVSet list member should be if handle, else if PV"; +static char __pyx_k_Valid_input_parameters_for_data[] = "Valid input parameters for data type are: 'int', 'float', 'str', or 'native'"; +static char __pyx_k_Warning_from_groupMonitorStartW[] = "***Warning*** from groupMonitorStartWithCBList for handle(orPV)="; +static char __pyx_k_Warning_from_monitorStart_for_h[] = "***Warning*** from monitorStart for handle="; +static char __pyx_k_afs_psi_ch_project_cafe_gitwork[] = "/afs/psi.ch/project/cafe/gitworkspace/CAFE/cycafe/python-3.5/PyCafeDefs.pxi"; +static char __pyx_k_cafe_getCtrl_handlePV_handle_pv[] = "cafe.getCtrl(handlePV=)"; +static char __pyx_k_cafe_getDbrBase_handlePV_handle[] = "cafe.getDbrBase(handlePV=)"; +static char __pyx_k_cafe_getFloathandlePV_handle_pv[] = "cafe.getFloathandlePV=)"; +static char __pyx_k_cafe_getIntList_handlePV_handle[] = "cafe.getIntList(handlePV=)"; +static char __pyx_k_cafe_getList_handlePV_handle_pv[] = "cafe.getList(handlePV=)"; +static char __pyx_k_cafe_getPVCache_handlePV_handle[] = "cafe.getPVCache(handlePV=)"; +static char __pyx_k_cafe_getPVFloat_handlePV_handle[] = "cafe.getPVFloat(handlePV=)"; +static char __pyx_k_cafe_getStrList_handlePV_handle[] = "cafe.getStrList(handlePV=)"; +static char __pyx_k_cafe_setDbrBase_handlePV_handle[] = "cafe.setDbrBase(handlePV=, unsigned int)"; +static char __pyx_k_does_not_match_the_length_of_da[] = " does not match the length of data list "; +static char __pyx_k_getCache_handlePV_str_dt_native[] = "getCache(handlePV, str dt='native')"; +static char __pyx_k_getScalarList_handleList_str_dt[] = "getScalarList(handleList, str dt='native')"; +static char __pyx_k_matchMany_self_list_valSet_list[] = "matchMany(self, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static 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 char __pyx_k_mpid_cafe_monitorStart_handlePV[] = "mpid=cafe.monitorStart(handlePV=), cb=None, dbr=None, mask=DBE_VALUE|DBE_LOG|DBE_ALARM)"; +static char __pyx_k_setCompoundList_handleList_list[] = "setCompoundList(handleList, list vectorList)"; +static char __pyx_k_setNelem_self_handlePV_unsigned[] = "setNelem(self, handlePV, unsigned int nelem)"; +static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; +static char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced"; +static char __pyx_k_Allowed_ChannelGetActionWhenMoni[] = "Allowed ChannelGetActionWhenMonitorPolicyKind are GET_FROM_CACHE (0), GET_FROM_IOC (1)"; +static char __pyx_k_Allowed_ChannelGetCacheWaitPolic[] = "Allowed ChannelGetCacheWaitPolicyKind are GET_CACHE_NO_CHECK (0), GET_CACHE_NO_WAIT (1), GET_CACHE_WAIT (2)"; +static char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides"; +static char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; +static char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions"; +static char __pyx_k_Data_to_be_presented_in_native_d[] = "Data to be presented in native data type"; +static char __pyx_k_Datatype_unknown_returning_value[] = "Datatype unknown, returning value 0"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g[] = "EXCEPTION RAISED IN PyCafe def getScalarList. \nFirst input argument, should be of handles or PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m[] = "EXCEPTION RAISED IN PyCafe def monitorStop. \nmonitorPolicy ID (mpid) should be "; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s[] = "EXCEPTION RAISED IN PyCafe def setScalarList. \nFirst input argument, should be of handles or PVs"; +static 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 char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g[] = "EXCEPTION RAISED in PyCafe def getChannelInfo"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m[] = "EXCEPTION RAISED in PyCafe def monitorStopAll. Status = %d"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s[] = "EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d"; +static char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array"; +static char __pyx_k_Error_in_PyCafe_def_getPVGroupCa[] = "Error in PyCafe def getPVGroupCache. Status = %d"; +static char __pyx_k_Error_in_PyCafe_def_getPVGroup_S[] = "Error in PyCafe def getPVGroup. Status = %d"; +static char __pyx_k_Error_in_def_waitForBundledEvent[] = "Error in def waitForBundledEvents: "; +static char __pyx_k_First_Input_argument_should_be_t[] = "First Input argument should be if handle, else if PV"; +static char __pyx_k_First_input_argument_should_be_a[] = "First input argument, should be a 'list' of if handles or if PVs"; +static char __pyx_k_First_input_argument_should_be_t[] = "First input argument should be if handle, else if PV"; +static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; +static char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported"; +static char __pyx_k_Input_argument_pv_should_be_type[] = "Input argument, pv, should be "; +static 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 , or "; +static char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s"; +static char __pyx_k_No_value_specified_for_struct_at[] = "No value specified for struct attribute 'secPastEpoch'"; +static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; +static char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)"; +static char __pyx_k_PyCafe_def_setGroup_Unusual_data[] = "PyCafe def setGroup: Unusual data type for element"; +static char __pyx_k_PyCafe_def_set_WARNING_DATA_TYPE[] = "PyCafe def set WARNING: DATA TYPE NOT SUPPORTED"; +static char __pyx_k_PyCafe_pyx_We_do_not_cater_for_t[] = "PyCafe.pyx: We do not cater for type "; +static char __pyx_k_PyCafe_pyx_getArray_array_type_d[] = "PyCafe.pyx getArray, 'array' type does not support array of strings; returning list"; +static char __pyx_k_Third_input_argument_should_be_t[] = "Third input argument, should be if handle, else if PV"; +static char __pyx_k_This_line_in_PyCafe_def_getAsLis[] = "This line in PyCafe def getAsList should never appear!"; +static char __pyx_k_This_line_in_PyCafe_def_getCache[] = "This line in PyCafe def getCache should never appear!"; +static char __pyx_k_This_line_in_PyCafe_def_get_shou[] = "This line in PyCafe def get should never appear!"; +static char __pyx_k_This_line_in_PyCafe_def_setCompo[] = "This line in PyCafe def setCompoundList should never appear!"; +static char __pyx_k_This_line_in_PyCafe_def_setScala[] = "This line in PyCafe def setScalarList should never appear!"; +static char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; +static char __pyx_k_Unknow_array_type_in_user_reques[] = "Unknow array type in user request for art='"; +static char __pyx_k_Unknown_array_type_in_user_reque[] = "Unknown array type in user request for art='"; +static char __pyx_k_WARNING_PyCafe_def_setDbrBase_ha[] = "WARNING: PyCafe def setDbrBase(handle/PV, DBR_TYPE)"; +static char __pyx_k_WARNING_PyCafe_def_setGetActionW[] = "WARNING: PyCafe def setGetActionWhenMonitorPolicy(handle/PV, ChannelGetActionWhenMonitorPolicyKind)"; +static char __pyx_k_WARNING_PyCafe_def_setGetCacheWa[] = "WARNING: PyCafe def setGetCacheWaitPolicy(handle/PV, ChannelGetCacheWaitPolicyKind)"; +static char __pyx_k_cafe_checkForGroupHandle_groupNa[] = "cafe.checkForGroupHandle()"; +static char __pyx_k_cafe_getAlarmStatusSeverity_hand[] = "cafe.getAlarmStatusSeverity(handlePV=)"; +static char __pyx_k_cafe_getArrayCache_handlePV_hand[] = "cafe.getArrayCache(handlePV=)"; +static char __pyx_k_cafe_getArray_handlePV_handle_pv[] = "cafe.getArray(handlePV=)"; +static char __pyx_k_cafe_getChannelInfo_handlePV_han[] = "cafe.getChannelInfo(handlePV=)"; +static char __pyx_k_cafe_getCtrlCache_handlePV_handl[] = "cafe.getCtrlCache(handlePV=)"; +static char __pyx_k_cafe_getFloatArrayCache_handlePV[] = "cafe.getFloatArrayCache(handlePV=,asnumpy=)"; +static char __pyx_k_cafe_getFloatArray_handlePV_hand[] = "cafe.getFloatArray(handlePV=,asnumpy=)"; +static char __pyx_k_cafe_getFloatList_handlePV_handl[] = "cafe.getFloatList(handlePV=)"; +static char __pyx_k_cafe_getFloatScalarList_handleLi[] = "cafe.getFloatScalarList(handleList=)"; +static char __pyx_k_cafe_getIntArrayCache_handlePV_h[] = "cafe.getIntArrayCache(handlePV=,asnumpy=)"; +static char __pyx_k_cafe_getIntArray_handlePV_handle[] = "cafe.getIntArray(handlePV=,asnumpy=)"; +static char __pyx_k_cafe_getIntScalarList_handleList[] = "cafe.getIntScalarList(handleList=)"; +static char __pyx_k_cafe_getNoMonitors_handlePV_hand[] = "cafe.getNoMonitors(handlePV=)"; +static char __pyx_k_cafe_getNonBlocking_handlePV_han[] = "cafe.getNonBlocking(handlePV=)"; +static char __pyx_k_cafe_getPVFloatCache_handlePV_ha[] = "cafe.getPVFloatCache(handlePV=)"; +static char __pyx_k_cafe_getPVFloatList_handleList_h[] = "cafe.getPVFloatList(handleList=)"; +static char __pyx_k_cafe_getPVIntCache_handlePV_hand[] = "cafe.getPVIntCache(handlePV=)"; +static char __pyx_k_cafe_getPVIntList_handleList_han[] = "cafe.getPVIntList(handleList=)"; +static char __pyx_k_cafe_getPVInt_handlePV_handle_pv[] = "cafe.getPVInt(handlePV=)"; +static char __pyx_k_cafe_getPVList_handleList_handle[] = "cafe.getPVList(handleList=)"; +static char __pyx_k_cafe_getPVStrCache_handlePV_hand[] = "cafe.getPVStrCache(handlePV=)"; +static char __pyx_k_cafe_getPVStrList_handleList_han[] = "cafe.getPVStrList(handleList=)"; +static char __pyx_k_cafe_getPVStr_handlePV_handle_pv[] = "cafe.getPVStr(handlePV=)"; +static char __pyx_k_cafe_getPV_handlePV_handle_pv_dt[] = "cafe.getPV(handlePV=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_cafe_getScalarList_handleList_ha[] = "cafe.getScalarList(handleList=)"; +static char __pyx_k_cafe_getStatus_handlePV_handle_p[] = "cafe.getStatus(handlePV=)"; +static char __pyx_k_cafe_getStrScalarList_handleList[] = "cafe.getStrScalarList(handleList=)"; +static char __pyx_k_cafe_getTimeStampDate_handlePV_h[] = "cafe.getTimeStampDate(handlePV=)"; +static char __pyx_k_cafe_getTimeStamp_handlePV_handl[] = "cafe.getTimeStamp(handlePV=)"; +static char __pyx_k_cafe_get_handlePV_handle_pv_dt_n[] = "cafe.get(handlePV=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_cafe_isConnected_handlePV_handle[] = "cafe.isConnected(handlePV=)"; +static char __pyx_k_cafe_monitorStopAll_handlePV_han[] = "cafe.monitorStopAll(handlePV=)"; +static char __pyx_k_cafe_monitorStop_handlePV_handle[] = "cafe.monitorStop(handlePV=, mpID=None)"; +static char __pyx_k_cafe_printHandle_handlePV_handle[] = "cafe.printHandle(handlePV=)"; +static char __pyx_k_cafe_setAndMatch_handlePVSet_han[] = "cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \t\t\t\t\t\t\t\t\t\t\t\t\ttolerance= , timeout=, printFlag=)"; +static char __pyx_k_cafe_setGroup_ghandleName_vector[] = "cafe.setGroup(ghandleName, vectorList)"; +static char __pyx_k_cafe_setScalarList_handleList_ha[] = "cafe.setScalarList(handleList=, valList)"; +static char __pyx_k_cafe_set_handlePV_handle_pv_valS[] = "cafe.set(handlePV=, valSet)"; +static 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 char __pyx_k_getCompoundList_handleList_str_d[] = "getCompoundList(handleList, str dt='native')"; +static char __pyx_k_getCompoundPVGroup_ghandleName_s[] = "getCompoundPVGroup(ghandleName, str dt='native')"; +static char __pyx_k_getCtrlCache_handlePV_str_dt_nat[] = "getCtrlCache(handlePV, str dt='native')"; +static char __pyx_k_getGroupCache_self_ghandleName_s[] = "getGroupCache(self, ghandleName, str dt='native')"; +static char __pyx_k_getGroup_ghandleName_str_dt_nati[] = "getGroup(ghandleName, str dt='native')"; +static char __pyx_k_getHandlesFromWithinGroup_gHandl[] = "getHandlesFromWithinGroup(gHandleName)"; +static char __pyx_k_getPVCache_handlePV_str_dt_nativ[] = "getPVCache(handlePV, str dt='native'"; +static char __pyx_k_getPVGroup_ghandleName_str_dt_na[] = "getPVGroup(ghandleName, str dt='native')"; +static char __pyx_k_ghandle_groupings_char_gname_lis[] = "ghandle = groupings(char * gname, list _pvlist)"; +static char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)"; +static char __pyx_k_groupMonitorStartWithCBList_ghan[] = "groupMonitorStartWithCBList(ghandleName, list cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)"; +static char __pyx_k_groupMonitorStart_ghandleName_ob[] = "groupMonitorStart(ghandleName, object cb=None, DBR_TYPE dbr=DBR_TIME, unsigned int mask=DBE_VALUE|DBE_LOG|DBE_ALARM)"; +static char __pyx_k_grouping_char_gname_list__pvlist[] = "grouping(char * gname, list _pvlist)"; +static char __pyx_k_handleList_cafe_defineGroup_gnam[] = "handleList[]=cafe.defineGroup(gname, pvList)"; +static char __pyx_k_handleMatch_list_member_should_b[] = "handleMatch list member should be if handle, else if PV"; +static char __pyx_k_hence_assuming_default_value_GET[] = "hence assuming default value GET_CACHE_WAIT"; +static char __pyx_k_list_cafe_PVGroupValuesToList_pv[] = "list[]=cafe.PVGroupValuesToList(pvgroup)"; +static char __pyx_k_match_double_valSet_handlePVMatc[] = "match(double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; +static char __pyx_k_pvdataList_status_cafe_getPVGrou[] = "pvdataList[],status = cafe.getPVGroup(ghandleName, dt='native')"; +static char __pyx_k_setAndMatchMany_list_handlePVSet[] = "setAndMatchMany(list handlePVSet, list valSet, list handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static char __pyx_k_setAndMatch_handlePVSet_double_v[] = "setAndMatch(handlePVSet, double valSet, handlePVMatch, double tolerance, double timeout, bint printFlag)"; +static char __pyx_k_setGroup_self_ghandleName_list_v[] = "setGroup(self, ghandleName, list vectorList)"; +static char __pyx_k_setNelemCtrl_self_handlePV_unsig[] = "setNelemCtrl(self, handlePV, unsigned int nelem)"; +static char __pyx_k_setNelemToRetrieveFromCacheToOne[] = "setNelemToRetrieveFromCacheToOne(self, handlePV)"; +static char __pyx_k_setScalarList_handleList_list_va[] = "setScalarList(handleList, list valList)"; +static char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; +static char __pyx_k_vectorList_status_statusList_caf[] = "vectorList,status,statusList = cafe.getGroup(ghandleName, dt='native')"; +static char __pyx_k_waitForBundledEvents_self_handle[] = "waitForBundledEvents(self, handleList)"; +static char __pyx_k_Second_input_argument_should_be_2[] = "Second input argument should be a of "; +static char __pyx_k_TIMEOUT_in_getGroup_swithing_to_2[] = "TIMEOUT in getGroup; swithing to getCompoundPVGroup"; +static char __pyx_k_cafe_getCtrl_handlePV_handle_pv_2[] = "cafe.getCtrl(handlePV=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_cafe_getList_handlePV_handle_pv_2[] = "cafe.getList(handlePV=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_cafe_getPVCache_handlePV_handle_2[] = "cafe.getPVCache(handlePV=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_2[] = "EXCEPTION RAISED IN PyCafe def getScalarList. \nFirst input argument, should be a 'list' of if handles or if PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_3[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument, should be of handles or PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_4[] = "EXCEPTION RAISED IN PyCafe def getCompoundList. \nFirst input argument, should be a 'list' of if handles or if PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_5[] = "EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \nFirst input argument, should be if group handle, else if group name"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_6[] = "EXCEPTION RAISED IN PyCafe def getCache. \nFirst input argument, should be if handle, else if PV"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_7[] = "EXCEPTION RAISED IN PyCafe def getPVCache. \n \t\t\tFirst input argument, should be if handle, else if PV"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_8[] = "EXCEPTION RAISED IN PyCafe def getCtrl. \nFirst input argument, should be if handle, else if PV"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_9[] = "EXCEPTION RAISED IN PyCafe def getCtrlCache. \nFirst input argument, should be if handle, else if PV"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_2[] = "EXCEPTION RAISED IN PyCafe def matchMany. \nSecond input argument, should be of scalar values"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_3[] = "EXCEPTION RAISED IN PyCafe def matchMany. \nThird input argument, should be of handles or PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_4[] = "EXCEPTION RAISED IN PyCafe def matchMany. \nLengths of first (handlePVSet) and third (handlePVMatch) input lists must match!"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_2[] = "EXCEPTION RAISED IN PyCafe def setScalarList. \nFirst input argument, should be a 'list' of if handles or if PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_3[] = "EXCEPTION RAISED IN PyCafe def setScalarList. Length of handle list "; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_4[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nFirst input argument, should be of handles or PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_5[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nFirst input argument, should be a 'list' of if handles or if PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_6[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. Length of handle list "; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_7[] = "EXCEPTION RAISED IN PyCafe def setCompoundList. \nUnknown data input; should be one of , , , "; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_8[] = "EXCEPTION RAISED IN PyCafe def setGroup. \nUnknown data input; should be one of , , , "; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_9[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nFirst input argument, should be of handles or PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_w_2[] = "EXCEPTION RAISED IN PyCafe def waitForBundledEvents. \nFirst input argument, should be a 'list' of if handles or if PVs"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_2[] = "EXCEPTION RAISED in PyCafe def getChannelInfo. Status = %d"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_3[] = "EXCEPTION RAISED in PyCafe def get. Status = %d"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_g_4[] = "EXCEPTION RAISED in PyCafe def getCache. Status = %d"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_2[] = "EXCEPTION RAISED in PyCafe def matchMany. Status = %d"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_m_3[] = "EXCEPTION RAISED in PyCafe def match. Status = %d"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_2[] = "EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d"; +static char __pyx_k_EXCEPTION_RAISED_in_PyCafe_def_s_3[] = "EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne"; +static char __pyx_k_First_input_argument_should_be_a_2[] = "First input argument should be a 'list' of if handles, else if PVs"; +static char __pyx_k_First_input_argument_should_be_a_3[] = "First input argument should be a 'list' of if handles or if PVs"; +static char __pyx_k_First_input_argument_should_be_t_2[] = "First input argument, should be if handle, else if PV"; +static char __pyx_k_First_input_argument_should_be_t_3[] = "First input argument, should be if group handle, else if group name"; +static char __pyx_k_First_input_argument_should_be_t_4[] = "First input argument should be for group name"; +static char __pyx_k_First_input_argument_should_be_t_5[] = "First input argument should be if group handle, else if group name"; +static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; +static char __pyx_k_No_value_specified_for_struct_at_2[] = "No value specified for struct attribute 'nsec'"; +static char __pyx_k_WARNING_PyCafe_def_setGetActionW_2[] = "WARNING: PyCafe def setGetActionWhenMonitorPolicyAllHandles(ChannelGetActionWhenMonitorPolicyKind)"; +static char __pyx_k_WARNING_PyCafe_def_setGetCacheWa_2[] = "WARNING: PyCafe def setGetCacheWaitPolicyAllHandles(ChannelGetCacheWaitPolicyKind)"; +static char __pyx_k_cafe_getArrayCache_handlePV_hand_2[] = "cafe.getArrayCache(handlePV=, dt=<'int','float','str','native'(default)>)"; +static char __pyx_k_cafe_getArray_handlePV_handle_pv_2[] = "cafe.getArray(handlePV=, dt=<'int','float','str','native'(default)>)"; +static char __pyx_k_cafe_getCtrlCache_handlePV_handl_2[] = "cafe.getCtrlCache(handlePV=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_cafe_getPVList_handleList_handle_2[] = "cafe.getPVList(handleList=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_cafe_getScalarList_handleList_ha_2[] = "cafe.getScalarList(handleList=, dt='native' (default) else <'int','float','str'>)"; +static char __pyx_k_hence_assuming_default_value_GET_2[] = "hence assuming default value GET_FROM_IOC"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_10[] = "EXCEPTION RAISED IN PyCafe def getMonitorPolicyVector \nFirst input argument, should be if handle, else if PV"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_11[] = "EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \nInput cb should be of type and give the list of cb objects"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_g_12[] = "EXCEPTION RAISED IN PyCafe def groupMonitorStartWithCBList. \nNo of group members doe not match the length of callback object list"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_10[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nSecond input argument, should be of scalar values"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_11[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nThird input argument, should be of handles or PVs"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_12[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nLengths of first (handlePVSet) and second (valSet) input lists must match!"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_13[] = "EXCEPTION RAISED IN PyCafe def setAndMatchMany. \nLengths of first (handlePVSet) and third (handlePVMatch) input lists must match!"; +static char __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_14[] = "EXCEPTION RAISED IN PyCafe def set. \nFirst input argument, should be if handle, else if PV"; +static PyObject *__pyx_n_s_ASCII; +static PyObject *__pyx_kp_u_Allowed_ChannelGetActionWhenMoni; +static PyObject *__pyx_kp_u_Allowed_ChannelGetCacheWaitPolic; +static PyObject *__pyx_kp_u_Allowed_DBR_TYPEs_are_DBR_PLAIN; +static PyObject *__pyx_kp_u_Analysing_statusList; +static PyObject *__pyx_n_s_Array; +static PyObject *__pyx_kp_u_Assuming_DBR_TIME; +static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri; +static PyObject *__pyx_n_u_C; +static PyObject *__pyx_n_u_CAFEException; +static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is; +static PyObject *__pyx_kp_s_Cannot_index_with_type_s; +static PyObject *__pyx_n_u_Channel; +static PyObject *__pyx_n_s_Compiler; +static PyObject *__pyx_kp_u_CyCafeException; +static PyObject *__pyx_n_s_Cython; +static PyObject *__pyx_n_s_Cython_Compiler_Options; +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_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_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_m_3; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_4; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_10; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_11; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_12; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_13; +static PyObject *__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_14; +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_pyx; +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_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_getScalarList; +static PyObject *__pyx_kp_u_Error_in_def_grouping_for_group; +static PyObject *__pyx_kp_u_Error_in_def_waitForBundledEvent; +static PyObject *__pyx_n_s_Exception; +static PyObject *__pyx_kp_u_First_Input_argument_should_be_t; +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_t; +static PyObject *__pyx_kp_u_First_input_argument_should_be_t_2; +static PyObject *__pyx_kp_u_First_input_argument_should_be_t_3; +static PyObject *__pyx_kp_u_First_input_argument_should_be_t_4; +static PyObject *__pyx_kp_u_First_input_argument_should_be_t_5; +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_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_n_u_ICAFE_CA_OP_CONN_DOWN; +static PyObject *__pyx_n_u_ICAFE_CS_NEVER_CONN; +static PyObject *__pyx_n_s_IndexError; +static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte; +static PyObject *__pyx_kp_u_Input_argument_pv_should_be_type; +static PyObject *__pyx_kp_u_Input_data_whether_within_a_list; +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_n_s_KeyError; +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_No_of_group_members_is; +static PyObject *__pyx_kp_s_No_value_specified_for_struct_at; +static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_2; +static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; +static PyObject *__pyx_n_b_O; +static PyObject *__pyx_n_s_Options; +static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a; +static PyObject *__pyx_kp_u_PV; +static PyObject *__pyx_kp_u_PV_2; +static PyObject *__pyx_n_u_PV_3; +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_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_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_swithing_to; +static PyObject *__pyx_kp_u_TIMEOUT_in_getGroup_swithing_to_2; +static PyObject *__pyx_kp_u_ThandlePVSet_list_member_should; +static PyObject *__pyx_kp_u_The_value_entered_was; +static PyObject *__pyx_kp_u_Third_input_argument_should_be_t; +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_kp_u_UTF_8; +static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object; +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_kp_u_Unknown_type_in; +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_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__108; +static PyObject *__pyx_kp_u__109; +static PyObject *__pyx_kp_u__113; +static PyObject *__pyx_kp_u__120; +static PyObject *__pyx_kp_u__122; +static PyObject *__pyx_kp_u__199; +static PyObject *__pyx_kp_u__206; +static PyObject *__pyx_kp_u__212; +static PyObject *__pyx_kp_u__213; +static PyObject *__pyx_kp_u__236; +static PyObject *__pyx_kp_u__85; +static PyObject *__pyx_kp_u__93; +static PyObject *__pyx_kp_u__98; +static PyObject *__pyx_kp_u_accessRead_d; +static PyObject *__pyx_kp_u_accessWrite_d; +static PyObject *__pyx_kp_s_afs_psi_ch_project_cafe_gitwork; +static PyObject *__pyx_n_s_alarmSeverity; +static PyObject *__pyx_kp_u_alarmSeverity_d; +static PyObject *__pyx_n_s_alarmStatus; +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_annotate; +static PyObject *__pyx_n_s_append; +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_kp_u_as_channel_is_not_connected; +static PyObject *__pyx_n_u_attachContext; +static PyObject *__pyx_n_s_base; +static PyObject *__pyx_n_s_bool; +static PyObject *__pyx_n_s_bool8; +static PyObject *__pyx_n_s_byte; +static PyObject *__pyx_n_u_bytes; +static PyObject *__pyx_n_s_c; +static PyObject *__pyx_n_u_c; +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_n_u_cafe; +static PyObject *__pyx_kp_u_cafeConnectionState_s_d; +static PyObject *__pyx_kp_u_cafeDbrType; +static PyObject *__pyx_kp_u_cafe_PyCafe_CyCafe; +static PyObject *__pyx_kp_u_cafe_allConnected; +static PyObject *__pyx_kp_u_cafe_checkForGroupHandle_groupNa; +static PyObject *__pyx_kp_u_cafe_checkForHandleList_pvList; +static PyObject *__pyx_kp_u_cafe_checkForHandle_pv; +static PyObject *__pyx_kp_u_cafe_closeChannels; +static PyObject *__pyx_kp_u_cafe_close_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getAlarmStatusSeverity_hand; +static PyObject *__pyx_kp_u_cafe_getArrayCache_handlePV_hand; +static PyObject *__pyx_kp_u_cafe_getArrayCache_handlePV_hand_2; +static PyObject *__pyx_kp_u_cafe_getArray_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getArray_handlePV_handle_pv_2; +static PyObject *__pyx_kp_u_cafe_getChannelInfo_handlePV_han; +static PyObject *__pyx_kp_u_cafe_getCtrlCache_handlePV_handl; +static PyObject *__pyx_kp_u_cafe_getCtrlCache_handlePV_handl_2; +static PyObject *__pyx_kp_u_cafe_getCtrl_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getCtrl_handlePV_handle_pv_2; +static PyObject *__pyx_kp_u_cafe_getDbrBase_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_getFloatArrayCache_handlePV; +static PyObject *__pyx_kp_u_cafe_getFloatArray_handlePV_hand; +static PyObject *__pyx_kp_u_cafe_getFloatList_handlePV_handl; +static PyObject *__pyx_kp_u_cafe_getFloatScalarList_handleLi; +static PyObject *__pyx_kp_u_cafe_getFloathandlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getHandleFromPVName_str; +static PyObject *__pyx_kp_u_cafe_getIntArrayCache_handlePV_h; +static PyObject *__pyx_kp_u_cafe_getIntArray_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_getIntList_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_getIntScalarList_handleList; +static PyObject *__pyx_kp_u_cafe_getInt_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getList_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getList_handlePV_handle_pv_2; +static PyObject *__pyx_kp_u_cafe_getNoMonitors_handlePV_hand; +static PyObject *__pyx_kp_u_cafe_getNonBlocking_handlePV_han; +static PyObject *__pyx_kp_u_cafe_getPVCache_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_getPVCache_handlePV_handle_2; +static PyObject *__pyx_kp_u_cafe_getPVFloatCache_handlePV_ha; +static PyObject *__pyx_kp_u_cafe_getPVFloatList_handleList_h; +static PyObject *__pyx_kp_u_cafe_getPVFloat_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_getPVIntCache_handlePV_hand; +static PyObject *__pyx_kp_u_cafe_getPVIntList_handleList_han; +static PyObject *__pyx_kp_u_cafe_getPVInt_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getPVList_handleList_handle; +static PyObject *__pyx_kp_u_cafe_getPVList_handleList_handle_2; +static PyObject *__pyx_kp_u_cafe_getPVNameFromHandle_int; +static PyObject *__pyx_kp_u_cafe_getPVStrCache_handlePV_hand; +static PyObject *__pyx_kp_u_cafe_getPVStrList_handleList_han; +static PyObject *__pyx_kp_u_cafe_getPVStr_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getPV_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getPV_handlePV_handle_pv_dt; +static PyObject *__pyx_kp_u_cafe_getScalarList_handleList_ha; +static PyObject *__pyx_kp_u_cafe_getScalarList_handleList_ha_2; +static PyObject *__pyx_kp_u_cafe_getStatus_handlePV_handle_p; +static PyObject *__pyx_kp_u_cafe_getStrList_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_getStrScalarList_handleList; +static PyObject *__pyx_kp_u_cafe_getStr_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_getTimeStampDate_handlePV_h; +static PyObject *__pyx_kp_u_cafe_getTimeStamp_handlePV_handl; +static PyObject *__pyx_kp_u_cafe_get_handlePV_handle_pv; +static PyObject *__pyx_kp_u_cafe_get_handlePV_handle_pv_dt_n; +static PyObject *__pyx_kp_u_cafe_init; +static PyObject *__pyx_kp_u_cafe_isConnected_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_monitorStopAll_handlePV_han; +static PyObject *__pyx_kp_u_cafe_monitorStop_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_openNoWait; +static PyObject *__pyx_kp_u_cafe_openNow; +static PyObject *__pyx_kp_u_cafe_openNowAndWait_timeout; +static PyObject *__pyx_kp_u_cafe_printDisconnected; +static PyObject *__pyx_kp_u_cafe_printHandle_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_printHandles; +static PyObject *__pyx_kp_u_cafe_setAndMatch_handlePVSet_han; +static PyObject *__pyx_kp_u_cafe_setDbrBase_handlePV_handle; +static PyObject *__pyx_kp_u_cafe_setGroup_ghandleName_vector; +static PyObject *__pyx_kp_u_cafe_setScalarList_handleList_ha; +static PyObject *__pyx_kp_u_cafe_set_handlePV_handle_pv_valS; +static PyObject *__pyx_n_s_cb; +static PyObject *__pyx_kp_u_channelID_x; +static PyObject *__pyx_n_s_checkForGroupHandle; +static PyObject *__pyx_n_s_checkForHandle; +static PyObject *__pyx_n_s_checkForHandleList; +static PyObject *__pyx_n_s_class; +static PyObject *__pyx_kp_u_className_s; +static PyObject *__pyx_n_u_close; +static PyObject *__pyx_kp_u_connectFlag_d; +static PyObject *__pyx_kp_u_connectionState_s_d; +static PyObject *__pyx_kp_s_contiguous_and_direct; +static PyObject *__pyx_kp_s_contiguous_and_indirect; +static PyObject *__pyx_n_u_ctype; +static PyObject *__pyx_n_s_ctypes; +static PyObject *__pyx_n_u_ctypes; +static PyObject *__pyx_kp_u_cyca_PyCafe_CyCa; +static PyObject *__pyx_n_u_cycafe; +static PyObject *__pyx_kp_u_d; +static PyObject *__pyx_n_u_d_2; +static PyObject *__pyx_kp_u_dataType_s_d; +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_n_s_decode; +static PyObject *__pyx_kp_u_def_getScalarList; +static PyObject *__pyx_kp_u_does_not_match_the_length_of_da; +static PyObject *__pyx_n_s_double; +static PyObject *__pyx_n_u_double; +static PyObject *__pyx_n_s_dt; +static PyObject *__pyx_kp_u_dt_int; +static PyObject *__pyx_n_s_dtype; +static PyObject *__pyx_n_s_dtype_is_object; +static PyObject *__pyx_n_s_ec; +static PyObject *__pyx_n_s_ei; +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_kp_u_errorCode; +static PyObject *__pyx_kp_u_errorCode_2; +static PyObject *__pyx_kp_u_errorInfo; +static PyObject *__pyx_kp_u_errorInfo_2; +static PyObject *__pyx_kp_u_errorInfo_3; +static PyObject *__pyx_kp_u_errorText; +static PyObject *__pyx_kp_u_errorText_2; +static PyObject *__pyx_n_s_et; +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_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_s_force; +static PyObject *__pyx_n_s_format; +static PyObject *__pyx_n_s_fortran; +static PyObject *__pyx_n_u_fortran; +static PyObject *__pyx_n_s_gName; +static PyObject *__pyx_n_s_get; +static PyObject *__pyx_n_u_get; +static PyObject *__pyx_n_s_getAlarmStatusSeverity; +static PyObject *__pyx_n_u_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_getChannelInfo; +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_kp_u_getCtrlCache_handlePV_str_dt_nat; +static PyObject *__pyx_kp_u_getCtrl_handlePV_str_dt_native; +static PyObject *__pyx_n_u_getDbrBase; +static PyObject *__pyx_n_u_getEnumFromString; +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_getHandlesFromWithinGroup; +static PyObject *__pyx_kp_u_getHandlesFromWithinGroup_gHandl; +static PyObject *__pyx_n_s_getList; +static PyObject *__pyx_kp_u_getList_handlePV_str_dt_native; +static PyObject *__pyx_kp_u_getMonitorIDs_handlePV; +static PyObject *__pyx_kp_u_getNoMonitors_handlePV; +static PyObject *__pyx_n_u_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_getScalarList; +static PyObject *__pyx_kp_u_getScalarList_handleList_str_dt; +static PyObject *__pyx_n_u_getStatus; +static PyObject *__pyx_n_u_getStringFromEnum; +static PyObject *__pyx_n_s_getTimeStamp; +static PyObject *__pyx_n_u_getTimeStamp; +static PyObject *__pyx_n_s_getTimeStampAsDate; +static PyObject *__pyx_n_s_getargspec; +static PyObject *__pyx_n_u_getimeStampAsDate; +static PyObject *__pyx_n_s_ghandleName; +static PyObject *__pyx_kp_u_ghandle_groupings_char_gname_lis; +static PyObject *__pyx_kp_u_ghandle_groupopen_char_gname; +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_kp_u_groupMemberList_self_str_gname; +static PyObject *__pyx_kp_u_groupMonitorStartWithCBList_ghan; +static PyObject *__pyx_kp_u_groupMonitorStart_ghandleName_ob; +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_n_u_h; +static PyObject *__pyx_n_s_handle; +static PyObject *__pyx_n_s_handleList; +static PyObject *__pyx_kp_u_handleList_cafe_defineGroup_gnam; +static PyObject *__pyx_kp_u_handleMatch_list_member_should_b; +static PyObject *__pyx_n_s_handlePV; +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_handleList_cafe_open_pv; +static PyObject *__pyx_n_u_has; +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_kp_u_hostName_s; +static PyObject *__pyx_n_s_id; +static PyObject *__pyx_n_s_import; +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_s_intc; +static PyObject *__pyx_n_s_intp; +static PyObject *__pyx_n_u_isConnected; +static PyObject *__pyx_n_s_itemsize; +static PyObject *__pyx_kp_s_itemsize_0_for_cython_array; +static PyObject *__pyx_kp_u_list_cafe_PVGroupValuesToList_pv; +static PyObject *__pyx_n_u_long; +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_self_list_valSet_list; +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_kp_u_monid; +static PyObject *__pyx_n_s_monid_2; +static PyObject *__pyx_kp_u_monitorStart_handlePV_object_cb; +static PyObject *__pyx_kp_u_monitorStopAll; +static PyObject *__pyx_kp_u_monitorStop_handlePV_mpid_None; +static PyObject *__pyx_n_s_mpid; +static PyObject *__pyx_kp_u_mpid_cafe_monitorStart_handlePV; +static PyObject *__pyx_n_u_mv; +static PyObject *__pyx_kp_u_name; +static PyObject *__pyx_n_s_name_2; +static PyObject *__pyx_n_s_name_3; +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_kp_u_noEnumStrings_d; +static PyObject *__pyx_kp_u_not_connected; +static PyObject *__pyx_kp_u_not_recognized; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_nsec; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_n_u_numpy; +static PyObject *__pyx_kp_u_numpy_ndarray; +static PyObject *__pyx_n_s_obj; +static PyObject *__pyx_n_s_open; +static PyObject *__pyx_n_s_openNoWait; +static PyObject *__pyx_n_s_openNowAndWait; +static PyObject *__pyx_kp_u_open_pv; +static PyObject *__pyx_n_s_order; +static PyObject *__pyx_n_s_os; +static PyObject *__pyx_n_s_pack; +static PyObject *__pyx_kp_u_precision_d; +static PyObject *__pyx_n_s_print; +static PyObject *__pyx_n_s_printFlag; +static PyObject *__pyx_n_u_printHandle; +static PyObject *__pyx_n_u_printHandlesV; +static PyObject *__pyx_n_u_printStatusIfError; +static PyObject *__pyx_n_s_pv; +static PyObject *__pyx_n_s_pvList; +static PyObject *__pyx_kp_u_pv_2; +static PyObject *__pyx_n_s_pv_3; +static PyObject *__pyx_kp_u_pvdataList_status_cafe_getPVGrou; +static PyObject *__pyx_n_s_pvlist; +static PyObject *__pyx_n_s_py_cb_handle_get; +static PyObject *__pyx_n_s_py_cb_handle_put; +static PyObject *__pyx_n_s_pyx_getbuffer; +static PyObject *__pyx_n_s_pyx_vtable; +static PyObject *__pyx_kp_u_raised_from_CyCafe_method; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_kp_u_reports_the_following_error; +static PyObject *__pyx_kp_u_s; +static PyObject *__pyx_n_s_secPastEpoch; +static PyObject *__pyx_kp_u_setAndMatchMany_list_handlePVSet; +static PyObject *__pyx_kp_u_setAndMatch_handlePVSet_double_v; +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_u_setDbrBase; +static PyObject *__pyx_n_u_setGetActionWhenMonitorPolicy; +static PyObject *__pyx_n_u_setGetCacheWaitPolicy; +static PyObject *__pyx_kp_u_setGroup_self_ghandleName_list_v; +static PyObject *__pyx_kp_u_setNelemCtrl_self_handlePV_unsig; +static PyObject *__pyx_kp_u_setNelemToNative_self_handlePV; +static PyObject *__pyx_kp_u_setNelemToRetrieveFromCacheToOne; +static PyObject *__pyx_kp_u_setNelem_self_handlePV_unsigned; +static PyObject *__pyx_kp_u_setScalarList_handleList_list_va; +static PyObject *__pyx_kp_u_set_handlePV_valSet; +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_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_start; +static PyObject *__pyx_kp_u_status; +static PyObject *__pyx_n_s_statusList; +static PyObject *__pyx_n_s_status_2; +static PyObject *__pyx_kp_u_status_d; +static PyObject *__pyx_kp_u_status_groupClose_gHandleName; +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_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_s_struct; +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_tolerance; +static PyObject *__pyx_n_s_ts; +static PyObject *__pyx_kp_u_tsDate; +static PyObject *__pyx_n_s_tsDate_2; +static PyObject *__pyx_kp_u_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_u_ulong; +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_kp_u_units_s; +static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; +static PyObject *__pyx_n_s_unpack; +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_kp_u_utf_8; +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_n_s_value_3; +static PyObject *__pyx_kp_u_values; +static PyObject *__pyx_kp_u_values_2; +static PyObject *__pyx_n_s_vectorList; +static PyObject *__pyx_kp_u_vectorList_status_statusList_caf; +static PyObject *__pyx_n_s_version_info; +static PyObject *__pyx_n_s_wait; +static PyObject *__pyx_kp_u_waitForBundledEvents_self_handle; +static PyObject *__pyx_kp_u_waitForGetEvent_handlePV; +static PyObject *__pyx_n_s_what; +static PyObject *__pyx_n_s_when; +static PyObject *__pyx_kp_u_while_list_of_callback_objects; +static PyObject *__pyx_n_s_withExceptions; +static PyObject *__pyx_kp_u_with_error_status; +static PyObject *__pyx_n_s_wmpk; +static PyObject *__pyx_n_s_wpk; +static PyObject *__pyx_pf_6PyCafe_show(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static void __pyx_pf_6PyCafe_10_finalizer___dealloc__(struct __pyx_obj_6PyCafe__finalizer *__pyx_v_self); /* proto */ +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_14CY_ECA_TIMEOUT___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_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_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_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 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_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 int __pyx_pf_6PyCafe_21_epicsTimeStampAsDate___cinit__(struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *__pyx_v_self, struct epicsTimeStamp __pyx_v_ts); /* proto */ +static PyObject *__pyx_pf_6PyCafe_21_epicsTimeStampAsDate_2get(struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *__pyx_v_self); /* 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_13pythonVersion___get__(struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_self); /* proto */ +static int __pyx_pf_6PyCafe_15CyCafeException___cinit__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self, PyObject *__pyx_v__type, PyObject *__pyx_v__source, PyObject *__pyx_v__handle, PyObject *__pyx_v__pv, PyObject *__pyx_v__ec, PyObject *__pyx_v__et, PyObject *__pyx_v__ei); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_2show(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_4reveal(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_4type___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_6source___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_6handle___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_2pv___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_9errorCode___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_9errorText___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_9errorInfo___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self); /* 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 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_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_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 PyObject *__pyx_pf_6PyCafe_6pvdata_13pythonVersion___get__(struct __pyx_obj_6PyCafe_pvdata *__pyx_v_self); /* 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 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_4init(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_6withExceptions(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_exceptions); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_8open(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_10openNoWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_12openPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_14openGroupPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16openMonitorPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_18setOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_20getOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_22openNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_24openNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_26openGroupNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_28openMonitorNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_30openMonitorNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_32_ca_pend_event(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_34_ca_pend_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_36_ca_poll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_38_ca_flush_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_40setChannelRequestPolicyGet(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_42setCallbackGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_44setCallbackPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_46setTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_48getTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_50getTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_52setSelfGoverningTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_54setSGTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_56getSGTimeoutGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_58getSGTimeoutPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_60setSGSelfGoverningTimeout(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_62attachContext(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_64loadCollectionsFromXML(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED char const *__pyx_v_fileName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_66loadGroupsFromXML(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED char const *__pyx_v_fileName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_68groupList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_70getMonitorIDInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_72getDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_74getDbrDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_76getDbrBaseInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_78getHandlesFromWithinGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_80close(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_82closeChannels(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_84allConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_86isConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_88printDisconnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_90printDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_92printHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_94printHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_96printHandlesV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_98getDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_100getStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_102getStatusCodeAsText(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_104getStatusInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_106getStatusMsg(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_108getStatus(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_110getAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_112getTimeStamp(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_114getTimeStampAsDate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_116checkForHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_118checkForHandleList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pvList, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_120checkForGroupHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gName, int __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_122getPVNameFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_124getHandleFromPVName(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_126getChannelInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_128getChannelList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_listStrings); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_130getEnumFromString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_enumString); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_132getStringFromEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_enumValue); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_134loadSFGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_136loadSFGroupsWithBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_VA); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_138setDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, DBR_TYPE __pyx_v_dbrBase); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_140getDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_142setGetCacheWaitPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetCacheWaitPolicyKind __pyx_v_wpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_144setGetCacheWaitPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetCacheWaitPolicyKind __pyx_v_wpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_146setGetActionWhenMonitorPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_148setGetActionWhenMonitorPolicyAllHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_150getNonBlocking(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_152getStr(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_154getInt(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_156getFloat(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_158get(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_160getIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_162getFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_164getStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_166getList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_168getStrArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_170getIntArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_172getFloatArray(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_174getArray(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_176getPVInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_178getPVFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_180getPVStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_182getPV(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_184getPVStrList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_186getPVIntList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_188getPVFloatList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_190getPVList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_192printStatusIfError(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_statusList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_194getAsyn(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_196waitForGetEvent(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_198waitForBundledEvents(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_200getStrScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_202getIntScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_204getFloatScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_206getScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_208getCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_210getCompoundPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_212getStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_214getIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_216getFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_218getCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_220getStrArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_222getIntArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_224getFloatArrayCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_art); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_226getArrayCache(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_228getPVStrCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_230getPVIntCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_232getPVFloatCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_234getPVCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_236getCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_238getCtrlCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_240groupMonitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_242getMonitorPolicyVector(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v__monid); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_244groupMonitorStart(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); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_246groupMonitorStartWithCBList(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); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_248getGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_250getGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_252getGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_254getGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_256getGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_258getPVGroupStr(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_260getPVGroupInt(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_262getPVGroupFloat(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_264getPVGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_266getPVGroupCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_dt); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_268PVGroupValuesToList(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_270groupMemberList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gname); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_272grouping(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_274defineGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname, PyObject *__pyx_v__pvlist); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_276groupOpen(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_278groupClose(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_280getNoMonitors(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_282getMonitorIDs(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_284monitorStart(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); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_286monitorStop(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_mpid); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_288monitorStopAll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_290set(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_valSet); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_292setScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_valList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_294setCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_vectorList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_296setGroup(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_ghandleName, PyObject *__pyx_v_vectorList); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_298setAndMatchMany(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_300setAndMatch(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_302matchMany(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_304match(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_306setNelemCtrl(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_308setNelem(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, unsigned int __pyx_v_nelem); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_310setNelemToNative(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_312setNelemToRetrieveFromCacheToOne(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_314setNelemToRetrieveFromCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_netrfc); /* proto */ +static PyObject *__pyx_pf_6PyCafe_6CyCafe_316terminate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self); /* 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_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 PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */ +static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ +static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* 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 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 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_tp_new_6PyCafe__finalizer(PyTypeObject *t, PyObject *a, PyObject *k); /*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__epicsTimeStampAsDate(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_CyCafeException(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_CyCafe(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 PyObject *__pyx_float_0_5; +static PyObject *__pyx_float_0_01; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_3; +static PyObject *__pyx_int_4; +static PyObject *__pyx_int_6; +static PyObject *__pyx_int_40; +static PyObject *__pyx_int_neg_1; +static DBR_TYPE __pyx_k__189; +static unsigned int __pyx_k__190; +static DBR_TYPE __pyx_k__193; +static unsigned int __pyx_k__194; +static DBR_TYPE __pyx_k__215; +static unsigned int __pyx_k__216; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_slice__91; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__15; +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__23; +static PyObject *__pyx_tuple__24; +static PyObject *__pyx_tuple__25; +static PyObject *__pyx_tuple__26; +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__36; +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__42; +static PyObject *__pyx_tuple__43; +static PyObject *__pyx_tuple__44; +static PyObject *__pyx_tuple__45; +static PyObject *__pyx_tuple__46; +static PyObject *__pyx_tuple__47; +static PyObject *__pyx_tuple__48; +static PyObject *__pyx_tuple__49; +static PyObject *__pyx_tuple__50; +static PyObject *__pyx_tuple__51; +static PyObject *__pyx_tuple__52; +static PyObject *__pyx_tuple__53; +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__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__92; +static PyObject *__pyx_tuple__94; +static PyObject *__pyx_tuple__95; +static PyObject *__pyx_tuple__96; +static PyObject *__pyx_tuple__97; +static PyObject *__pyx_tuple__99; +static PyObject *__pyx_slice__102; +static PyObject *__pyx_slice__106; +static PyObject *__pyx_slice__117; +static PyObject *__pyx_slice__267; +static PyObject *__pyx_slice__268; +static PyObject *__pyx_slice__269; +static PyObject *__pyx_tuple__100; +static PyObject *__pyx_tuple__101; +static PyObject *__pyx_tuple__103; +static PyObject *__pyx_tuple__104; +static PyObject *__pyx_tuple__105; +static PyObject *__pyx_tuple__107; +static PyObject *__pyx_tuple__110; +static PyObject *__pyx_tuple__111; +static PyObject *__pyx_tuple__112; +static PyObject *__pyx_tuple__114; +static PyObject *__pyx_tuple__115; +static PyObject *__pyx_tuple__116; +static PyObject *__pyx_tuple__118; +static PyObject *__pyx_tuple__119; +static PyObject *__pyx_tuple__121; +static PyObject *__pyx_tuple__123; +static PyObject *__pyx_tuple__124; +static PyObject *__pyx_tuple__125; +static PyObject *__pyx_tuple__126; +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__138; +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__169; +static PyObject *__pyx_tuple__170; +static PyObject *__pyx_tuple__171; +static PyObject *__pyx_tuple__172; +static PyObject *__pyx_tuple__173; +static PyObject *__pyx_tuple__174; +static PyObject *__pyx_tuple__175; +static PyObject *__pyx_tuple__176; +static PyObject *__pyx_tuple__177; +static PyObject *__pyx_tuple__178; +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_tuple__185; +static PyObject *__pyx_tuple__186; +static PyObject *__pyx_tuple__187; +static PyObject *__pyx_tuple__188; +static PyObject *__pyx_tuple__191; +static PyObject *__pyx_tuple__192; +static PyObject *__pyx_tuple__195; +static PyObject *__pyx_tuple__196; +static PyObject *__pyx_tuple__197; +static PyObject *__pyx_tuple__198; +static PyObject *__pyx_tuple__200; +static PyObject *__pyx_tuple__201; +static PyObject *__pyx_tuple__202; +static PyObject *__pyx_tuple__203; +static PyObject *__pyx_tuple__204; +static PyObject *__pyx_tuple__205; +static PyObject *__pyx_tuple__207; +static PyObject *__pyx_tuple__208; +static PyObject *__pyx_tuple__209; +static PyObject *__pyx_tuple__210; +static PyObject *__pyx_tuple__211; +static PyObject *__pyx_tuple__214; +static PyObject *__pyx_tuple__217; +static PyObject *__pyx_tuple__218; +static PyObject *__pyx_tuple__219; +static PyObject *__pyx_tuple__220; +static PyObject *__pyx_tuple__221; +static PyObject *__pyx_tuple__222; +static PyObject *__pyx_tuple__223; +static PyObject *__pyx_tuple__224; +static PyObject *__pyx_tuple__225; +static PyObject *__pyx_tuple__226; +static PyObject *__pyx_tuple__227; +static PyObject *__pyx_tuple__228; +static PyObject *__pyx_tuple__229; +static PyObject *__pyx_tuple__230; +static PyObject *__pyx_tuple__231; +static PyObject *__pyx_tuple__232; +static PyObject *__pyx_tuple__233; +static PyObject *__pyx_tuple__234; +static PyObject *__pyx_tuple__235; +static PyObject *__pyx_tuple__237; +static PyObject *__pyx_tuple__238; +static PyObject *__pyx_tuple__239; +static PyObject *__pyx_tuple__240; +static PyObject *__pyx_tuple__241; +static PyObject *__pyx_tuple__242; +static PyObject *__pyx_tuple__243; +static PyObject *__pyx_tuple__244; +static PyObject *__pyx_tuple__245; +static PyObject *__pyx_tuple__246; +static PyObject *__pyx_tuple__247; +static PyObject *__pyx_tuple__248; +static PyObject *__pyx_tuple__249; +static PyObject *__pyx_tuple__250; +static PyObject *__pyx_tuple__251; +static PyObject *__pyx_tuple__252; +static PyObject *__pyx_tuple__253; +static PyObject *__pyx_tuple__254; +static PyObject *__pyx_tuple__255; +static PyObject *__pyx_tuple__256; +static PyObject *__pyx_tuple__257; +static PyObject *__pyx_tuple__258; +static PyObject *__pyx_tuple__259; +static PyObject *__pyx_tuple__260; +static PyObject *__pyx_tuple__261; +static PyObject *__pyx_tuple__262; +static PyObject *__pyx_tuple__263; +static PyObject *__pyx_tuple__264; +static PyObject *__pyx_tuple__265; +static PyObject *__pyx_tuple__266; +static PyObject *__pyx_tuple__270; +static PyObject *__pyx_tuple__271; +static PyObject *__pyx_tuple__272; +static PyObject *__pyx_tuple__274; +static PyObject *__pyx_tuple__275; +static PyObject *__pyx_tuple__276; +static PyObject *__pyx_tuple__277; +static PyObject *__pyx_tuple__278; +static PyObject *__pyx_codeobj__273; + +/* "PyCafeDefs.pxi":2 + * + * def show(): # <<<<<<<<<<<<<< + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_1show(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyMethodDef __pyx_mdef_6PyCafe_1show = {"show", (PyCFunction)__pyx_pw_6PyCafe_1show, METH_NOARGS, 0}; +static PyObject *__pyx_pw_6PyCafe_1show(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("show (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_show(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_show(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":3 + * + * def show(): + * print ("cafe=PyCafe.CyCafe()") # <<<<<<<<<<<<<< + * print ("cyca=PyCafe.CyCa()") + * print ("cafe.init()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":4 + * def show(): + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") # <<<<<<<<<<<<<< + * print ("cafe.init()") + * print ("cafe.openNoWait()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":5 + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") + * print ("cafe.init()") # <<<<<<<<<<<<<< + * print ("cafe.openNoWait()") + * print ("=cafe.open()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":6 + * print ("cyca=PyCafe.CyCa()") + * print ("cafe.init()") + * print ("cafe.openNoWait()") # <<<<<<<<<<<<<< + * print ("=cafe.open()") + * print ("cafe.openNowAndWait(timeout)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":7 + * print ("cafe.init()") + * print ("cafe.openNoWait()") + * print ("=cafe.open()") # <<<<<<<<<<<<<< + * print ("cafe.openNowAndWait(timeout)") + * print ("cafe.openNow()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":8 + * print ("cafe.openNoWait()") + * print ("=cafe.open()") + * print ("cafe.openNowAndWait(timeout)") # <<<<<<<<<<<<<< + * print ("cafe.openNow()") + * print ("cafe.close(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":9 + * print ("=cafe.open()") + * print ("cafe.openNowAndWait(timeout)") + * print ("cafe.openNow()") # <<<<<<<<<<<<<< + * print ("cafe.close(handlePV=)") + * print ("cafe.closeChannels()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":10 + * print ("cafe.openNowAndWait(timeout)") + * print ("cafe.openNow()") + * print ("cafe.close(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.closeChannels()") + * print ("cafe.allConnected()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":11 + * print ("cafe.openNow()") + * print ("cafe.close(handlePV=)") + * print ("cafe.closeChannels()") # <<<<<<<<<<<<<< + * print ("cafe.allConnected()") + * print ("cafe.isConnected(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":12 + * print ("cafe.close(handlePV=)") + * print ("cafe.closeChannels()") + * print ("cafe.allConnected()") # <<<<<<<<<<<<<< + * print ("cafe.isConnected(handlePV=)") + * print ("cafe.printDisconnected()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":13 + * print ("cafe.closeChannels()") + * print ("cafe.allConnected()") + * print ("cafe.isConnected(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.printDisconnected()") + * print ("cafe.printHandles()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":14 + * print ("cafe.allConnected()") + * print ("cafe.isConnected(handlePV=)") + * print ("cafe.printDisconnected()") # <<<<<<<<<<<<<< + * print ("cafe.printHandles()") + * print ("cafe.printHandle(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":15 + * print ("cafe.isConnected(handlePV=)") + * print ("cafe.printDisconnected()") + * print ("cafe.printHandles()") # <<<<<<<<<<<<<< + * print ("cafe.printHandle(handlePV=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":16 + * print ("cafe.printDisconnected()") + * print ("cafe.printHandles()") + * print ("cafe.printHandle(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getStatus(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":18 + * print ("cafe.printHandle(handlePV=)") + * + * print ("cafe.getStatus(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getAlarmStatusSeverity(handlePV=)") + * print ("cafe.getTimeStamp(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":19 + * + * print ("cafe.getStatus(handlePV=)") + * print ("cafe.getAlarmStatusSeverity(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getTimeStamp(handlePV=)") + * print ("cafe.getTimeStampDate(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":20 + * print ("cafe.getStatus(handlePV=)") + * print ("cafe.getAlarmStatusSeverity(handlePV=)") + * print ("cafe.getTimeStamp(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getTimeStampDate(handlePV=)") + * print ("cafe.checkForHandle()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":21 + * print ("cafe.getAlarmStatusSeverity(handlePV=)") + * print ("cafe.getTimeStamp(handlePV=)") + * print ("cafe.getTimeStampDate(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.checkForHandle()") + * print ("cafe.checkForHandleList()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":22 + * print ("cafe.getTimeStamp(handlePV=)") + * print ("cafe.getTimeStampDate(handlePV=)") + * print ("cafe.checkForHandle()") # <<<<<<<<<<<<<< + * print ("cafe.checkForHandleList()") + * print ("cafe.checkForGroupHandle()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":23 + * print ("cafe.getTimeStampDate(handlePV=)") + * print ("cafe.checkForHandle()") + * print ("cafe.checkForHandleList()") # <<<<<<<<<<<<<< + * print ("cafe.checkForGroupHandle()") + * print ("cafe.getPVNameFromHandle(int)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":24 + * print ("cafe.checkForHandle()") + * print ("cafe.checkForHandleList()") + * print ("cafe.checkForGroupHandle()") # <<<<<<<<<<<<<< + * print ("cafe.getPVNameFromHandle(int)") + * print ("cafe.getHandleFromPVName(str)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":25 + * print ("cafe.checkForHandleList()") + * print ("cafe.checkForGroupHandle()") + * print ("cafe.getPVNameFromHandle(int)") # <<<<<<<<<<<<<< + * print ("cafe.getHandleFromPVName(str)") + * print ("cafe.getChannelInfo(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":26 + * print ("cafe.checkForGroupHandle()") + * print ("cafe.getPVNameFromHandle(int)") + * print ("cafe.getHandleFromPVName(str)") # <<<<<<<<<<<<<< + * print ("cafe.getChannelInfo(handlePV=)") + * print ("cafe.setDbrBase(handlePV=, unsigned int)") #dbrBase.DBR_XXX + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":27 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":28 + * print ("cafe.getHandleFromPVName(str)") + * print ("cafe.getChannelInfo(handlePV=)") + * print ("cafe.setDbrBase(handlePV=, unsigned int)") #dbrBase.DBR_XXX # <<<<<<<<<<<<<< + * print ("cafe.getDbrBase(handlePV=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":29 + * print ("cafe.getChannelInfo(handlePV=)") + * print ("cafe.setDbrBase(handlePV=, unsigned int)") #dbrBase.DBR_XXX + * print ("cafe.getDbrBase(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getNonBlocking(handlePV=)") #followed by getCache + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":31 + * 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'>)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":32 + * + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":33 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":34 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":35 + * print ("cafe.get(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getInt(handlePV=)") + * print ("cafe.getFloathandlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getStr(handlePV=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":36 + * print ("cafe.getInt(handlePV=)") + * print ("cafe.getFloathandlePV=)") + * print ("cafe.getStr(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getList(handlePV=)") # return List in native type + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":38 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":39 + * + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":40 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":41 + * print ("cafe.getList(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getIntList(handlePV=)") + * print ("cafe.getFloatList(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getStrList(handlePV=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":42 + * 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 + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":46 + * # 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":47 + * # 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":48 + * print ("cafe.getArray(handlePV=)") + * print ("cafe.getArray(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArray(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * print ("cafe.getFloatArray(handlePV=,asnumpy=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":49 + * print ("cafe.getArray(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArray(handlePV=,asnumpy=)") + * print ("cafe.getFloatArray(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":52 + * + * + * print ("cafe.getPV(handlePV=)") # return PVData in native type # <<<<<<<<<<<<<< + * print ("cafe.getPV(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVInt(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":53 + * + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":54 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":55 + * print ("cafe.getPV(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVInt(handlePV=)") + * print ("cafe.getPVFloat(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getPVStr(handlePV=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":56 + * print ("cafe.getPVInt(handlePV=)") + * print ("cafe.getPVFloat(handlePV=)") + * print ("cafe.getPVStr(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getPVList(handleList=)") # return Array of PVData in native type + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":58 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":59 + * + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":60 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":61 + * print ("cafe.getPVList(handleList=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVIntList(handleList=)") + * print ("cafe.getPVFloatList(handleList=)") # <<<<<<<<<<<<<< + * print ("cafe.getPVStrList(handleList=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":62 + * print ("cafe.getPVIntList(handleList=)") + * print ("cafe.getPVFloatList(handleList=)") + * print ("cafe.getPVStrList(handleList=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getScalarList(handleList=)") # return List in native type + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":64 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":65 + * + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":66 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":67 + * print ("cafe.getScalarList(handleList=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getIntScalarList(handleList=)") + * print ("cafe.getFloatScalarList(handleList=)") # <<<<<<<<<<<<<< + * print ("cafe.getStrScalarList(handleList=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":68 + * print ("cafe.getIntScalarList(handleList=)") + * print ("cafe.getFloatScalarList(handleList=)") + * print ("cafe.getStrScalarList(handleList=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getPVCache(handlePV=)") # return PVData in native type + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":70 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":71 + * + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":72 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":73 + * print ("cafe.getPVCache(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVIntCache(handlePV=)") + * print ("cafe.getPVFloatCache(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getPVStrCache(handlePV=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":74 + * print ("cafe.getPVIntCache(handlePV=)") + * print ("cafe.getPVFloatCache(handlePV=)") + * print ("cafe.getPVStrCache(handlePV=)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":79 + * # 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":80 + * # 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":81 + * print ("cafe.getArrayCache(handlePV=)") + * print ("cafe.getArrayCache(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArrayCache(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * print ("cafe.getFloatArrayCache(handlePV=,asnumpy=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":82 + * print ("cafe.getArrayCache(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArrayCache(handlePV=,asnumpy=)") + * print ("cafe.getFloatArrayCache(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getCtrl(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":84 + * print ("cafe.getFloatArrayCache(handlePV=,asnumpy=)") + * + * print ("cafe.getCtrl(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getCtrl(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getCtrlCache(handlePV=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":85 + * + * 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'>)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":86 + * 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'>)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":87 + * 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)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":89 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":90 + * + * 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=)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":91 + * 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=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":93 + * print ("cafe.monitorStopAll(handlePV=)") + * + * print ("cafe.getNoMonitors(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.set(handlePV=, valSet)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":95 + * print ("cafe.getNoMonitors(handlePV=)") + * + * print ("cafe.set(handlePV=, valSet)") # <<<<<<<<<<<<<< + * print ("cafe.setScalarList(handleList=, valList)") + * print ("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":96 + * + * print ("cafe.set(handlePV=, valSet)") + * print ("cafe.setScalarList(handleList=, valList)") # <<<<<<<<<<<<<< + * print ("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ + * tolerance= , timeout=, printFlag=)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":97 + * print ("cafe.set(handlePV=, valSet)") + * print ("cafe.setScalarList(handleList=, valList)") + * print ("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ # <<<<<<<<<<<<<< + * tolerance= , timeout=, printFlag=)") + * #Synchronous groups + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":100 + * tolerance= , timeout=, printFlag=)") + * #Synchronous groups + * print ("ghandle = groupings(char * gname, list _pvlist)") # <<<<<<<<<<<<<< + * print ("ghandle = groupopen(char * gname)") + * print ("status = groupClose()") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":101 + * #Synchronous groups + * print ("ghandle = groupings(char * gname, list _pvlist)") + * print ("ghandle = groupopen(char * gname)") # <<<<<<<<<<<<<< + * print ("status = groupClose()") + * print ("handleList[]=cafe.defineGroup(gname, pvList)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":102 + * 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)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":103 + * 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')") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":104 + * 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')") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":105 + * 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)") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":106 + * 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)") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":107 + * print ("vectorList,status,statusList = cafe.getGroup(ghandleName, dt='native')") + * print ("pvdataList[],status = cafe.getPVGroup(ghandleName, dt='native')") + * print ("cafe.setGroup(ghandleName, vectorList)") # <<<<<<<<<<<<<< + * + * return + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":109 + * print ("cafe.setGroup(ghandleName, vectorList)") + * + * return # <<<<<<<<<<<<<< + * + * #define threshold + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":2 + * + * def show(): # <<<<<<<<<<<<<< + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":146 + * #***********api*************** + * + * 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) + */ + +static void __pyx_f_6PyCafe_py_cb_wrapper(PVDataHolder __pyx_v_pvd, unsigned int __pyx_v_handle, std::string __pyx_v_pvname) { + 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; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_wrapper", 0); + + /* "PyCafeDefs.pxi":147 + * + * 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: + */ + __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_pv1 = ((struct __pyx_obj_6PyCafe_pvdata *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":148 + * 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 + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_6PyCafe_py_cb); + __pyx_t_4 = __pyx_v_6PyCafe_py_cb; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __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(((PyObject *)__pyx_v_pv1)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pv1)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pv1)); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 2+__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_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __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.pxi":149 + * cdef pvdata pv1 = PVDataHolderToStruct(pvd) + * py_cb(pv1, handle, pvname) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafeDefs.pxi":150 + * py_cb(pv1, handle, pvname) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef api void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil: + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs.pxi":149 + * cdef pvdata pv1 = PVDataHolderToStruct(pvd) + * py_cb(pv1, handle, pvname) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs.pxi":146 + * #***********api*************** + * + * 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) + */ + + /* 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_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_pv1); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":152 + * 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) + */ + +static void __pyx_f_6PyCafe_py_cb_ctrl_wrapper(PVCtrlHolder __pyx_v_pvc, unsigned int __pyx_v_handle, std::string __pyx_v_pvname) { + struct __pyx_obj_6PyCafe_pvctrl *__pyx_v_c1 = 0; + __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; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_ctrl_wrapper", 0); + + /* "PyCafeDefs.pxi":153 + * + * 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: + */ + __pyx_t_1 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __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":154 + * 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 + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_6PyCafe_py_cb_ctrl); + __pyx_t_4 = __pyx_v_6PyCafe_py_cb_ctrl; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __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(((PyObject *)__pyx_v_c1)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_c1)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_c1)); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 2+__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_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __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.pxi":155 + * cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) + * py_cb_ctrl(c1, handle, pvname) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafeDefs.pxi":156 + * py_cb_ctrl(c1, handle, pvname) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef api void py_cb_handle_wrapper(unsigned int handle) with gil: + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs.pxi":155 + * cdef pvctrl c1 = PVCtrlHolderToStruct(pvc) + * py_cb_ctrl(c1, handle, pvname) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs.pxi":152 + * 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) + */ + + /* 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_ctrl_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_c1); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":158 + * return + * + * cdef api void py_cb_handle_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * + * py_cb_handle(handle) + */ + +static void __pyx_f_6PyCafe_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; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_wrapper", 0); + + /* "PyCafeDefs.pxi":160 + * cdef api void py_cb_handle_wrapper(unsigned int handle) with gil: + * + * py_cb_handle(handle) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __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 = NULL; + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":162 + * py_cb_handle(handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafeDefs.pxi":163 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef api void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs.pxi":162 + * py_cb_handle(handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs.pxi":158 + * return + * + * cdef api void py_cb_handle_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * + * 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_XDECREF(__pyx_t_5); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":165 + * return + * + * cdef api void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: # <<<<<<<<<<<<<< + * + * if monDictGlobal.has_key(monid): + */ + +static void __pyx_f_6PyCafe_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; + 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_monid_wrapper", 0); + + /* "PyCafeDefs.pxi":167 + * 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) + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "has_key"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyDict_Contains(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":168 + * + * if monDictGlobal.has_key(monid): + * cbobjt=monDictGlobal[monid] # <<<<<<<<<<<<<< + * cbobjt(handle) + * + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_monid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_cbobjt = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":169 + * if monDictGlobal.has_key(monid): + * cbobjt=monDictGlobal[monid] + * cbobjt(handle) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_cbobjt); + __pyx_t_5 = __pyx_v_cbobjt; __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_6) { + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __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 = NULL; + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafeDefs.pxi":167 + * 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) + */ + } + + /* "PyCafeDefs.pxi":171 + * cbobjt(handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafeDefs.pxi":172 + * + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L4_return; + } + + /* "PyCafeDefs.pxi":171 + * cbobjt(handle) + * + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L6; + } + __pyx_L4_return: { + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L6:; + } + } + + /* "PyCafeDefs.pxi":165 + * return + * + * cdef api void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil: # <<<<<<<<<<<<<< + * + * if monDictGlobal.has_key(monid): + */ + + /* function exit code */ + 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_7); + __Pyx_WriteUnraisable("PyCafe.py_cb_handle_monid_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_cbobjt); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":175 + * + * + * cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * py_cb_handle_get(handle) + * with nogil: + */ + +static void __pyx_f_6PyCafe_py_cb_handle_get_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; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_get_wrapper", 0); + + /* "PyCafeDefs.pxi":176 + * + * cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil: + * py_cb_handle_get(handle) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_py_cb_handle_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __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 = NULL; + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":177 + * cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil: + * py_cb_handle_get(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafeDefs.pxi":178 + * py_cb_handle_get(handle) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs.pxi":177 + * cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil: + * py_cb_handle_get(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs.pxi":175 + * + * + * cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * py_cb_handle_get(handle) + * with nogil: + */ + + /* 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_WriteUnraisable("PyCafe.py_cb_handle_get_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":180 + * return + * + * cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * py_cb_handle_put(handle) + * with nogil: + */ + +static void __pyx_f_6PyCafe_py_cb_handle_put_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; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("py_cb_handle_put_wrapper", 0); + + /* "PyCafeDefs.pxi":181 + * + * cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: + * py_cb_handle_put(handle) # <<<<<<<<<<<<<< + * with nogil: + * return + */ + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_py_cb_handle_put); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __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 = NULL; + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":182 + * cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: + * py_cb_handle_put(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafeDefs.pxi":183 + * py_cb_handle_put(handle) + * with nogil: + * return # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L3_return; + } + + /* "PyCafeDefs.pxi":182 + * cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: + * py_cb_handle_put(handle) + * with nogil: # <<<<<<<<<<<<<< + * return + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L3_return: { + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L0; + } + __pyx_L5:; + } + } + + /* "PyCafeDefs.pxi":180 + * return + * + * cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil: # <<<<<<<<<<<<<< + * py_cb_handle_put(handle) + * with nogil: + */ + + /* 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_WriteUnraisable("PyCafe.py_cb_handle_put_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "PyCafeDefs.pxi":200 + * cdef class _finalizer: + * cdef void *_data + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._data is not NULL: + * free(self._data) + */ + +/* Python wrapper */ +static void __pyx_pw_6PyCafe_10_finalizer_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_6PyCafe_10_finalizer_1__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_6PyCafe_10_finalizer___dealloc__(((struct __pyx_obj_6PyCafe__finalizer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_6PyCafe_10_finalizer___dealloc__(struct __pyx_obj_6PyCafe__finalizer *__pyx_v_self) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "PyCafeDefs.pxi":201 + * cdef void *_data + * def __dealloc__(self): + * if self._data is not NULL: # <<<<<<<<<<<<<< + * free(self._data) + * return + */ + __pyx_t_1 = ((__pyx_v_self->_data != NULL) != 0); + if (__pyx_t_1) { + + /* "PyCafeDefs.pxi":202 + * def __dealloc__(self): + * if self._data is not NULL: + * free(self._data) # <<<<<<<<<<<<<< + * return + * + */ + free(__pyx_v_self->_data); + + /* "PyCafeDefs.pxi":201 + * cdef void *_data + * def __dealloc__(self): + * if self._data is not NULL: # <<<<<<<<<<<<<< + * free(self._data) + * return + */ + } + + /* "PyCafeDefs.pxi":203 + * if self._data is not NULL: + * free(self._data) + * return # <<<<<<<<<<<<<< + * + * cdef void set_base(cnp.ndarray arr, void * carr): + */ + goto __pyx_L0; + + /* "PyCafeDefs.pxi":200 + * cdef class _finalizer: + * cdef void *_data + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._data is not NULL: + * free(self._data) + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); +} + +/* "PyCafeDefs.pxi":205 + * return + * + * cdef void set_base(cnp.ndarray arr, void * carr): # <<<<<<<<<<<<<< + * cdef _finalizer fin = _finalizer() + * fin._data = carr + */ + +static void __pyx_f_6PyCafe_set_base(PyArrayObject *__pyx_v_arr, void *__pyx_v_carr) { + struct __pyx_obj_6PyCafe__finalizer *__pyx_v_fin = 0; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_base", 0); + + /* "PyCafeDefs.pxi":206 + * + * cdef void set_base(cnp.ndarray arr, void * carr): + * cdef _finalizer fin = _finalizer() # <<<<<<<<<<<<<< + * fin._data = carr + * cnp.set_array_base(arr, fin) + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe__finalizer), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_fin = ((struct __pyx_obj_6PyCafe__finalizer *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":207 + * cdef void set_base(cnp.ndarray arr, void * carr): + * cdef _finalizer fin = _finalizer() + * fin._data = carr # <<<<<<<<<<<<<< + * cnp.set_array_base(arr, fin) + * return + */ + __pyx_v_fin->_data = ((void *)__pyx_v_carr); + + /* "PyCafeDefs.pxi":208 + * cdef _finalizer fin = _finalizer() + * fin._data = carr + * cnp.set_array_base(arr, fin) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_f_5numpy_set_array_base(__pyx_v_arr, ((PyObject *)__pyx_v_fin)); + + /* "PyCafeDefs.pxi":209 + * fin._data = carr + * cnp.set_array_base(arr, fin) + * return # <<<<<<<<<<<<<< + * + * cdef class CyCa: + */ + goto __pyx_L0; + + /* "PyCafeDefs.pxi":205 + * return + * + * cdef void set_base(cnp.ndarray arr, void * carr): # <<<<<<<<<<<<<< + * cdef _finalizer fin = _finalizer() + * fin._data = carr + */ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_WriteUnraisable("PyCafe.set_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0); + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_fin); + __Pyx_RefNannyFinishContext(); +} + +/* "PyCafeDefs.pxi":397 + * + * + * 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":399 + * def __cinit__(self): + * + * self.CY_ECA_TIMEOUT =ECA_TIMEOUT # <<<<<<<<<<<<<< + * + * self.ICAFE_NORMAL =ICAFE_NORMAL + */ + __pyx_v_self->CY_ECA_TIMEOUT = ECA_TIMEOUT; + + /* "PyCafeDefs.pxi":401 + * self.CY_ECA_TIMEOUT =ECA_TIMEOUT + * + * self.ICAFE_NORMAL =ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.ICAFE_SUCCESS =ICAFE_SUCCESS + * + */ + __pyx_v_self->ICAFE_NORMAL = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":402 + * + * 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":404 + * 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":405 + * + * 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":406 + * 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":407 + * 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":408 + * 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":409 + * 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":411 + * 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":412 + * + * 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":413 + * 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":414 + * 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":415 + * 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":416 + * 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":417 + * 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":418 + * 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_MONITOR_DELAYED_AS_CONN_DOWN = ICAFE_MONITOR_DELAYED_AS_CONN_DOWN; + + /* "PyCafeDefs.pxi":419 + * 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_CA_OP_GET =ICAFE_CA_OP_GET + */ + __pyx_v_self->ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE = ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE; + + /* "PyCafeDefs.pxi":421 + * self.ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE =ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * + * 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":422 + * + * 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":423 + * 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":424 + * 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":425 + * 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":426 + * 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":427 + * 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":428 + * 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":430 + * 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":431 + * + * 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":433 + * 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":434 + * + * 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":435 + * 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":436 + * 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":437 + * 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":438 + * 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":439 + * 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":440 + * 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":441 + * 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":442 + * 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":443 + * 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":444 + * 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":445 + * 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":446 + * 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":447 + * 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":448 + * 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":449 + * 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":450 + * 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":451 + * 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":452 + * 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":453 + * 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":454 + * 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":455 + * 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":456 + * 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":457 + * 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":458 + * 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":459 + * 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":460 + * 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":461 + * 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":462 + * 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":463 + * 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":464 + * 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":465 + * 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":466 + * 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":467 + * 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_TIMEOUT_SET_AND_MATCH = ECAFE_TIMEOUT_SET_AND_MATCH; + + /* "PyCafeDefs.pxi":468 + * 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_HANDLE_MISMATCH_SET_AND_MATCH = ECAFE_HANDLE_MISMATCH_SET_AND_MATCH; + + /* "PyCafeDefs.pxi":471 + * + * + * 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":472 + * + * 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":473 + * 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":474 + * 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":475 + * 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":476 + * 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":477 + * 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":478 + * 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":479 + * 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":480 + * 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. + */ + __pyx_v_self->CY_DBR_GR = DBR_GR; + + /* "PyCafeDefs.pxi":481 + * 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 + */ + __pyx_v_self->CY_DBR_CTRL = DBR_CTRL; + + /* "PyCafeDefs.pxi":482 + * 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, + */ + __pyx_v_self->CY_DBR_PUT = DBR_PUT; + + /* "PyCafeDefs.pxi":483 + * 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 + */ + __pyx_v_self->CY_DBR_STSACK = DBR_STSACK; + + /* "PyCafeDefs.pxi":484 + * 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 + */ + __pyx_v_self->CY_DBR_CLASS = DBR_CLASS; + + /* "PyCafeDefs.pxi":485 + * 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":486 + * 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":487 + * 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":488 + * 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":489 + * 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":490 + * 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":491 + * 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":492 + * 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) + */ + __pyx_v_self->CY_DBR_LONG = DBR_LONG; + + /* "PyCafeDefs.pxi":493 + * 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) + */ + __pyx_v_self->CY_DBR_DOUBLE = DBR_DOUBLE; + + /* "PyCafeDefs.pxi":494 + * 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) + */ + __pyx_v_self->CY_DBR_STS_STRING = DBR_STS_STRING; + + /* "PyCafeDefs.pxi":495 + * 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) + */ + __pyx_v_self->CY_DBR_STS_SHORT = DBR_STS_SHORT; + + /* "PyCafeDefs.pxi":496 + * 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) + */ + __pyx_v_self->CY_DBR_STS_INT = DBR_STS_INT; + + /* "PyCafeDefs.pxi":497 + * 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) + */ + __pyx_v_self->CY_DBR_STS_FLOAT = DBR_STS_FLOAT; + + /* "PyCafeDefs.pxi":498 + * 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) + */ + __pyx_v_self->CY_DBR_STS_ENUM = DBR_STS_ENUM; + + /* "PyCafeDefs.pxi":499 + * 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) + */ + __pyx_v_self->CY_DBR_STS_CHAR = DBR_STS_CHAR; + + /* "PyCafeDefs.pxi":500 + * 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) + */ + __pyx_v_self->CY_DBR_STS_LONG = DBR_STS_LONG; + + /* "PyCafeDefs.pxi":501 + * 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) + */ + __pyx_v_self->CY_DBR_STS_DOUBLE = DBR_STS_DOUBLE; + + /* "PyCafeDefs.pxi":502 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_STRING = DBR_TIME_STRING; + + /* "PyCafeDefs.pxi":503 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_SHORT = DBR_TIME_SHORT; + + /* "PyCafeDefs.pxi":504 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_INT = DBR_TIME_INT; + + /* "PyCafeDefs.pxi":505 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_FLOAT = DBR_TIME_FLOAT; + + /* "PyCafeDefs.pxi":506 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_ENUM = DBR_TIME_ENUM; + + /* "PyCafeDefs.pxi":507 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_CHAR = DBR_TIME_CHAR; + + /* "PyCafeDefs.pxi":508 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_LONG = DBR_TIME_LONG; + + /* "PyCafeDefs.pxi":509 + * 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) + */ + __pyx_v_self->CY_DBR_TIME_DOUBLE = DBR_TIME_DOUBLE; + + /* "PyCafeDefs.pxi":510 + * 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) + */ + __pyx_v_self->CY_DBR_GR_STRING = DBR_GR_STRING; + + /* "PyCafeDefs.pxi":511 + * 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) + */ + __pyx_v_self->CY_DBR_GR_SHORT = DBR_GR_SHORT; + + /* "PyCafeDefs.pxi":512 + * 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) + */ + __pyx_v_self->CY_DBR_GR_INT = DBR_GR_INT; + + /* "PyCafeDefs.pxi":513 + * 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) + */ + __pyx_v_self->CY_DBR_GR_FLOAT = DBR_GR_FLOAT; + + /* "PyCafeDefs.pxi":514 + * 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) + */ + __pyx_v_self->CY_DBR_GR_ENUM = DBR_GR_ENUM; + + /* "PyCafeDefs.pxi":515 + * 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) + */ + __pyx_v_self->CY_DBR_GR_CHAR = DBR_GR_CHAR; + + /* "PyCafeDefs.pxi":516 + * 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) + */ + __pyx_v_self->CY_DBR_GR_LONG = DBR_GR_LONG; + + /* "PyCafeDefs.pxi":517 + * 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) + */ + __pyx_v_self->CY_DBR_GR_DOUBLE = DBR_GR_DOUBLE; + + /* "PyCafeDefs.pxi":518 + * 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) + */ + __pyx_v_self->CY_DBR_CTRL_STRING = DBR_CTRL_STRING; + + /* "PyCafeDefs.pxi":519 + * 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) + */ + __pyx_v_self->CY_DBR_CTRL_SHORT = DBR_CTRL_SHORT; + + /* "PyCafeDefs.pxi":520 + * 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) + */ + __pyx_v_self->CY_DBR_CTRL_INT = DBR_CTRL_INT; + + /* "PyCafeDefs.pxi":521 + * 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) + */ + __pyx_v_self->CY_DBR_CTRL_FLOAT = DBR_CTRL_FLOAT; + + /* "PyCafeDefs.pxi":522 + * 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) + */ + __pyx_v_self->CY_DBR_CTRL_ENUM = DBR_CTRL_ENUM; + + /* "PyCafeDefs.pxi":523 + * 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) + */ + __pyx_v_self->CY_DBR_CTRL_CHAR = DBR_CTRL_CHAR; + + /* "PyCafeDefs.pxi":524 + * 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) + * + */ + __pyx_v_self->CY_DBR_CTRL_LONG = DBR_CTRL_LONG; + + /* "PyCafeDefs.pxi":525 + * 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: + */ + __pyx_v_self->CY_DBR_CTRL_DOUBLE = DBR_CTRL_DOUBLE; + + /* "PyCafeDefs.pxi":528 + * + * #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":529 + * #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":530 + * 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":533 + * + * #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":534 + * #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":535 + * 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":536 + * 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":539 + * + * #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":540 + * #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":541 + * 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":542 + * 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":543 + * 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":544 + * 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":545 + * 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":548 + * + * #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":549 + * #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":550 + * 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":551 + * 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":554 + * + * #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":555 + * #ChannelGetActionWhenMonitorPolicyKind: + * self.GET_FROM_CACHE = GET_FROM_CACHE + * self.GET_FROM_IOC = GET_FROM_IOC # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->GET_FROM_IOC = GET_FROM_IOC; + + /* "PyCafeDefs.pxi":559 + * + * #ChannelRequestDataTypePolicyKind: + * self.NATIVE_DATATYPE = NATIVE_DATATYPE # <<<<<<<<<<<<<< + * self.LOWEST_DATATYPE = LOWEST_DATATYPE # The smaller in byte size of type requested and native datatype + * + */ + __pyx_v_self->NATIVE_DATATYPE = NATIVE_DATATYPE; + + /* "PyCafeDefs.pxi":560 + * #ChannelRequestDataTypePolicyKind: + * self.NATIVE_DATATYPE = NATIVE_DATATYPE + * self.LOWEST_DATATYPE = LOWEST_DATATYPE # The smaller in byte size of type requested and native datatype # <<<<<<<<<<<<<< + * + * #ChannelWaitForResponsePolicyKind: + */ + __pyx_v_self->LOWEST_DATATYPE = LOWEST_DATATYPE; + + /* "PyCafeDefs.pxi":563 + * + * #ChannelWaitForResponsePolicyKind: + * self.BLOCKING =BLOCKING # <<<<<<<<<<<<<< + * self.WAIT =WAIT + * self.NON_BLOCKING =NON_BLOCKING + */ + __pyx_v_self->BLOCKING = BLOCKING; + + /* "PyCafeDefs.pxi":564 + * #ChannelWaitForResponsePolicyKind: + * self.BLOCKING =BLOCKING + * self.WAIT =WAIT # <<<<<<<<<<<<<< + * self.NON_BLOCKING =NON_BLOCKING + * self.NO_WAIT =NO_WAIT + */ + __pyx_v_self->WAIT = WAIT; + + /* "PyCafeDefs.pxi":565 + * 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":566 + * self.WAIT =WAIT + * self.NON_BLOCKING =NON_BLOCKING + * self.NO_WAIT =NO_WAIT # <<<<<<<<<<<<<< + * + * #StatusMessageKind: + */ + __pyx_v_self->NO_WAIT = NO_WAIT; + + /* "PyCafeDefs.pxi":569 + * + * #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":570 + * #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":571 + * 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":572 + * 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":573 + * 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":574 + * 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":577 + * + * #CallbackProgressKind: + * self.NOT_INITIATED=NOT_INITIATED # <<<<<<<<<<<<<< + * self.PENDING =PENDING + * self.COMPLETE =COMPLETE + */ + __pyx_v_self->NOT_INITIATED = NOT_INITIATED; + + /* "PyCafeDefs.pxi":578 + * #CallbackProgressKind: + * self.NOT_INITIATED=NOT_INITIATED + * self.PENDING =PENDING # <<<<<<<<<<<<<< + * self.COMPLETE =COMPLETE + * return + */ + __pyx_v_self->PENDING = PENDING; + + /* "PyCafeDefs.pxi":579 + * self.NOT_INITIATED=NOT_INITIATED + * self.PENDING =PENDING + * self.COMPLETE =COMPLETE # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->COMPLETE = COMPLETE; + + /* "PyCafeDefs.pxi":580 + * self.PENDING =PENDING + * self.COMPLETE =COMPLETE + * return # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":397 + * + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * + * self.CY_ECA_TIMEOUT =ECA_TIMEOUT + */ + + /* function exit code */ + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":212 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":213 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":214 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":215 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":216 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":217 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":218 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":219 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":220 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":221 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":222 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":223 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":224 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":225 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":226 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":227 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":228 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":229 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":230 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":231 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":232 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":233 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":234 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":235 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":236 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":237 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":238 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":239 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":240 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":241 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":242 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":243 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":244 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":245 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":246 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":247 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":248 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":249 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":250 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":251 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":252 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":253 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":254 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":255 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":256 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":257 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":258 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":259 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":260 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":261 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":262 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":263 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":264 + * 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) + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":265 + * 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) + * + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":266 + * 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 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":268 + * cpdef readonly unsigned int CY_DBR_CTRL_DOUBLE #returns a control double structure (dbr_ctrl_double) + * + * cpdef readonly int CY_ECA_TIMEOUT # <<<<<<<<<<<<<< + * + * cpdef readonly int ICAFE_CS_NEVER_CONN + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":270 + * cpdef readonly int CY_ECA_TIMEOUT + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":271 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":272 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":273 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":274 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":275 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":277 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":278 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":279 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":280 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":281 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":282 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":283 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":284 + * 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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":285 + * 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_CA_OP_GET + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":287 + * cpdef readonly int ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":288 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":289 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":290 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":291 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":292 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":293 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":294 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":296 + * cpdef readonly int ICAFE_CA_OP_CONN_UP + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":297 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":299 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":300 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":302 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":303 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":304 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":305 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":306 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":307 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":308 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":309 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":310 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":311 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":312 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":313 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":314 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":315 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":316 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":317 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":318 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":319 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":320 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":321 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":322 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":323 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":324 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":325 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":326 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":327 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":328 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":329 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":330 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":331 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":332 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":333 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":334 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":335 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":336 + * 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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":337 + * cpdef readonly int ECAFE_PVGROUP_GROUPHANDLE_MISMATCH + * cpdef readonly int ECAFE_TIMEOUT_SET_AND_MATCH + * cpdef readonly int ECAFE_HANDLE_MISMATCH_SET_AND_MATCH # <<<<<<<<<<<<<< + * + * #ctypedef enum ChannelRequestPolicyKind: + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":340 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":341 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":342 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":345 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":346 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":347 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":348 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":351 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":352 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":353 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":354 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":355 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":356 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":357 + * 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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":361 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":362 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":363 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":364 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":367 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":368 + * #ChannelGetActionWhenMonitorPolicyKind: + * cpdef readonly unsigned int GET_FROM_CACHE + * cpdef readonly unsigned int GET_FROM_IOC # <<<<<<<<<<<<<< + * + * + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":373 + * + * #ChannelRequestDataTypePolicyKind: + * cpdef readonly unsigned int NATIVE_DATATYPE # <<<<<<<<<<<<<< + * cpdef readonly unsigned int LOWEST_DATATYPE # The smaller in byte size of type requested and native 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":374 + * #ChannelRequestDataTypePolicyKind: + * cpdef readonly unsigned int NATIVE_DATATYPE + * cpdef readonly unsigned int LOWEST_DATATYPE # The smaller in byte size of type requested and native 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":377 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":378 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":379 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":380 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":383 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":384 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":385 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":386 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":387 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":388 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":391 + * + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":392 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":393 + * cpdef readonly unsigned int NOT_INITIATED + * cpdef readonly unsigned int PENDING + * cpdef readonly unsigned int COMPLETE # <<<<<<<<<<<<<< + * + * + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":601 + * 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; + std::string __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":602 + * + * def __cinit__(self): + * self.channelID=0 # <<<<<<<<<<<<<< + * self.connectFlag=False + * self.hostName=(("")).encode('UTF-8') + */ + __pyx_v_self->channelID = 0; + + /* "PyCafeDefs.pxi":603 + * def __cinit__(self): + * self.channelID=0 + * self.connectFlag=False # <<<<<<<<<<<<<< + * self.hostName=(("")).encode('UTF-8') + * self.nelem=0 + */ + __pyx_v_self->connectFlag = 0; + + /* "PyCafeDefs.pxi":604 + * self.channelID=0 + * self.connectFlag=False + * self.hostName=(("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.nelem=0 + * self.dataType=ICAFE_TYPENOTCONN + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__85, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->hostName = __pyx_t_3; + + /* "PyCafeDefs.pxi":605 + * self.connectFlag=False + * self.hostName=(("")).encode('UTF-8') + * self.nelem=0 # <<<<<<<<<<<<<< + * self.dataType=ICAFE_TYPENOTCONN + * self.accessRead=0 + */ + __pyx_v_self->nelem = 0; + + /* "PyCafeDefs.pxi":606 + * self.hostName=(("")).encode('UTF-8') + * self.nelem=0 + * self.dataType=ICAFE_TYPENOTCONN # <<<<<<<<<<<<<< + * self.accessRead=0 + * self.accessWrite=0 + */ + __pyx_v_self->dataType = ICAFE_TYPENOTCONN; + + /* "PyCafeDefs.pxi":607 + * self.nelem=0 + * self.dataType=ICAFE_TYPENOTCONN + * self.accessRead=0 # <<<<<<<<<<<<<< + * self.accessWrite=0 + * self.className=(("")).encode('UTF-8') + */ + __pyx_v_self->accessRead = 0; + + /* "PyCafeDefs.pxi":608 + * self.dataType=ICAFE_TYPENOTCONN + * self.accessRead=0 + * self.accessWrite=0 # <<<<<<<<<<<<<< + * self.className=(("")).encode('UTF-8') + * self.connectionState=ICAFE_CA_OP_CONN_DOWN + */ + __pyx_v_self->accessWrite = 0; + + /* "PyCafeDefs.pxi":609 + * self.accessRead=0 + * self.accessWrite=0 + * self.className=(("")).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__85, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->className = __pyx_t_3; + + /* "PyCafeDefs.pxi":610 + * 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') + */ + __pyx_v_self->connectionState = ICAFE_CA_OP_CONN_DOWN; + + /* "PyCafeDefs.pxi":611 + * 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') + */ + __pyx_v_self->cafeConnectionState = ICAFE_CS_NEVER_CONN; + + /* "PyCafeDefs.pxi":612 + * 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') + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_CA_OP_CONN_DOWN, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->connectionStateAsString = __pyx_t_3; + + /* "PyCafeDefs.pxi":613 + * 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): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_ICAFE_CS_NEVER_CONN, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->cafeConnectionStateAsString = __pyx_t_3; + + /* "PyCafeDefs.pxi":601 + * 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_AddTraceback("PyCafe.channelInfo.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":615 + * self.cafeConnectionStateAsString=(('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + * def show(self): # <<<<<<<<<<<<<< + * print ("channelID = %x" % 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; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":616 + * + * def show(self): + * print ("channelID = %x" % 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_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_channelID_x, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __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":617 + * def show(self): + * print ("channelID = %x" % 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_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __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":618 + * print ("channelID = %x" % 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)) + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->hostName); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_hostName_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __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":619 + * 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) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __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":620 + * 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) + */ + __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_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->dataType); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __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 = PyUnicode_Format(__pyx_kp_u_dataType_s_d, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __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.pxi":621 + * 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) + */ + __pyx_t_2 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessRead); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_accessRead_d, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":622 + * 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)) + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->accessWrite); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_accessWrite_d, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __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.pxi":623 + * 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_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_className_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":626 + * #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 + */ + __pyx_t_3 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->caop.message(__pyx_v_self->connectionState)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->connectionState); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_connectionState_s_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __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":627 + * #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 + * + */ + __pyx_t_2 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->csc.message(__pyx_v_self->cafeConnectionState)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->cafeConnectionState); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_cafeConnectionState_s_d, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __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.pxi":628 + * print ("connectionState = %s (%d)" % (self.caop.message(self.connectionState),self.connectionState)) + * 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":615 + * self.cafeConnectionStateAsString=(('ICAFE_CS_NEVER_CONN')).encode('UTF-8') + * + * def show(self): # <<<<<<<<<<<<<< + * print ("channelID = %x" % 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_3); + __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":585 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":586 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->connectFlag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":587 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":588 + * cdef readonly bint connectFlag + * cdef readonly string hostName + * cdef readonly unsigned int nelem #native # <<<<<<<<<<<<<< + * cdef readonly int dataType; #native + * cdef readonly unsigned short accessRead; #0 or 1 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":589 + * cdef readonly string hostName + * cdef readonly unsigned int nelem #native + * cdef readonly int dataType; #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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":590 + * cdef readonly unsigned int nelem #native + * cdef readonly int dataType; #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":591 + * cdef readonly int dataType; #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":592 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":593 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":594 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":595 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":596 + * 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 + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; +} + +/* "PyCafeDefs.pxi":637 + * 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 + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_21_epicsTimeStampAsDate_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_21_epicsTimeStampAsDate_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct epicsTimeStamp __pyx_v_ts; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ts,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); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ts)) != 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, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __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_ts = __pyx_convert__from_py_epicsTimeStamp(values[0]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe._epicsTimeStampAsDate.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_21_epicsTimeStampAsDate___cinit__(((struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *)__pyx_v_self), __pyx_v_ts); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_21_epicsTimeStampAsDate___cinit__(struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *__pyx_v_self, struct epicsTimeStamp __pyx_v_ts) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":638 + * 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) + */ + __pyx_v_self->_time = new epicsTime(__pyx_v_ts); + + /* "PyCafeDefs.pxi":640 + * self._time = new epicsTime(ts) + * #This gives warning: dereferencing type-punned pointer will break strict-aliasing rules + * self.local = (self._time) # <<<<<<<<<<<<<< + * + * #print ("ts====== ", ts.secPastEpoch, ts.nsec) + */ + __pyx_v_self->local = ((struct local_tm_nano_sec &)__pyx_v_self->_time); + + /* "PyCafeDefs.pxi":645 + * #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)) + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->etsDate); + __Pyx_DECREF(__pyx_v_self->etsDate); + __pyx_v_self->etsDate = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":646 + * + * 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) + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_self->local.ansi_tm.tm_year + 0x76C)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":647 + * 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) + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_self->local.ansi_tm.tm_mon + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":648 + * 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) + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->local.ansi_tm.tm_mday); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":649 + * 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) + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->local.ansi_tm.tm_hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":650 + * 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) + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->local.ansi_tm.tm_min); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":651 + * 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) + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->local.ansi_tm.tm_sec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":652 + * 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) + * def get(self): + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((unsigned int)__pyx_v_ts.nsec)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":653 + * self.etsDate.append( self.local.ansi_tm.tm_sec) + * self.etsDate.append( ts.nsec) + * self.etsDate.append( self.local.nSec) # <<<<<<<<<<<<<< + * def get(self): + * return self.etsDate + */ + if (unlikely(__pyx_v_self->etsDate == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(__pyx_v_self->local.nSec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->etsDate, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":637 + * 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 + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe._epicsTimeStampAsDate.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":654 + * self.etsDate.append( ts.nsec) + * self.etsDate.append( self.local.nSec) + * def get(self): # <<<<<<<<<<<<<< + * return self.etsDate + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_21_epicsTimeStampAsDate_3get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_21_epicsTimeStampAsDate_3get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_21_epicsTimeStampAsDate_2get(((struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_21_epicsTimeStampAsDate_2get(struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get", 0); + + /* "PyCafeDefs.pxi":655 + * self.etsDate.append( self.local.nSec) + * def get(self): + * return self.etsDate # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->etsDate); + __pyx_r = __pyx_v_self->etsDate; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":654 + * self.etsDate.append( ts.nsec) + * self.etsDate.append( self.local.nSec) + * def get(self): # <<<<<<<<<<<<<< + * return self.etsDate + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":682 + * + * + * 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; + PyObject *__pyx_t_2 = NULL; + std::string __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":683 + * + * def __cinit__(self): + * self.nelem= 1 # <<<<<<<<<<<<<< + * self.alarmStatus=-1 + * self.alarmSeverity=-1 + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":684 + * def __cinit__(self): + * self.nelem= 1 + * self.alarmStatus=-1 # <<<<<<<<<<<<<< + * self.alarmSeverity=-1 + * self.precision=0 + */ + __pyx_v_self->alarmStatus = -1; + + /* "PyCafeDefs.pxi":685 + * self.nelem= 1 + * self.alarmStatus=-1 + * self.alarmSeverity=-1 # <<<<<<<<<<<<<< + * self.precision=0 + * self.units=(("")).encode('UTF-8') + */ + __pyx_v_self->alarmSeverity = -1; + + /* "PyCafeDefs.pxi":686 + * self.alarmStatus=-1 + * self.alarmSeverity=-1 + * self.precision=0 # <<<<<<<<<<<<<< + * self.units=(("")).encode('UTF-8') + * self.noEnumStrings=0 + */ + __pyx_v_self->precision = 0; + + /* "PyCafeDefs.pxi":687 + * self.alarmSeverity=-1 + * self.precision=0 + * self.units=(("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.noEnumStrings=0 + * self.enumStrings=[] + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__85, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->units = __pyx_t_3; + + /* "PyCafeDefs.pxi":688 + * self.precision=0 + * self.units=(("")).encode('UTF-8') + * self.noEnumStrings=0 # <<<<<<<<<<<<<< + * self.enumStrings=[] + * self.upperDisplayLimit=0 + */ + __pyx_v_self->noEnumStrings = 0; + + /* "PyCafeDefs.pxi":689 + * self.units=(("")).encode('UTF-8') + * self.noEnumStrings=0 + * self.enumStrings=[] # <<<<<<<<<<<<<< + * self.upperDisplayLimit=0 + * self.lowerDisplayLimit=0 + */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->enumStrings); + __Pyx_DECREF(__pyx_v_self->enumStrings); + __pyx_v_self->enumStrings = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":690 + * 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":691 + * 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":692 + * 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":693 + * 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":694 + * 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":695 + * 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":696 + * self.upperControlLimit=0 + * self.lowerControlLimit=0 + * self.value=[] # <<<<<<<<<<<<<< + * self.status=1 + * self.pythonVersion=sys.version_info[0:4] + */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->value); + __Pyx_DECREF(__pyx_v_self->value); + __pyx_v_self->value = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":697 + * self.lowerControlLimit=0 + * self.value=[] + * self.status=1 # <<<<<<<<<<<<<< + * self.pythonVersion=sys.version_info[0:4] + * + */ + __pyx_v_self->status = 1; + + /* "PyCafeDefs.pxi":698 + * self.value=[] + * self.status=1 + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 4, NULL, NULL, &__pyx_slice__91, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_self->pythonVersion); + __Pyx_DECREF(__pyx_v_self->pythonVersion); + __pyx_v_self->pythonVersion = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":682 + * + * + * 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_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvctrl.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":700 + * self.pythonVersion=sys.version_info[0:4] + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":701 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __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 + * 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":700 + * self.pythonVersion=sys.version_info[0:4] + * + * 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":704 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v_nelem); + + /* "PyCafeDefs.pxi":705 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":709 + * #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_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_nelem, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":705 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * #print ("----------------------" + * #print ("Note: Max. Nelem =", self.nelem + */ + } + + /* "PyCafeDefs.pxi":710 + * #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_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":711 + * nelem=self.nelem + * self.showPrint(nelem) + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":704 + * 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":714 + * + * + * 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; + unsigned int __pyx_t_7; + unsigned short __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":717 + * cdef unsigned int i + * #is self.value[0] a list + * if nelem==1: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * if self.pythonVersion[0] < 3: + */ + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_nelem, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":718 + * #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] ) + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __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":719 + * if nelem==1: + * if isinstance (self.value[0], list): + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * print ("value =", self.value[0][0] ) + * + */ + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":720 + * if isinstance (self.value[0], list): + * if self.pythonVersion[0] < 3: + * print ("value =", self.value[0][0] ) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_value); + __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_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __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":719 + * if nelem==1: + * if isinstance (self.value[0], list): + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * print ("value =", self.value[0][0] ) + * + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":723 + * + * else: + * print ("value = ", self.value[0][0], end="" ) # <<<<<<<<<<<<<< + * else: + * if self.pythonVersion[0] < 3: + */ + /*else*/ { + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_value_2); + __Pyx_GIVEREF(__pyx_kp_u_value_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_value_2); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__85) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __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; + } + __pyx_L5:; + + /* "PyCafeDefs.pxi":718 + * #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] ) + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":725 + * print ("value = ", self.value[0][0], end="" ) + * else: + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * print ("value =", self.value[0] ) + * + */ + /*else*/ { + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":726 + * else: + * if self.pythonVersion[0] < 3: + * print ("value =", self.value[0] ) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __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":725 + * print ("value = ", self.value[0][0], end="" ) + * else: + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * print ("value =", self.value[0] ) + * + */ + goto __pyx_L6; + } + + /* "PyCafeDefs.pxi":729 + * + * else: + * print ("value =", self.value[0] , end="" ) # <<<<<<<<<<<<<< + * else: + * print ("values = ", end="") + */ + /*else*/ { + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__85) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __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; + } + __pyx_L6:; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":717 + * cdef unsigned int i + * #is self.value[0] a list + * if nelem==1: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * if self.pythonVersion[0] < 3: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":731 + * print ("value =", self.value[0] , end="" ) + * else: + * print ("values = ", end="") # <<<<<<<<<<<<<< + * if self.pythonVersion[0] < 3: + * if isinstance (self.value[0], list): + */ + /*else*/ { + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__85) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__92, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __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":732 + * else: + * print ("values = ", end="") + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * for i in range(0, nelem): + */ + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":733 + * print ("values = ", 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 ) + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyList_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":734 + * 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: + */ + __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafeDefs.pxi":735 + * 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): + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __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":733 + * print ("values = ", 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 ) + */ + goto __pyx_L8; + } + + /* "PyCafeDefs.pxi":737 + * print (self.value[0][i],"[%d]" %i ) + * else: + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print (self.value[i],"[%d]" %i ) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafeDefs.pxi":738 + * else: + * for i in range(0, nelem): + * print (self.value[i],"[%d]" %i ) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __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; + } + } + __pyx_L8:; + + /* "PyCafeDefs.pxi":732 + * else: + * print ("values = ", end="") + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * for i in range(0, nelem): + */ + goto __pyx_L7; + } + + /* "PyCafeDefs.pxi":741 + * + * else: + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print (self.value[0][i],"[%d]" %i, end=" ") + */ + /*else*/ { + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __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_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":742 + * else: + * 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_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafeDefs.pxi":743 + * 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_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_end, __pyx_kp_u__93) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __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; + } + + /* "PyCafeDefs.pxi":741 + * + * else: + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print (self.value[0][i],"[%d]" %i, end=" ") + */ + goto __pyx_L13; + } + + /* "PyCafeDefs.pxi":745 + * 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_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafeDefs.pxi":746 + * 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_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end, __pyx_kp_u__93) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __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; + } + } + __pyx_L13:; + } + __pyx_L7:; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":748 + * 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__94, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":749 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_status_d, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __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_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __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":750 + * print ("") + * print ("status = %d" % self.status) + * print ("alarmStatus = %d" % self.alarmStatus) # <<<<<<<<<<<<<< + * print ("alarmSeverity = %d" % self.alarmSeverity) + * print ("precision = %d" % self.precision) + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_alarmStatus_d, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __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; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __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":751 + * 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) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_alarmSeverity_d, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __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_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __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":752 + * 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) + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->precision); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_precision_d, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __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; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __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":753 + * print ("alarmSeverity = %d" % self.alarmSeverity) + * print ("precision = %d" % self.precision) + * print ("units = %s" % self.units) # <<<<<<<<<<<<<< + * print ("noEnumStrings = %d" % self.noEnumStrings) + * + */ + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_units_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __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_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __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":754 + * print ("precision = %d" % self.precision) + * print ("units = %s" % self.units) + * print ("noEnumStrings = %d" % self.noEnumStrings) # <<<<<<<<<<<<<< + * + * if self.noEnumStrings > 0: + */ + __pyx_t_4 = __Pyx_PyInt_From_unsigned_short(__pyx_v_self->noEnumStrings); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_noEnumStrings_d, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __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":756 + * print ("noEnumStrings = %d" % self.noEnumStrings) + * + * if self.noEnumStrings > 0: # <<<<<<<<<<<<<< + * print ("enumStrings =",) + * for i in range(0, self.noEnumStrings): + */ + __pyx_t_3 = ((__pyx_v_self->noEnumStrings > 0) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":757 + * + * if self.noEnumStrings > 0: + * print ("enumStrings =",) # <<<<<<<<<<<<<< + * for i in range(0, self.noEnumStrings): + * print (self.enumStrings[i],"[%s]" %i,) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":758 + * if self.noEnumStrings > 0: + * print ("enumStrings =",) + * for i in range(0, self.noEnumStrings): # <<<<<<<<<<<<<< + * print (self.enumStrings[i],"[%s]" %i,) + * print ("") + */ + __pyx_t_8 = __pyx_v_self->noEnumStrings; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafeDefs.pxi":759 + * print ("enumStrings =",) + * for i in range(0, self.noEnumStrings): + * print (self.enumStrings[i],"[%s]" %i,) # <<<<<<<<<<<<<< + * print ("") + * + */ + if (unlikely(__pyx_v_self->enumStrings == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __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_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __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":760 + * for i in range(0, self.noEnumStrings): + * print (self.enumStrings[i],"[%s]" %i,) + * print ("") # <<<<<<<<<<<<<< + * + * print ("upperDisplayLimit = %f" % self.upperDisplayLimit) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafeDefs.pxi":756 + * print ("noEnumStrings = %d" % self.noEnumStrings) + * + * if self.noEnumStrings > 0: # <<<<<<<<<<<<<< + * print ("enumStrings =",) + * for i in range(0, self.noEnumStrings): + */ + } + + /* "PyCafeDefs.pxi":762 + * print ("") + * + * print ("upperDisplayLimit = %f" % self.upperDisplayLimit) # <<<<<<<<<<<<<< + * print ("lowerDisplayLimit = %f" % self.lowerDisplayLimit) + * print ("upperAlarmLimit = %f" % self.upperAlarmLimit) + */ + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_upperDisplayLimit_f, __pyx_v_self->upperDisplayLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __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":763 + * + * print ("upperDisplayLimit = %f" % self.upperDisplayLimit) + * print ("lowerDisplayLimit = %f" % self.lowerDisplayLimit) # <<<<<<<<<<<<<< + * print ("upperAlarmLimit = %f" % self.upperAlarmLimit) + * print ("lowerAlarmLimit = %f" % self.lowerAlarmLimit) + */ + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_lowerDisplayLimit_f, __pyx_v_self->lowerDisplayLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __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":764 + * 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_5 = PyUnicode_Format(__pyx_kp_u_upperAlarmLimit_f, __pyx_v_self->upperAlarmLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __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":765 + * 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 = PyUnicode_Format(__pyx_kp_u_lowerAlarmLimit_f, __pyx_v_self->lowerAlarmLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __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":766 + * 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_5 = PyUnicode_Format(__pyx_kp_u_upperWarningLimit_f, __pyx_v_self->upperWarningLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __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":767 + * 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 = PyUnicode_Format(__pyx_kp_u_lowerWarningLimit_f, __pyx_v_self->lowerWarningLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __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":768 + * print ("upperWarningLimit = %f" % self.upperWarningLimit) + * print ("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print ("upperControlLimit = %f" % self.upperControlLimit) # <<<<<<<<<<<<<< + * print ("lowerControlLimit = %f" % self.lowerControlLimit) + * + */ + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_upperControlLimit_f, __pyx_v_self->upperControlLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __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":769 + * print ("lowerWarningLimit = %f" % self.lowerWarningLimit) + * print ("upperControlLimit = %f" % self.upperControlLimit) + * print ("lowerControlLimit = %f" % self.lowerControlLimit) # <<<<<<<<<<<<<< + * + * return + */ + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_lowerControlLimit_f, __pyx_v_self->lowerControlLimit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __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":771 + * print ("lowerControlLimit = %f" % self.lowerControlLimit) + * + * return # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":714 + * + * + * 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":662 + * ################################################################################## + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":663 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":664 + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity # <<<<<<<<<<<<<< + * cdef readonly unsigned short precision + * cdef readonly string 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":665 + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision # <<<<<<<<<<<<<< + * cdef readonly string 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":666 + * cdef readonly int alarmSeverity + * cdef readonly unsigned short precision + * cdef readonly string 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 + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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.units.__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 unsigned short precision + * cdef readonly string 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":668 + * cdef readonly string 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":669 + * 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":670 + * 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":671 + * 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":672 + * 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":673 + * 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":674 + * 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":675 + * 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":676 + * 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":677 + * cdef readonly upperControlLimit + * cdef readonly lowerControlLimit + * cdef readonly list value # <<<<<<<<<<<<<< + * cdef readonly int status + * cdef readonly tuple pythonVersion + */ + +/* 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":678 + * cdef readonly lowerControlLimit + * cdef readonly list value + * cdef readonly int status # <<<<<<<<<<<<<< + * cdef readonly tuple pythonVersion + * + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; +} + +/* "PyCafeDefs.pxi":679 + * cdef readonly list value + * cdef readonly int status + * cdef readonly tuple pythonVersion # <<<<<<<<<<<<<< + * + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13pythonVersion_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvctrl_13pythonVersion_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvctrl_13pythonVersion___get__(((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvctrl_13pythonVersion___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->pythonVersion); + __pyx_r = __pyx_v_self->pythonVersion; + 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":783 + * 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 + */ + +/* Python wrapper */ +static int __pyx_pw_6PyCafe_15CyCafeException_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6PyCafe_15CyCafeException_1__cinit__(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 = 0; + PyObject *__pyx_v__ec = 0; + PyObject *__pyx_v__et = 0; + PyObject *__pyx_v__ei = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_source,&__pyx_n_s_handle,&__pyx_n_s_pv,&__pyx_n_s_ec,&__pyx_n_s_et,&__pyx_n_s_ei,0}; + PyObject* values[7] = {0,0,0,0,0,0,0}; + values[0] = ((PyObject *)__pyx_n_u_cycafe); + values[1] = ((PyObject *)Py_None); + values[2] = ((PyObject *)__pyx_int_neg_1); + 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); + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + 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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type); + if (value) { values[0] = value; kw_args--; } + } + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_source); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handle); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pv); + if (value) { values[3] = value; kw_args--; } + } + case 4: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ec); + if (value) { values[4] = value; kw_args--; } + } + case 5: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_et); + if (value) { values[5] = value; kw_args--; } + } + case 6: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ei); + if (value) { values[6] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + 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 = values[3]; + __pyx_v__ec = values[4]; + __pyx_v__et = values[5]; + __pyx_v__ei = values[6]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("PyCafe.CyCafeException.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException___cinit__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self), __pyx_v__type, __pyx_v__source, __pyx_v__handle, __pyx_v__pv, __pyx_v__ec, __pyx_v__et, __pyx_v__ei); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6PyCafe_15CyCafeException___cinit__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self, PyObject *__pyx_v__type, PyObject *__pyx_v__source, PyObject *__pyx_v__handle, PyObject *__pyx_v__pv, PyObject *__pyx_v__ec, PyObject *__pyx_v__et, PyObject *__pyx_v__ei) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":784 + * + * 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 + */ + 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_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __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":785 + * 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 + */ + 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_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __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":786 + * self.type =_type + * self.source=_source + * self.handle=_handle # <<<<<<<<<<<<<< + * self.pv =_pv + * self.errorCode =_ec + */ + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v__handle); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->handle = __pyx_t_2; + + /* "PyCafeDefs.pxi":787 + * self.source=_source + * self.handle=_handle + * self.pv =_pv # <<<<<<<<<<<<<< + * self.errorCode =_ec + * self.errorText =_et + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__pv))||((__pyx_v__pv) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__pv)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_v__pv; + __Pyx_INCREF(__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":788 + * self.handle=_handle + * self.pv =_pv + * self.errorCode =_ec # <<<<<<<<<<<<<< + * self.errorText =_et + * self.errorInfo =_ei + */ + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v__ec); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->errorCode = __pyx_t_2; + + /* "PyCafeDefs.pxi":789 + * self.pv =_pv + * self.errorCode =_ec + * self.errorText =_et # <<<<<<<<<<<<<< + * self.errorInfo =_ei + * + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__et))||((__pyx_v__et) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__et)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_v__et; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->errorText); + __Pyx_DECREF(__pyx_v_self->errorText); + __pyx_v_self->errorText = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":790 + * self.errorCode =_ec + * self.errorText =_et + * self.errorInfo =_ei # <<<<<<<<<<<<<< + * + * def show(self): + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v__ei))||((__pyx_v__ei) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__ei)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_v__ei; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->errorInfo); + __Pyx_DECREF(__pyx_v_self->errorInfo); + __pyx_v_self->errorInfo = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":783 + * 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 + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafeException.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":792 + * self.errorInfo =_ei + * + * def show(self): # <<<<<<<<<<<<<< + * print ("------CyCafeException-----------------------------------------------------") + * print ("raised from CyCafe method:",self.source) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_3show(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_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_15CyCafeException_2show(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_2show(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self) { + 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":793 + * + * def show(self): + * print ("------CyCafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * print ("raised from CyCafe method:",self.source) + * if (self.handle!=-1): + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":794 + * 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:") + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_raised_from_CyCafe_method); + __Pyx_GIVEREF(__pyx_kp_u_raised_from_CyCafe_method); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_raised_from_CyCafe_method); + __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_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __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":795 + * 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) + */ + __pyx_t_3 = ((__pyx_v_self->handle != -1L) != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":796 + * 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': + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __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->pv); + __Pyx_GIVEREF(__pyx_v_self->pv); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->pv); + __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_2); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2); + __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_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __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":797 + * 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:") + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->errorCode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_errorCode); + __Pyx_GIVEREF(__pyx_kp_u_errorCode); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_errorCode); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_errorText); + __Pyx_GIVEREF(__pyx_kp_u_errorText); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_errorText); + __Pyx_INCREF(__pyx_v_self->errorText); + __Pyx_GIVEREF(__pyx_v_self->errorText); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->errorText); + __Pyx_INCREF(__pyx_kp_u_errorInfo); + __Pyx_GIVEREF(__pyx_kp_u_errorInfo); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_errorInfo); + __Pyx_INCREF(__pyx_v_self->errorInfo); + __Pyx_GIVEREF(__pyx_v_self->errorInfo); + PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->errorInfo); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __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":795 + * 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) + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":798 + * 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) + */ + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_cafe, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":799 + * 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: + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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->pv); + __Pyx_GIVEREF(__pyx_v_self->pv); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->pv); + __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_2); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2); + __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_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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":800 + * 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) + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->errorCode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_errorCode); + __Pyx_GIVEREF(__pyx_kp_u_errorCode); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_errorCode); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_errorText); + __Pyx_GIVEREF(__pyx_kp_u_errorText); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_errorText); + __Pyx_INCREF(__pyx_v_self->errorText); + __Pyx_GIVEREF(__pyx_v_self->errorText); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->errorText); + __Pyx_INCREF(__pyx_kp_u_errorInfo); + __Pyx_GIVEREF(__pyx_kp_u_errorInfo); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_errorInfo); + __Pyx_INCREF(__pyx_v_self->errorInfo); + __Pyx_GIVEREF(__pyx_v_self->errorInfo); + PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->errorInfo); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __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":798 + * 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) + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":802 + * print ("errorCode:",self.errorCode,"errorText:",self.errorText,"\nerrorInfo:",self.errorInfo) + * else: + * print ("errorInfo:",self.errorInfo) # <<<<<<<<<<<<<< + * print ("------------------------------------------------------------------------") + * return + */ + /*else*/ { + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_errorInfo_2); + __Pyx_GIVEREF(__pyx_kp_u_errorInfo_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_errorInfo_2); + __Pyx_INCREF(__pyx_v_self->errorInfo); + __Pyx_GIVEREF(__pyx_v_self->errorInfo); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->errorInfo); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __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; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":803 + * else: + * print ("errorInfo:",self.errorInfo) + * print ("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":804 + * print ("errorInfo:",self.errorInfo) + * print ("------------------------------------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * def reveal(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":792 + * self.errorInfo =_ei + * + * def show(self): # <<<<<<<<<<<<<< + * print ("------CyCafeException-----------------------------------------------------") + * print ("raised from CyCafe method:",self.source) + */ + + /* 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.CyCafeException.show", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":806 + * return + * + * def reveal(self): # <<<<<<<<<<<<<< + * print ("------CyCafeException-----------------------------------------------------") + * if(self.type): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_5reveal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_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_15CyCafeException_4reveal(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_4reveal(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("reveal", 0); + + /* "PyCafeDefs.pxi":807 + * + * def reveal(self): + * print ("------CyCafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if(self.type): + * print (".type =",self.type) + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":808 + * def reveal(self): + * print ("------CyCafeException-----------------------------------------------------") + * if(self.type): # <<<<<<<<<<<<<< + * print (".type =",self.type) + * print (".source =",self.source) + */ + __pyx_t_2 = (__pyx_v_self->type != Py_None) && (PyUnicode_GET_SIZE(__pyx_v_self->type) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":809 + * print ("------CyCafeException-----------------------------------------------------") + * if(self.type): + * print (".type =",self.type) # <<<<<<<<<<<<<< + * print (".source =",self.source) + * if (self.handle!=-1): + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __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_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":808 + * def reveal(self): + * print ("------CyCafeException-----------------------------------------------------") + * if(self.type): # <<<<<<<<<<<<<< + * print (".type =",self.type) + * print (".source =",self.source) + */ + } + + /* "PyCafeDefs.pxi":810 + * if(self.type): + * print (".type =",self.type) + * print (".source =",self.source) # <<<<<<<<<<<<<< + * if (self.handle!=-1): + * print (".handle =",self.handle) + */ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_source_2); + __Pyx_GIVEREF(__pyx_kp_u_source_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_source_2); + __Pyx_INCREF(__pyx_v_self->source); + __Pyx_GIVEREF(__pyx_v_self->source); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->source); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __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.pxi":811 + * print (".type =",self.type) + * print (".source =",self.source) + * if (self.handle!=-1): # <<<<<<<<<<<<<< + * print (".handle =",self.handle) + * if (self.pv): + */ + __pyx_t_2 = ((__pyx_v_self->handle != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":812 + * print (".source =",self.source) + * if (self.handle!=-1): + * print (".handle =",self.handle) # <<<<<<<<<<<<<< + * if (self.pv): + * print (".pv =",self.pv) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_handle_3); + __Pyx_GIVEREF(__pyx_kp_u_handle_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_handle_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __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.pxi":811 + * print (".type =",self.type) + * print (".source =",self.source) + * if (self.handle!=-1): # <<<<<<<<<<<<<< + * print (".handle =",self.handle) + * if (self.pv): + */ + } + + /* "PyCafeDefs.pxi":813 + * if (self.handle!=-1): + * print (".handle =",self.handle) + * if (self.pv): # <<<<<<<<<<<<<< + * print (".pv =",self.pv) + * if (self.errorCode != -1): + */ + __pyx_t_2 = (__pyx_v_self->pv != Py_None) && (PyUnicode_GET_SIZE(__pyx_v_self->pv) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":814 + * print (".handle =",self.handle) + * if (self.pv): + * print (".pv =",self.pv) # <<<<<<<<<<<<<< + * if (self.errorCode != -1): + * print (".errorCode=",self.errorCode) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_pv_2); + __Pyx_GIVEREF(__pyx_kp_u_pv_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_pv_2); + __Pyx_INCREF(__pyx_v_self->pv); + __Pyx_GIVEREF(__pyx_v_self->pv); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->pv); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":813 + * if (self.handle!=-1): + * print (".handle =",self.handle) + * if (self.pv): # <<<<<<<<<<<<<< + * print (".pv =",self.pv) + * if (self.errorCode != -1): + */ + } + + /* "PyCafeDefs.pxi":815 + * if (self.pv): + * print (".pv =",self.pv) + * if (self.errorCode != -1): # <<<<<<<<<<<<<< + * print (".errorCode=",self.errorCode) + * if (self.errorText): + */ + __pyx_t_2 = ((__pyx_v_self->errorCode != -1L) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":816 + * print (".pv =",self.pv) + * if (self.errorCode != -1): + * print (".errorCode=",self.errorCode) # <<<<<<<<<<<<<< + * if (self.errorText): + * print (".errorText=",self.errorText) + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->errorCode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_errorCode_2); + __Pyx_GIVEREF(__pyx_kp_u_errorCode_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_errorCode_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":815 + * if (self.pv): + * print (".pv =",self.pv) + * if (self.errorCode != -1): # <<<<<<<<<<<<<< + * print (".errorCode=",self.errorCode) + * if (self.errorText): + */ + } + + /* "PyCafeDefs.pxi":817 + * if (self.errorCode != -1): + * print (".errorCode=",self.errorCode) + * if (self.errorText): # <<<<<<<<<<<<<< + * print (".errorText=",self.errorText) + * print (".errorInfo=",self.errorInfo) + */ + __pyx_t_2 = (__pyx_v_self->errorText != Py_None) && (PyUnicode_GET_SIZE(__pyx_v_self->errorText) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":818 + * print (".errorCode=",self.errorCode) + * if (self.errorText): + * print (".errorText=",self.errorText) # <<<<<<<<<<<<<< + * print (".errorInfo=",self.errorInfo) + * print ("------------------------------------------------------------------------") + */ + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_kp_u_errorText_2); + __Pyx_GIVEREF(__pyx_kp_u_errorText_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_errorText_2); + __Pyx_INCREF(__pyx_v_self->errorText); + __Pyx_GIVEREF(__pyx_v_self->errorText); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->errorText); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __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.pxi":817 + * if (self.errorCode != -1): + * print (".errorCode=",self.errorCode) + * if (self.errorText): # <<<<<<<<<<<<<< + * print (".errorText=",self.errorText) + * print (".errorInfo=",self.errorInfo) + */ + } + + /* "PyCafeDefs.pxi":819 + * if (self.errorText): + * print (".errorText=",self.errorText) + * print (".errorInfo=",self.errorInfo) # <<<<<<<<<<<<<< + * print ("------------------------------------------------------------------------") + * return + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_kp_u_errorInfo_3); + __Pyx_GIVEREF(__pyx_kp_u_errorInfo_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_errorInfo_3); + __Pyx_INCREF(__pyx_v_self->errorInfo); + __Pyx_GIVEREF(__pyx_v_self->errorInfo); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->errorInfo); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":820 + * print (".errorText=",self.errorText) + * print (".errorInfo=",self.errorInfo) + * print ("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":821 + * print (".errorInfo=",self.errorInfo) + * print ("------------------------------------------------------------------------") + * return # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":806 + * return + * + * def reveal(self): # <<<<<<<<<<<<<< + * print ("------CyCafeException-----------------------------------------------------") + * if(self.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_3); + __Pyx_AddTraceback("PyCafe.CyCafeException.reveal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":775 + * + * cdef class CyCafeException: + * cdef readonly str type # <<<<<<<<<<<<<< + * cdef readonly str source + * cdef readonly int handle + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_4type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_4type_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException_4type___get__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_4type___get__(struct __pyx_obj_6PyCafe_CyCafeException *__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":776 + * cdef class CyCafeException: + * cdef readonly str type + * cdef readonly str source # <<<<<<<<<<<<<< + * cdef readonly int handle + * cdef readonly str pv + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_6source_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_6source_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException_6source___get__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_6source___get__(struct __pyx_obj_6PyCafe_CyCafeException *__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":777 + * cdef readonly str type + * cdef readonly str source + * cdef readonly int handle # <<<<<<<<<<<<<< + * cdef readonly str pv + * cdef readonly int errorCode + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_6handle_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException_6handle___get__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_6handle___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->handle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafeException.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":778 + * cdef readonly str source + * cdef readonly int handle + * cdef readonly str pv # <<<<<<<<<<<<<< + * cdef readonly int errorCode + * cdef readonly str errorText + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_2pv_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_2pv_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException_2pv___get__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_2pv___get__(struct __pyx_obj_6PyCafe_CyCafeException *__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":779 + * cdef readonly int handle + * cdef readonly str pv + * cdef readonly int errorCode # <<<<<<<<<<<<<< + * cdef readonly str errorText + * cdef readonly str errorInfo + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_9errorCode_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_9errorCode_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException_9errorCode___get__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_9errorCode___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->errorCode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("PyCafe.CyCafeException.errorCode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":780 + * cdef readonly str pv + * cdef readonly int errorCode + * cdef readonly str errorText # <<<<<<<<<<<<<< + * cdef readonly str errorInfo + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_9errorText_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_9errorText_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException_9errorText___get__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_9errorText___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->errorText); + __pyx_r = __pyx_v_self->errorText; + 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":781 + * 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): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_9errorInfo_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_15CyCafeException_9errorInfo_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_15CyCafeException_9errorInfo___get__(((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_15CyCafeException_9errorInfo___get__(struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->errorInfo); + __pyx_r = __pyx_v_self->errorInfo; + 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":840 + * 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":841 + * + * def __cinit__(self): + * self.monid=0 # <<<<<<<<<<<<<< + * #self.dataType=None + * #self.dbrDataType=None + */ + __pyx_v_self->monid = 0; + + /* "PyCafeDefs.pxi":845 + * #self.dbrDataType=None + * #self.cafeDbrType=None + * self.nelem=1 # <<<<<<<<<<<<<< + * #self.mask=None + * #self.userArgs=None + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":848 + * #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":849 + * #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":850 + * 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":851 + * self.maskHasDBE_PROPERTY=False + * self.maskHasDBE_VALUE =False + * self.maskHasDBE_LOG =False # <<<<<<<<<<<<<< + * self.maskHasDBE_ALARM =False + * + */ + __pyx_v_self->maskHasDBE_LOG = 0; + + /* "PyCafeDefs.pxi":852 + * self.maskHasDBE_VALUE =False + * self.maskHasDBE_LOG =False + * self.maskHasDBE_ALARM =False # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_v_self->maskHasDBE_ALARM = 0; + + /* "PyCafeDefs.pxi":840 + * 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":854 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":855 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __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":856 + * 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_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __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":857 + * 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_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __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":858 + * 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_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __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":859 + * print("dbrDataType=", self.dbrDataType) + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) # <<<<<<<<<<<<<< + * print("mask =", self.mask) + * print("userArgs =", self.userArgs) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nelem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __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":860 + * print("cafeDbrType=", self.cafeDbrType) + * print("nelem =", self.nelem) + * print("mask =", self.mask) # <<<<<<<<<<<<<< + * print("userArgs =", self.userArgs) + * print("status =", self.status) + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->mask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __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":861 + * print("nelem =", self.nelem) + * print("mask =", self.mask) + * print("userArgs =", 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_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __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":862 + * print("mask =", self.mask) + * print("userArgs =", 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_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __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":863 + * 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) + */ + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->maskHasDBE_PROPERTY); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __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":864 + * 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_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __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":865 + * 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_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __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":866 + * 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_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __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":867 + * 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":854 + * 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":825 + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":826 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":827 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":828 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":829 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":831 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":833 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":834 + * #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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":835 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":836 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":837 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":838 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; +} + +/* "PyCafeDefs.pxi":883 + * cdef readonly tuple pythonVersion + * + * 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; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":884 + * + * def __cinit__(self): + * self.nelem= 1 # <<<<<<<<<<<<<< + * self.alarmStatus=-1 + * self.alarmSeverity=-1 + */ + __pyx_v_self->nelem = 1; + + /* "PyCafeDefs.pxi":885 + * def __cinit__(self): + * self.nelem= 1 + * self.alarmStatus=-1 # <<<<<<<<<<<<<< + * self.alarmSeverity=-1 + * self.ts=[] + */ + __pyx_v_self->alarmStatus = -1; + + /* "PyCafeDefs.pxi":886 + * self.nelem= 1 + * self.alarmStatus=-1 + * self.alarmSeverity=-1 # <<<<<<<<<<<<<< + * self.ts=[] + * self.tsDate=[] + */ + __pyx_v_self->alarmSeverity = -1; + + /* "PyCafeDefs.pxi":887 + * self.alarmStatus=-1 + * self.alarmSeverity=-1 + * self.ts=[] # <<<<<<<<<<<<<< + * self.tsDate=[] + * self.value=[] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __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":888 + * self.alarmSeverity=-1 + * self.ts=[] + * self.tsDate=[] # <<<<<<<<<<<<<< + * self.value=[] + * self.status=1 + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __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":889 + * self.ts=[] + * self.tsDate=[] + * self.value=[] # <<<<<<<<<<<<<< + * self.status=1 + * self.pythonVersion=sys.version_info[0:4] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __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":890 + * self.tsDate=[] + * self.value=[] + * self.status=1 # <<<<<<<<<<<<<< + * self.pythonVersion=sys.version_info[0:4] + * + */ + __pyx_v_self->status = 1; + + /* "PyCafeDefs.pxi":891 + * self.value=[] + * self.status=1 + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 4, NULL, NULL, &__pyx_slice__102, 1, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pythonVersion); + __Pyx_DECREF(__pyx_v_self->pythonVersion); + __pyx_v_self->pythonVersion = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":883 + * cdef readonly tuple pythonVersion + * + * 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_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvdata.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":893 + * self.pythonVersion=sys.version_info[0:4] + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":894 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __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":895 + * 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":893 + * self.pythonVersion=sys.version_info[0:4] + * + * 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":897 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v_nelem); + + /* "PyCafeDefs.pxi":898 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":902 + * #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_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_nelem, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":898 + * + * def showMax(self, nelem): + * if nelem > self.nelem: # <<<<<<<<<<<<<< + * #print ("----------------------" + * #print ("Note: Max. Nelem =", self.nelem + */ + } + + /* "PyCafeDefs.pxi":903 + * #print ("----------------------" + * 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_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":904 + * 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":897 + * 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":906 + * 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; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + long __pyx_t_5; + unsigned 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 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":910 + * #is self.value[0] a list + * + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * + * if nelem==1: + */ + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":912 + * if self.pythonVersion[0] < 3: + * + * if nelem==1: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * print ("value =", self.value[0][0] ) + */ + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_nelem, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":913 + * + * if nelem==1: + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * print ("value =", self.value[0][0] ) + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyList_Check(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":914 + * if nelem==1: + * if isinstance (self.value[0], list): + * print ("value =", self.value[0][0] ) # <<<<<<<<<<<<<< + * else: + * print ("value =", self.value[0] ) + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_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_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __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":913 + * + * if nelem==1: + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * print ("value =", self.value[0][0] ) + * else: + */ + goto __pyx_L5; + } + + /* "PyCafeDefs.pxi":916 + * print ("value =", self.value[0][0] ) + * else: + * print ("value =", self.value[0] ) # <<<<<<<<<<<<<< + * else: + * print ("values = "), + */ + /*else*/ { + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_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_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __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; + } + __pyx_L5:; + + /* "PyCafeDefs.pxi":912 + * if self.pythonVersion[0] < 3: + * + * if nelem==1: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * print ("value =", self.value[0][0] ) + */ + goto __pyx_L4; + } + + /* "PyCafeDefs.pxi":918 + * print ("value =", self.value[0] ) + * else: + * print ("values = "), # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * for i in range(0, nelem): + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":919 + * else: + * print ("values = "), + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print (self.value[0][i],"[%d]" %i ) + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyList_Check(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":920 + * print ("values = "), + * if isinstance (self.value[0], list): + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print (self.value[0][i],"[%d]" %i ) + * else: + */ + __pyx_t_5 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":921 + * 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): + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __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_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __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_7); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); + __pyx_t_1 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafeDefs.pxi":919 + * else: + * print ("values = "), + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print (self.value[0][i],"[%d]" %i ) + */ + goto __pyx_L6; + } + + /* "PyCafeDefs.pxi":923 + * print (self.value[0][i],"[%d]" %i ) + * else: + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print (self.value[i],"[%d]" %i ) + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":924 + * else: + * for i in range(0, nelem): + * print (self.value[i],"[%d]" %i ) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = __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_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __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_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __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; + } + } + __pyx_L6:; + } + __pyx_L4:; + + /* "PyCafeDefs.pxi":910 + * #is self.value[0] a list + * + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * + * if nelem==1: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":928 + * else: + * + * if nelem==1: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * print ("value =", self.value[0][0], end="") + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_nelem, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":929 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyList_Check(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { + + /* "PyCafeDefs.pxi":930 + * 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_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __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_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_end, __pyx_kp_u__85) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafeDefs.pxi":929 + * + * if nelem==1: + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * print ("value =", self.value[0][0], end="") + * else: + */ + goto __pyx_L12; + } + + /* "PyCafeDefs.pxi":932 + * print ("value =", self.value[0][0], end="") + * else: + * print ("value =", self.value[0], end="") # <<<<<<<<<<<<<< + * else: + * print ("values = ", end="") + */ + /*else*/ { + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_kp_u_value); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_value); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_end, __pyx_kp_u__85) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L12:; + + /* "PyCafeDefs.pxi":928 + * else: + * + * if nelem==1: # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * print ("value =", self.value[0][0], end="") + */ + goto __pyx_L11; + } + + /* "PyCafeDefs.pxi":934 + * print ("value =", self.value[0], end="") + * else: + * print ("values = ", end="") # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * for i in range(0, nelem): + */ + /*else*/ { + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__85) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__104, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __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; + + /* "PyCafeDefs.pxi":935 + * else: + * print ("values = ", 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_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = PyList_Check(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":936 + * print ("values = ", end="") + * if isinstance (self.value[0], list): + * for i in range(0, nelem): # <<<<<<<<<<<<<< + * print (self.value[0][i],"[%d]" %i , end=" ") + * else: + */ + __pyx_t_5 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":937 + * 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_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_self->value, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_end, __pyx_kp_u__93) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafeDefs.pxi":935 + * else: + * print ("values = ", end="") + * if isinstance (self.value[0], list): # <<<<<<<<<<<<<< + * for i in range(0, nelem): + * print (self.value[0][i],"[%d]" %i , end=" ") + */ + goto __pyx_L13; + } + + /* "PyCafeDefs.pxi":939 + * 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_5 = __Pyx_PyInt_As_long(__pyx_v_nelem); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_i = __pyx_t_6; + + /* "PyCafeDefs.pxi":940 + * else: + * for i in range(0, nelem): + * print (self.value[i],"[%d]" %i , end=" ") # <<<<<<<<<<<<<< + * + * + */ + if (unlikely(__pyx_v_self->value == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_7); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); + __pyx_t_1 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_end, __pyx_kp_u__93) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + } + __pyx_L13:; + } + __pyx_L11:; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":943 + * + * + * print ("") # <<<<<<<<<<<<<< + * print ("status = %d" % self.status) + * #if self.alarmStatus != -1: + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":944 + * + * print ("") + * print ("status = %d" % self.status) # <<<<<<<<<<<<<< + * #if self.alarmStatus != -1: + * print ("alarmStatus = %d" % self.alarmStatus) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->status); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_status_d, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_1, 0, __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_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __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; + + /* "PyCafeDefs.pxi":946 + * print ("status = %d" % self.status) + * #if self.alarmStatus != -1: + * print ("alarmStatus = %d" % self.alarmStatus) # <<<<<<<<<<<<<< + * print ("alarmSeverity = %d" % self.alarmSeverity) + * #if self.ts[0] != 0: + */ + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->alarmStatus); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_alarmStatus_d, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __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; + + /* "PyCafeDefs.pxi":947 + * #if self.alarmStatus != -1: + * print ("alarmStatus = %d" % self.alarmStatus) + * print ("alarmSeverity = %d" % self.alarmSeverity) # <<<<<<<<<<<<<< + * #if self.ts[0] != 0: + * print ("ts =", self.ts[0], self.ts[1]) + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->alarmSeverity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_alarmSeverity_d, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_1, 0, __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_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __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; + + /* "PyCafeDefs.pxi":949 + * print ("alarmSeverity = %d" % self.alarmSeverity) + * #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],\ + */ + if (unlikely(__pyx_v_self->ts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_self->ts, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_self->ts == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ts, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_ts_2); + __Pyx_GIVEREF(__pyx_kp_u_ts_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_ts_2); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); + __pyx_t_7 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __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 + * #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 (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + + /* "PyCafeDefs.pxi":951 + * 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]) + * return + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + + /* "PyCafeDefs.pxi":952 + * print ("tsDate =", self.tsDate[0], self.tsDate[1], \ + * self.tsDate[2], self.tsDate[3],\ + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) # <<<<<<<<<<<<<< + * return + * + */ + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_10); + if (unlikely(__pyx_v_self->tsDate == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_self->tsDate, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + + /* "PyCafeDefs.pxi":950 + * #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]) + */ + __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_12); + __Pyx_INCREF(__pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_kp_u_tsDate); + PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_12, 5, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_12, 6, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_12, 7, __pyx_t_11); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_9 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafeDefs.pxi":953 + * self.tsDate[2], self.tsDate[3],\ + * self.tsDate[4], self.tsDate[5], self.tsDate[6]) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafeDefs.pxi":906 + * 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_2); + __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_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":873 + * ################################################################################## + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":874 + * cdef class pvdata: + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus # <<<<<<<<<<<<<< + * cdef readonly int alarmSeverity + * cdef readonly list ts + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":875 + * cdef readonly unsigned int nelem + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity # <<<<<<<<<<<<<< + * cdef readonly list ts + * cdef readonly list tsDate + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":876 + * cdef readonly int alarmStatus + * cdef readonly int alarmSeverity + * cdef readonly list ts # <<<<<<<<<<<<<< + * cdef readonly list tsDate + * cdef readonly list value + */ + +/* 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":877 + * cdef readonly int alarmSeverity + * cdef readonly list ts + * cdef readonly list tsDate # <<<<<<<<<<<<<< + * cdef readonly list value + * cdef readonly int status + */ + +/* 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":878 + * cdef readonly list ts + * cdef readonly list tsDate + * cdef readonly list value # <<<<<<<<<<<<<< + * cdef readonly int status + * + */ + +/* 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":879 + * cdef readonly list tsDate + * cdef readonly list value + * cdef readonly int status # <<<<<<<<<<<<<< + * + * cdef readonly tuple pythonVersion + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; +} + +/* "PyCafeDefs.pxi":881 + * cdef readonly int status + * + * cdef readonly tuple pythonVersion # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6pvdata_13pythonVersion_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6pvdata_13pythonVersion_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6pvdata_13pythonVersion___get__(((struct __pyx_obj_6PyCafe_pvdata *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6pvdata_13pythonVersion___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->pythonVersion); + __pyx_r = __pyx_v_self->pythonVersion; + 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":973 + * cdef tuple pythonVersion + * + * 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 + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafeDefs.pxi":974 + * + * def __cinit__(self): + * self.groupStatus=ICAFE_NORMAL # <<<<<<<<<<<<<< + * self.rule=True + * self.hasAlarm=True + */ + __pyx_v_self->groupStatus = ICAFE_NORMAL; + + /* "PyCafeDefs.pxi":975 + * def __cinit__(self): + * self.groupStatus=ICAFE_NORMAL + * self.rule=True # <<<<<<<<<<<<<< + * self.hasAlarm=True + * self.hasTS=True + */ + __pyx_v_self->rule = 1; + + /* "PyCafeDefs.pxi":976 + * self.groupStatus=ICAFE_NORMAL + * self.rule=True + * self.hasAlarm=True # <<<<<<<<<<<<<< + * self.hasTS=True + * self.pythonVersion=sys.version_info[0:4] + */ + __pyx_v_self->hasAlarm = 1; + + /* "PyCafeDefs.pxi":977 + * self.rule=True + * self.hasAlarm=True + * self.hasTS=True # <<<<<<<<<<<<<< + * self.pythonVersion=sys.version_info[0:4] + * return + */ + __pyx_v_self->hasTS = 1; + + /* "PyCafeDefs.pxi":978 + * self.hasAlarm=True + * self.hasTS=True + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 4, NULL, NULL, &__pyx_slice__106, 1, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->pythonVersion); + __Pyx_DECREF(__pyx_v_self->pythonVersion); + __pyx_v_self->pythonVersion = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":979 + * self.hasTS=True + * self.pythonVersion=sys.version_info[0:4] + * return # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":973 + * cdef tuple pythonVersion + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.groupStatus=ICAFE_NORMAL + * self.rule=True + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("PyCafe.pvgroup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafeDefs.pxi":981 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("show", 0); + + /* "PyCafeDefs.pxi":982 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __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":983 + * 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":981 + * 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":985 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("showWithPV", 0); + + /* "PyCafeDefs.pxi":986 + * + * 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_1 = PyObject_Length(__pyx_v_glist); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((__pyx_t_1 != __pyx_v_self->npv) != 0); + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":987 + * 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 + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":988 + * 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) + */ + __pyx_t_1 = PyObject_Length(__pyx_v_glist); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->npv); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __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__108); + __Pyx_GIVEREF(__pyx_kp_u__108); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_kp_u__108); + __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_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __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":989 + * print ("ERROR: GROUP MEMBER MISMATCH!!") + * 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":986 + * + * 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,"!!") + */ + } + + /* "PyCafeDefs.pxi":990 + * print (glist, "has", len(glist), "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_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __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":991 + * 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":985 + * 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":993 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("showMax", 0); + __Pyx_INCREF(__pyx_v__npv); + + /* "PyCafeDefs.pxi":994 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "PyCafeDefs.pxi":998 + * #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_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v__npv, __pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":994 + * + * def showMax(self, _npv): + * if _npv > self.npv: # <<<<<<<<<<<<<< + * #print ("----------------------" + * #print ("Note: Max. Npv =", self.npv + */ + } + + /* "PyCafeDefs.pxi":999 + * #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_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1000 + * _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":993 + * 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":1002 + * 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; + unsigned int __pyx_t_4; + int __pyx_t_5; + Py_ssize_t __pyx_t_6; + unsigned int __pyx_t_7; + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("showPrint", 0); + + /* "PyCafeDefs.pxi":1003 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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":1004 + * 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 + */ + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->groupHandle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __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":1005 + * print ("GROUP NAME = ", self.name) + * print ("GROUP HANDLE = ", self.groupHandle) + * print ("GROUP STATUS = ", self.groupStatus) # <<<<<<<<<<<<<< + * cdef unsigned int i,j + * #if nelem==1: + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->groupStatus); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __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":1011 + * #else: + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafeDefs.pxi":1012 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __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__109); + __Pyx_GIVEREF(__pyx_kp_u__109); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__109); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __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":1013 + * for i in range(0, npv): + * print ("Member: ", i, "---------------------------------") + * if grouplist: # <<<<<<<<<<<<<< + * print ("PV =", grouplist[i]) + * + */ + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_grouplist); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_5) { + + /* "PyCafeDefs.pxi":1014 + * print ("Member: ", i, "---------------------------------") + * if grouplist: + * print ("PV =", grouplist[i]) # <<<<<<<<<<<<<< + * + * if self.pythonVersion[0] < 3: + */ + __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __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":1013 + * for i in range(0, npv): + * print ("Member: ", i, "---------------------------------") + * if grouplist: # <<<<<<<<<<<<<< + * print ("PV =", grouplist[i]) + * + */ + } + + /* "PyCafeDefs.pxi":1016 + * print ("PV =", grouplist[i]) + * + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * + * print ("values = " ) + */ + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_5) { + + /* "PyCafeDefs.pxi":1018 + * if self.pythonVersion[0] < 3: + * + * print ("values = " ) # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print (self.pvdata[i].value[j],"[%d]"%j ) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1019 + * + * print ("values = " ) + * for j in range(0, len(self.pvdata[i].value)): # <<<<<<<<<<<<<< + * print (self.pvdata[i].value[j],"[%d]"%j ) + * + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_j = __pyx_t_7; + + /* "PyCafeDefs.pxi":1020 + * print ("values = " ) + * for j in range(0, len(self.pvdata[i].value)): + * print (self.pvdata[i].value[j],"[%d]"%j ) # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __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_8); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8); + __pyx_t_1 = 0; + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + + /* "PyCafeDefs.pxi":1016 + * print ("PV =", grouplist[i]) + * + * if self.pythonVersion[0] < 3: # <<<<<<<<<<<<<< + * + * print ("values = " ) + */ + goto __pyx_L6; + } + + /* "PyCafeDefs.pxi":1024 + * else: + * + * print ("values = " ,end="") # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print (self.pvdata[i].value[j],"[%d]"%j, end=" ") + */ + /*else*/ { + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_end, __pyx_kp_u__85) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__111, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __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; + + /* "PyCafeDefs.pxi":1025 + * + * print ("values = " ,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_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_j = __pyx_t_7; + + /* "PyCafeDefs.pxi":1026 + * print ("values = " ,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_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __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_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_value_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_j, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __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_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_d, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_8 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_kp_u__93) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + } + __pyx_L6:; + + /* "PyCafeDefs.pxi":1028 + * print (self.pvdata[i].value[j],"[%d]"%j, end=" ") + * + * print ("") # <<<<<<<<<<<<<< + * print ("status = %d" % self.pvdata[i].status) + * print ("alarmStatus = %d" % self.pvdata[i].alarmStatus) + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1029 + * + * print ("") + * print ("status = %d" % self.pvdata[i].status) # <<<<<<<<<<<<<< + * print ("alarmStatus = %d" % self.pvdata[i].alarmStatus) + * print ("alarmSeverity = %d" % self.pvdata[i].alarmSeverity) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __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_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_status_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_status_d, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1030 + * 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].ts[1]) + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __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_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_alarmStatus); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_alarmStatus_d, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __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; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1031 + * 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].ts[1]) + * print ("tsDate =", self.pvdata[i].tsDate[0], self.pvdata[i].tsDate[1], \ + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __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_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_alarmSeverity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_alarmSeverity_d, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __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; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1032 + * print ("alarmStatus = %d" % self.pvdata[i].alarmStatus) + * print ("alarmSeverity = %d" % self.pvdata[i].alarmSeverity) + * 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_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __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_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __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, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_u_ts_2); + __Pyx_GIVEREF(__pyx_kp_u_ts_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_ts_2); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); + __pyx_t_8 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __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":1033 + * print ("alarmSeverity = %d" % self.pvdata[i].alarmSeverity) + * 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_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __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, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __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_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafeDefs.pxi":1034 + * 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 ("--------------------------------------------") + */ + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __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_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_9 = __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_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_10, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "PyCafeDefs.pxi":1035 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(__pyx_v_self->pvdata == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_11 = __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_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_tsDate_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_12, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __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_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __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, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + + /* "PyCafeDefs.pxi":1033 + * print ("alarmSeverity = %d" % self.pvdata[i].alarmSeverity) + * 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_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_INCREF(__pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_kp_u_tsDate); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_kp_u_tsDate); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_13, 5, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_13, 6, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_13, 7, __pyx_t_12); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_8 = 0; + __pyx_t_9 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "PyCafeDefs.pxi":1036 + * 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_12 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + + /* "PyCafeDefs.pxi":1037 + * 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":1002 + * 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_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_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":962 + * ################################################################################## + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __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":963 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __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":964 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __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":965 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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":966 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __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":967 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->rule); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __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":968 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->hasAlarm); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __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":969 + * cpdef public bint rule + * cpdef public bint hasAlarm + * cpdef public bint hasTS # <<<<<<<<<<<<<< + * + * cdef tuple pythonVersion + */ + +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->hasTS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __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; +} + +/* "PyCafeDefs.pxi":1066 + * + * ################################################################################## + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getMatchedDataType", 0); + + /* "PyCafeDefs.pxi":1071 + * #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_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafeDefs.pxi":1073 + * cdef unsigned int dtcheck=dtn; + * + * if dt in ['uchar','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_n_u_uchar, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __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":1074 + * + * if dt in ['uchar','uint8']: + * dtcheck=CAFE_CHAR # <<<<<<<<<<<<<< + * elif dt in ['ushort','uint16']: + * dtcheck=CAFE_USHORT + */ + __pyx_v_dtcheck = CAFE_CHAR; + + /* "PyCafeDefs.pxi":1073 + * cdef unsigned int dtcheck=dtn; + * + * if dt in ['uchar','uint8']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_CHAR + * elif dt in ['ushort','uint16']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1075 + * if dt in ['uchar','uint8']: + * dtcheck=CAFE_CHAR + * elif dt in ['ushort','uint16']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_USHORT + * elif dt in ['short','int16','int8']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ushort, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint16, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_t_3; + __pyx_L6_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":1076 + * dtcheck=CAFE_CHAR + * elif dt in ['ushort','uint16']: + * dtcheck=CAFE_USHORT # <<<<<<<<<<<<<< + * elif dt in ['short','int16','int8']: + * dtcheck=CAFE_SHORT + */ + __pyx_v_dtcheck = CAFE_USHORT; + + /* "PyCafeDefs.pxi":1075 + * if dt in ['uchar','uint8']: + * dtcheck=CAFE_CHAR + * elif dt in ['ushort','uint16']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_USHORT + * elif dt in ['short','int16','int8']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1077 + * elif dt in ['ushort','uint16']: + * dtcheck=CAFE_USHORT + * elif dt in ['short','int16','int8']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_SHORT + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: + */ + __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_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L8_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_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L8_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_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_t_4; + __pyx_L8_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":1078 + * dtcheck=CAFE_USHORT + * elif dt in ['short','int16','int8']: + * dtcheck=CAFE_SHORT # <<<<<<<<<<<<<< + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: + * dtcheck=CAFE_LONG + */ + __pyx_v_dtcheck = CAFE_SHORT; + + /* "PyCafeDefs.pxi":1077 + * elif dt in ['ushort','uint16']: + * dtcheck=CAFE_USHORT + * elif dt in ['short','int16','int8']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_SHORT + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1079 + * elif dt in ['short','int16','int8']: + * dtcheck=CAFE_SHORT + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_LONG + * elif dt in ['double', 'float', 'float64']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_long, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ulong, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_ushort, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_int64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_uint64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_t_3; + __pyx_L11_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":1080 + * dtcheck=CAFE_SHORT + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: + * dtcheck=CAFE_LONG # <<<<<<<<<<<<<< + * elif dt in ['double', 'float', 'float64']: + * dtcheck=CAFE_DOUBLE + */ + __pyx_v_dtcheck = CAFE_LONG; + + /* "PyCafeDefs.pxi":1079 + * elif dt in ['short','int16','int8']: + * dtcheck=CAFE_SHORT + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_LONG + * elif dt in ['double', 'float', 'float64']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1081 + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: + * dtcheck=CAFE_LONG + * elif dt in ['double', 'float', 'float64']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_DOUBLE + * elif dt in ['float32']: + */ + __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_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __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_float, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __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_float64, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __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":1082 + * dtcheck=CAFE_LONG + * elif dt in ['double', 'float', 'float64']: + * dtcheck=CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif dt in ['float32']: + * dtcheck=CAFE_FLOAT + */ + __pyx_v_dtcheck = CAFE_DOUBLE; + + /* "PyCafeDefs.pxi":1081 + * elif dt in ['int','long','uint','ulong','ushort','int32','int64','uint32','uint64']: + * dtcheck=CAFE_LONG + * elif dt in ['double', 'float', 'float64']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_DOUBLE + * elif dt in ['float32']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1083 + * elif dt in ['double', 'float', 'float64']: + * dtcheck=CAFE_DOUBLE + * elif dt in ['float32']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_FLOAT + * elif dt in ['string','str','bytes','unicode']: + */ + __Pyx_INCREF(__pyx_v_dt); + __pyx_t_2 = __pyx_v_dt; + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_float32, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __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":1084 + * dtcheck=CAFE_DOUBLE + * elif dt in ['float32']: + * dtcheck=CAFE_FLOAT # <<<<<<<<<<<<<< + * elif dt in ['string','str','bytes','unicode']: + * dtcheck=CAFE_STRING + */ + __pyx_v_dtcheck = CAFE_FLOAT; + + /* "PyCafeDefs.pxi":1083 + * elif dt in ['double', 'float', 'float64']: + * dtcheck=CAFE_DOUBLE + * elif dt in ['float32']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_FLOAT + * elif dt in ['string','str','bytes','unicode']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1085 + * elif dt in ['float32']: + * dtcheck=CAFE_FLOAT + * elif dt in ['string','str','bytes','unicode']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_STRING + * elif dt in ['native','']: + */ + __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_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L23_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_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L23_bool_binop_done; + } + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_bytes, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_4) { + } else { + __pyx_t_3 = __pyx_t_4; + goto __pyx_L23_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_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_t_4; + __pyx_L23_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":1086 + * dtcheck=CAFE_FLOAT + * elif dt in ['string','str','bytes','unicode']: + * dtcheck=CAFE_STRING # <<<<<<<<<<<<<< + * elif dt in ['native','']: + * dtcheck=dtn #need a line here + */ + __pyx_v_dtcheck = CAFE_STRING; + + /* "PyCafeDefs.pxi":1085 + * elif dt in ['float32']: + * dtcheck=CAFE_FLOAT + * elif dt in ['string','str','bytes','unicode']: # <<<<<<<<<<<<<< + * dtcheck=CAFE_STRING + * elif dt in ['native','']: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1087 + * elif dt in ['string','str','bytes','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_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_native, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!__pyx_t_3) { + } else { + __pyx_t_4 = __pyx_t_3; + goto __pyx_L27_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__85, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_t_3; + __pyx_L27_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":1088 + * dtcheck=CAFE_STRING + * elif dt in ['native','']: + * dtcheck=dtn #need a line here # <<<<<<<<<<<<<< + * else: + * print ("Valid input parameters for data type are: '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_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_dtcheck = __pyx_t_1; + + /* "PyCafeDefs.pxi":1087 + * elif dt in ['string','str','bytes','unicode']: + * dtcheck=CAFE_STRING + * elif dt in ['native','']: # <<<<<<<<<<<<<< + * dtcheck=dtn #need a line here + * else: + */ + goto __pyx_L3; + } + + /* "PyCafeDefs.pxi":1090 + * dtcheck=dtn #need a line here + * else: + * print ("Valid input parameters for data type are: '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__115, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafeDefs.pxi":1091 + * else: + * print ("Valid input parameters for data type are: '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__116, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L3:; + + /* "PyCafeDefs.pxi":1093 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1066 + * + * ################################################################################## + * 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":1106 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * #global p1 + */ + +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); + 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; + long __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PVDataHolderToStruct", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_dt = __pyx_optional_args->dt; + } + } + + /* "PyCafeDefs.pxi":1109 + * + * #global p1 + * cdef pvdata p1 = pvdata() # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn = pvd.getDataType(); + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_pvdata), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __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":1111 + * 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":1112 + * + * cdef unsigned int dtn = pvd.getDataType(); + * cdef unsigned int dtcheck=dtn # <<<<<<<<<<<<<< + * cdef localList=[] + * + */ + __pyx_v_dtcheck = __pyx_v_dtn; + + /* "PyCafeDefs.pxi":1113 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1115 + * cdef localList=[] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck=getMatchedDataType(dt, dtn) + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dt); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1116 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafeDefs.pxi":1115 + * cdef localList=[] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck=getMatchedDataType(dt, dtn) + * + */ + } + + /* "PyCafeDefs.pxi":1118 + * 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":1119 + * + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1120 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1118 + * dtcheck=getMatchedDataType(dt, dtn) + * + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvd.getNelem()): + * localList.append(pvd.getAsString(i)) + */ + break; + + /* "PyCafeDefs.pxi":1121 + * 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) + */ + case CAFE_SHORT: + + /* "PyCafeDefs.pxi":1122 + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1123 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1121 + * 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; + + /* "PyCafeDefs.pxi":1124 + * 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) + */ + case CAFE_FLOAT: + + /* "PyCafeDefs.pxi":1125 + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1126 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1124 + * 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; + + /* "PyCafeDefs.pxi":1127 + * 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: + */ + case CAFE_ENUM: + + /* "PyCafeDefs.pxi":1130 + * #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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1131 + * #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_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1127 + * 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; + + /* "PyCafeDefs.pxi":1135 + * # 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) + */ + case CAFE_CHAR: + + /* "PyCafeDefs.pxi":1136 + * # 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: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1137 + * 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()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvd.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1135 + * # 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) + */ + break; + + /* "PyCafeDefs.pxi":1138 + * 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)) + */ + case CAFE_LONG: + + /* "PyCafeDefs.pxi":1139 + * 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: + */ + __pyx_t_4 = __pyx_v_pvd.getNelem(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1140 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1138 + * 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)) + */ + break; + + /* "PyCafeDefs.pxi":1141 + * 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)) + */ + case CAFE_DOUBLE: + + /* "PyCafeDefs.pxi":1142 + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1143 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1141 + * 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":1145 + * 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_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "PyCafeDefs.pxi":1151 + * + * + * p1.value=localList # <<<<<<<<<<<<<< + * p1.status=pvd.getStatus() + * p1.nelem=pvd.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_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __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":1152 + * + * p1.value=localList + * p1.status=pvd.getStatus() # <<<<<<<<<<<<<< + * p1.nelem=pvd.getNelem() + * p1.alarmStatus=pvd.getAlarmStatus() + */ + __pyx_v_p1->status = __pyx_v_pvd.getStatus(); + + /* "PyCafeDefs.pxi":1153 + * p1.value=localList + * p1.status=pvd.getStatus() + * p1.nelem=pvd.getNelem() # <<<<<<<<<<<<<< + * p1.alarmStatus=pvd.getAlarmStatus() + * p1.alarmSeverity=pvd.getAlarmSeverity() + */ + __pyx_v_p1->nelem = __pyx_v_pvd.getNelem(); + + /* "PyCafeDefs.pxi":1154 + * p1.status=pvd.getStatus() + * p1.nelem=pvd.getNelem() + * p1.alarmStatus=pvd.getAlarmStatus() # <<<<<<<<<<<<<< + * p1.alarmSeverity=pvd.getAlarmSeverity() + * + */ + __pyx_v_p1->alarmStatus = __pyx_v_pvd.getAlarmStatus(); + + /* "PyCafeDefs.pxi":1155 + * p1.nelem=pvd.getNelem() + * p1.alarmStatus=pvd.getAlarmStatus() + * p1.alarmSeverity=pvd.getAlarmSeverity() # <<<<<<<<<<<<<< + * + * pvd._etsNorm=pvd.getEpicsTimeStampAsUInt32() + */ + __pyx_v_p1->alarmSeverity = __pyx_v_pvd.getAlarmSeverity(); + + /* "PyCafeDefs.pxi":1157 + * p1.alarmSeverity=pvd.getAlarmSeverity() + * + * pvd._etsNorm=pvd.getEpicsTimeStampAsUInt32() # <<<<<<<<<<<<<< + * + * cpdef ll=[] + */ + __pyx_v_pvd._etsNorm = __pyx_v_pvd.getEpicsTimeStampAsUInt32(); + + /* "PyCafeDefs.pxi":1159 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ll = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1160 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1161 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1162 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __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":1164 + * p1.ts=ll + * + * pvd._etsDate=pvd.getEpicsTimeStampAsDate() # <<<<<<<<<<<<<< + * + * cpdef ld=[] + */ + __pyx_v_pvd._etsDate = __pyx_v_pvd.getEpicsTimeStampAsDate(); + + /* "PyCafeDefs.pxi":1166 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_ld = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1167 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1168 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1169 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1170 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1171 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1172 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1173 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1174 + * ld.append( (pvd._etsDate).sec ) + * ld.append( (pvd._etsDate).nsec ) + * p1.tsDate=ld # <<<<<<<<<<<<<< + * + * + */ + 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_filename = __pyx_f[0]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __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":1178 + * + * + * return p1 # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_p1)); + __pyx_r = __pyx_v_p1; + goto __pyx_L0; + + /* "PyCafeDefs.pxi":1106 + * ################################################################################# + * + * cdef pvdata PVDataHolderToStruct(PVDataHolder pvd, dt=None): # <<<<<<<<<<<<<< + * + * #global p1 + */ + + /* 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":1185 + * ################################################################################# + * + * 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; + long __pyx_t_5; + int __pyx_t_6; + short __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PVCtrlHolderToStruct", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_dt = __pyx_optional_args->dt; + } + } + + /* "PyCafeDefs.pxi":1188 + * + * #global c1 + * cdef pvctrl c1 = pvctrl() # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn = pvc.getDataType(); + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_pvctrl), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __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":1190 + * cdef pvctrl c1 = pvctrl() + * + * cdef unsigned int dtn = pvc.getDataType(); # <<<<<<<<<<<<<< + * + * cdef unsigned int dtcheck=dtn + */ + __pyx_v_dtn = __pyx_v_pvc.getDataType(); + + /* "PyCafeDefs.pxi":1192 + * cdef unsigned int dtn = pvc.getDataType(); + * + * cdef unsigned int dtcheck=dtn # <<<<<<<<<<<<<< + * + * cdef localList=[] + */ + __pyx_v_dtcheck = __pyx_v_dtn; + + /* "PyCafeDefs.pxi":1194 + * cdef unsigned int dtcheck=dtn + * + * cdef localList=[] # <<<<<<<<<<<<<< + * + * if dt: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_localList = __pyx_t_1; + __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":1196 + * cdef localList=[] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck=getMatchedDataType(dt, dtn) + * + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dt); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "PyCafeDefs.pxi":1197 + * + * 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_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafeDefs.pxi":1196 + * cdef localList=[] + * + * if dt: # <<<<<<<<<<<<<< + * dtcheck=getMatchedDataType(dt, dtn) + * + */ + } + + /* "PyCafeDefs.pxi":1199 + * 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":1200 + * + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1201 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1199 + * dtcheck=getMatchedDataType(dt, dtn) + * + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * for i in range(0, pvc.getNelem()): + * localList.append(pvc.getAsString(i)) + */ + break; + + /* "PyCafeDefs.pxi":1202 + * 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) + */ + case CAFE_SHORT: + + /* "PyCafeDefs.pxi":1203 + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1204 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1202 + * 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; + + /* "PyCafeDefs.pxi":1205 + * 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) + */ + case CAFE_FLOAT: + + /* "PyCafeDefs.pxi":1206 + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1207 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1205 + * 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; + + /* "PyCafeDefs.pxi":1208 + * 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: + */ + case CAFE_ENUM: + + /* "PyCafeDefs.pxi":1211 + * #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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1212 + * #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_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1208 + * 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; + + /* "PyCafeDefs.pxi":1216 + * # 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) + */ + case CAFE_CHAR: + + /* "PyCafeDefs.pxi":1217 + * # 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: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1218 + * 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()): + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pvc.getAsLong(__pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1216 + * # 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) + */ + break; + + /* "PyCafeDefs.pxi":1219 + * 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)) + */ + case CAFE_LONG: + + /* "PyCafeDefs.pxi":1220 + * 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: + */ + __pyx_t_4 = __pyx_v_pvc.getNelem(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1221 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1219 + * 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)) + */ + break; + + /* "PyCafeDefs.pxi":1222 + * 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)) + */ + case CAFE_DOUBLE: + + /* "PyCafeDefs.pxi":1223 + * 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(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1224 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1222 + * 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":1226 + * 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_6 = __Pyx_PyObject_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "PyCafeDefs.pxi":1229 + * #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_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __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":1230 + * #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":1231 + * 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":1232 + * 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":1233 + * 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":1235 + * c1.alarmSeverity=pvc.getAlarmSeverity() + * + * c1.precision=pvc.getPrecision() # <<<<<<<<<<<<<< + * c1.noEnumStrings=pvc.getNoEnumStrings() + * + */ + __pyx_v_c1->precision = __pyx_v_pvc.getPrecision(); + + /* "PyCafeDefs.pxi":1236 + * + * c1.precision=pvc.getPrecision() + * c1.noEnumStrings=pvc.getNoEnumStrings() # <<<<<<<<<<<<<< + * + * enumList=[] + */ + __pyx_v_c1->noEnumStrings = __pyx_v_pvc.getNoEnumStrings(); + + /* "PyCafeDefs.pxi":1238 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_enumList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1239 + * + * enumList=[] + * for i in range(0, pvc.getNoEnumStrings()): # <<<<<<<<<<<<<< + * enumList.append(pvc.getEnumStrings()[i]) + * + */ + __pyx_t_7 = __pyx_v_pvc.getNoEnumStrings(); + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_7; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafeDefs.pxi":1240 + * 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_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_enumList, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + + /* "PyCafeDefs.pxi":1242 + * enumList.append(pvc.getEnumStrings()[i]) + * + * c1.enumStrings=enumList # <<<<<<<<<<<<<< + * + * c1.units=pvc.getUnitsAsString() + */ + __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":1244 + * c1.enumStrings=enumList + * + * c1.units=pvc.getUnitsAsString() # <<<<<<<<<<<<<< + * + * c1.upperDisplayLimit=pvc.getUpperDispLimit_AsDouble() + */ + __pyx_v_c1->units = __pyx_v_pvc.getUnitsAsString(); + + /* "PyCafeDefs.pxi":1246 + * c1.units=pvc.getUnitsAsString() + * + * c1.upperDisplayLimit=pvc.getUpperDispLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerDisplayLimit=pvc.getLowerDispLimit_AsDouble() + * c1.upperAlarmLimit =pvc.getUpperAlarmLimit_AsDouble() + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvc.getUpperDispLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->upperDisplayLimit); + __Pyx_DECREF(__pyx_v_c1->upperDisplayLimit); + __pyx_v_c1->upperDisplayLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1247 + * + * c1.upperDisplayLimit=pvc.getUpperDispLimit_AsDouble() + * c1.lowerDisplayLimit=pvc.getLowerDispLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.upperAlarmLimit =pvc.getUpperAlarmLimit_AsDouble() + * c1.upperWarningLimit=pvc.getUpperWarningLimit_AsDouble() + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvc.getLowerDispLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->lowerDisplayLimit); + __Pyx_DECREF(__pyx_v_c1->lowerDisplayLimit); + __pyx_v_c1->lowerDisplayLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1248 + * 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_3 = PyFloat_FromDouble(__pyx_v_pvc.getUpperAlarmLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->upperAlarmLimit); + __Pyx_DECREF(__pyx_v_c1->upperAlarmLimit); + __pyx_v_c1->upperAlarmLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1249 + * 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_3 = PyFloat_FromDouble(__pyx_v_pvc.getUpperWarningLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->upperWarningLimit); + __Pyx_DECREF(__pyx_v_c1->upperWarningLimit); + __pyx_v_c1->upperWarningLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1250 + * 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_3 = PyFloat_FromDouble(__pyx_v_pvc.getLowerWarningLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->lowerWarningLimit); + __Pyx_DECREF(__pyx_v_c1->lowerWarningLimit); + __pyx_v_c1->lowerWarningLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1251 + * 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_3 = PyFloat_FromDouble(__pyx_v_pvc.getLowerAlarmLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->lowerAlarmLimit); + __Pyx_DECREF(__pyx_v_c1->lowerAlarmLimit); + __pyx_v_c1->lowerAlarmLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1252 + * c1.lowerWarningLimit=pvc.getLowerWarningLimit_AsDouble() + * c1.lowerAlarmLimit =pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit=pvc.getUpperCtrlLimit_AsDouble() # <<<<<<<<<<<<<< + * c1.lowerControlLimit=pvc.getLowerCtrlLimit_AsDouble() + * + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvc.getUpperCtrlLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->upperControlLimit); + __Pyx_DECREF(__pyx_v_c1->upperControlLimit); + __pyx_v_c1->upperControlLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1253 + * c1.lowerAlarmLimit =pvc.getLowerAlarmLimit_AsDouble() + * c1.upperControlLimit=pvc.getUpperCtrlLimit_AsDouble() + * c1.lowerControlLimit=pvc.getLowerCtrlLimit_AsDouble() # <<<<<<<<<<<<<< + * + * return c1 + */ + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_pvc.getLowerCtrlLimit_AsDouble()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_c1->lowerControlLimit); + __Pyx_DECREF(__pyx_v_c1->lowerControlLimit); + __pyx_v_c1->lowerControlLimit = __pyx_t_3; + __pyx_t_3 = 0; + + /* "PyCafeDefs.pxi":1255 + * 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":1185 + * ################################################################################# + * + * 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_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":1261 + * ################################################################################# + * + * 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; + struct __pyx_obj_6PyCafe_channelInfo *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("channelRegaliaToStruct", 0); + + /* "PyCafeDefs.pxi":1263 + * cdef channelInfo channelRegaliaToStruct(ChannelRegalia cr): + * + * cdef channelInfo ci = channelInfo() # <<<<<<<<<<<<<< + * + * ci.channelID = ( cr.getChannelID()) + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_channelInfo), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __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":1265 + * cdef channelInfo ci = channelInfo() + * + * ci.channelID = ( cr.getChannelID()) # <<<<<<<<<<<<<< + * ci.connectFlag=cr.getConnectFlag() + * ci.hostName =cr.getHostNameAsString() + */ + __pyx_v_ci->channelID = ((long)__pyx_v_cr.getChannelID()); + + /* "PyCafeDefs.pxi":1266 + * + * ci.channelID = ( cr.getChannelID()) + * ci.connectFlag=cr.getConnectFlag() # <<<<<<<<<<<<<< + * ci.hostName =cr.getHostNameAsString() + * ci.dataType =cr.getDataType() + */ + __pyx_v_ci->connectFlag = __pyx_v_cr.getConnectFlag(); + + /* "PyCafeDefs.pxi":1267 + * ci.channelID = ( cr.getChannelID()) + * ci.connectFlag=cr.getConnectFlag() + * ci.hostName =cr.getHostNameAsString() # <<<<<<<<<<<<<< + * ci.dataType =cr.getDataType() + * ci.className =cr.getClassNameAsString() + */ + __pyx_v_ci->hostName = __pyx_v_cr.getHostNameAsString(); + + /* "PyCafeDefs.pxi":1268 + * ci.connectFlag=cr.getConnectFlag() + * ci.hostName =cr.getHostNameAsString() + * ci.dataType =cr.getDataType() # <<<<<<<<<<<<<< + * ci.className =cr.getClassNameAsString() + * ci.accessRead =cr.getAccessRead() + */ + __pyx_v_ci->dataType = __pyx_v_cr.getDataType(); + + /* "PyCafeDefs.pxi":1269 + * ci.hostName =cr.getHostNameAsString() + * ci.dataType =cr.getDataType() + * ci.className =cr.getClassNameAsString() # <<<<<<<<<<<<<< + * ci.accessRead =cr.getAccessRead() + * ci.accessWrite=cr.getAccessWrite() + */ + __pyx_v_ci->className = __pyx_v_cr.getClassNameAsString(); + + /* "PyCafeDefs.pxi":1270 + * ci.dataType =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":1271 + * 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":1272 + * 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":1273 + * 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":1274 + * 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":1275 + * 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":1276 + * ci.cafeConnectionState=cr.getCafeConnectionState() + * ci.connectionStateAsString =cr.getConnectionStateAsString() + * ci.cafeConnectionStateAsString =cr.getCafeConnectionStateAsString() # <<<<<<<<<<<<<< + * return ci + * ################################################################################# + */ + __pyx_v_ci->cafeConnectionStateAsString = __pyx_v_cr.getCafeConnectionStateAsString(); + + /* "PyCafeDefs.pxi":1277 + * 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":1261 + * ################################################################################# + * + * 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; +} + +/* "PyCafe.pyx":65 + * str exString + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self._c_cafe = new ccafe.CAFE() + * if self._c_cafe is NULL: + */ + +/* 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) { + int __pyx_r; + __Pyx_RefNannyDeclarations + CAFE *__pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "PyCafe.pyx":66 + * + * def __cinit__(self): + * self._c_cafe = new ccafe.CAFE() # <<<<<<<<<<<<<< + * if self._c_cafe is NULL: + * raise MemoryError() + */ + try { + __pyx_t_1 = new CAFE(); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_self->_c_cafe = __pyx_t_1; + + /* "PyCafe.pyx":67 + * def __cinit__(self): + * self._c_cafe = new ccafe.CAFE() + * if self._c_cafe is NULL: # <<<<<<<<<<<<<< + * raise MemoryError() + * + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe == NULL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":68 + * self._c_cafe = new ccafe.CAFE() + * if self._c_cafe is NULL: + * raise MemoryError() # <<<<<<<<<<<<<< + * + * self.cs =self._c_cafe.getCafeStatus() + */ + PyErr_NoMemory(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":67 + * def __cinit__(self): + * self._c_cafe = new ccafe.CAFE() + * if self._c_cafe is NULL: # <<<<<<<<<<<<<< + * raise MemoryError() + * + */ + } + + /* "PyCafe.pyx":70 + * raise MemoryError() + * + * self.cs =self._c_cafe.getCafeStatus() # <<<<<<<<<<<<<< + * ##self.css=self._c_cafe_getCafeStatusSeverity() + * + */ + __pyx_v_self->cs = __pyx_v_self->_c_cafe->getCafeStatus(); + + /* "PyCafe.pyx":73 + * ##self.css=self._c_cafe_getCafeStatusSeverity() + * + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * + * self.haveExceptions=True + */ + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_version_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 4, NULL, NULL, &__pyx_slice__117, 1, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->pythonVersion); + __Pyx_DECREF(__pyx_v_self->pythonVersion); + __pyx_v_self->pythonVersion = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":75 + * self.pythonVersion=sys.version_info[0:4] + * + * self.haveExceptions=True # <<<<<<<<<<<<<< + * + * self.exString="EXCEPTION RAISED IN PyCafe.pyx:" + */ + __pyx_v_self->haveExceptions = 1; + + /* "PyCafe.pyx":77 + * self.haveExceptions=True + * + * self.exString="EXCEPTION RAISED IN PyCafe.pyx:" # <<<<<<<<<<<<<< + * #self.moncbList =[] + * #self.monidList=[] + */ + __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->exString); + __Pyx_DECREF(__pyx_v_self->exString); + __pyx_v_self->exString = __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_pyx; + + /* "PyCafe.pyx":65 + * str exString + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self._c_cafe = new ccafe.CAFE() + * if self._c_cafe is NULL: + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("PyCafe.CyCafe.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":88 + * + * + * 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":89 + * + * def __dealloc__(self): + * del self._c_cafe # <<<<<<<<<<<<<< + * + * + */ + delete __pyx_v_self->_c_cafe; + + /* "PyCafe.pyx":88 + * + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self._c_cafe + * + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "PyCafe.pyx":93 + * + * ################################################################################## + * def init(self): # <<<<<<<<<<<<<< + * return self._c_cafe.init() + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_5init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_5init(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_4init(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_4init(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("init", 0); + + /* "PyCafe.pyx":94 + * ################################################################################## + * def init(self): + * return self._c_cafe.init() # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->init()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":93 + * + * ################################################################################## + * def init(self): # <<<<<<<<<<<<<< + * return self._c_cafe.init() + * ################################################################################## + */ + + /* function 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.init", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":97 + * ################################################################################## + * + * def withExceptions(self, bint exceptions=True): # <<<<<<<<<<<<<< + * self.haveExceptions=exceptions + * return self.haveExceptions + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_7withExceptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_7withExceptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_exceptions; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + 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 = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + 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_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __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_6withExceptions(((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_6withExceptions(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_exceptions) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("withExceptions", 0); + + /* "PyCafe.pyx":98 + * + * def withExceptions(self, bint exceptions=True): + * self.haveExceptions=exceptions # <<<<<<<<<<<<<< + * return self.haveExceptions + * + */ + __pyx_v_self->haveExceptions = __pyx_v_exceptions; + + /* "PyCafe.pyx":99 + * def withExceptions(self, bint exceptions=True): + * self.haveExceptions=exceptions + * return self.haveExceptions # <<<<<<<<<<<<<< + * + * #def getMonidList(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->haveExceptions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":97 + * ################################################################################## + * + * def withExceptions(self, bint exceptions=True): # <<<<<<<<<<<<<< + * self.haveExceptions=exceptions + * return self.haveExceptions + */ + + /* function 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":111 + * + * ################################################################################## + * def open(self, pv): # <<<<<<<<<<<<<< + * cdef str _METHOD_="open(pv)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_9open(PyObject *__pyx_v_self, PyObject *__pyx_v_pv); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_9open(PyObject *__pyx_v_self, PyObject *__pyx_v_pv) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("open (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_8open(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_pv)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_8open(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_pv) { + PyObject *__pyx_v__METHOD_ = 0; + std::vector __pyx_v_pvV; + std::vector __pyx_v_handleV; + PyObject *__pyx_v_py_string = 0; + Py_ssize_t __pyx_v_i; + CYTHON_UNUSED int __pyx_v_status; + PyObject *__pyx_v_e = NULL; + struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v__cyCafeException = NULL; + unsigned int __pyx_v_handle; + 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; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + std::string __pyx_t_7; + 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; + int __pyx_t_13; + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("open", 0); + + /* "PyCafe.pyx":112 + * ################################################################################## + * def open(self, pv): + * cdef str _METHOD_="open(pv)" # <<<<<<<<<<<<<< + * + * cdef vector[string] pvV + */ + __Pyx_INCREF(__pyx_kp_u_open_pv); + __pyx_v__METHOD_ = __pyx_kp_u_open_pv; + + /* "PyCafe.pyx":118 + * cdef bytes py_string + * + * if isinstance(pv, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(pv)): + * if isinstance(pv[i], unicode): + */ + __pyx_t_1 = PyList_Check(__pyx_v_pv); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":119 + * + * if isinstance(pv, (list)): + * for i in range(0, len(pv)): # <<<<<<<<<<<<<< + * if isinstance(pv[i], unicode): + * py_string = (pv[i]).encode('UTF-8') + */ + __pyx_t_3 = PyObject_Length(__pyx_v_pv); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":120 + * 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 ) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyUnicode_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":121 + * 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): + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF_SET(__pyx_v_py_string, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":122 + * 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') ) + */ + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_v_py_string); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + try { + __pyx_v_pvV.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":120 + * 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 ) + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":123 + * 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: + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyBytes_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":124 + * pvV.push_back( py_string ) + * elif isinstance(pv[i], bytes): + * pvV.push_back( (pv[i]).encode('utf8') ) # <<<<<<<<<<<<<< + * else: + * print ("Unknown type in {}".format(_METHOD_)) + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_pv, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + try { + __pyx_v_pvV.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":123 + * 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: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":126 + * pvV.push_back( (pv[i]).encode('utf8') ) + * else: + * print ("Unknown type in {}".format(_METHOD_)) # <<<<<<<<<<<<<< + * try: + * status=self._c_cafe.openV(pvV, handleV) + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unknown_type_in, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_8) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v__METHOD_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + } else { + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; + __Pyx_INCREF(__pyx_v__METHOD_); + __Pyx_GIVEREF(__pyx_v__METHOD_); + PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v__METHOD_); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __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_L6:; + } + + /* "PyCafe.pyx":127 + * else: + * print ("Unknown type in {}".format(_METHOD_)) + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.openV(pvV, handleV) + * except RuntimeError as e: + */ + { + __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:*/ { + + /* "PyCafe.pyx":128 + * print ("Unknown type in {}".format(_METHOD_)) + * try: + * status=self._c_cafe.openV(pvV, handleV) # <<<<<<<<<<<<<< + * except RuntimeError as e: + * if isinstance (e.args, tuple): + */ + try { + __pyx_t_13 = __pyx_v_self->_c_cafe->openV(__pyx_v_pvV, __pyx_v_handleV); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + } + __pyx_v_status = __pyx_t_13; + + /* "PyCafe.pyx":127 + * else: + * print ("Unknown type in {}".format(_METHOD_)) + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.openV(pvV, handleV) + * except RuntimeError as e: + */ + } + __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_L14_try_end; + __pyx_L7_error:; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":129 + * try: + * status=self._c_cafe.openV(pvV, handleV) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * if isinstance (e.args, tuple): + * if 'CAFEException' in (e.args[0]): + */ + __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError); + if (__pyx_t_13) { + __Pyx_AddTraceback("PyCafe.CyCafe.open", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_e = __pyx_t_6; + /*try:*/ { + + /* "PyCafe.pyx":130 + * 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_, \ + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = PyTuple_Check(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":131 + * 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)) + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L20_error;}; + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_CAFEException, __pyx_t_14, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":132 + * 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) + */ + __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + + /* "PyCafe.pyx":133 + * 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: + */ + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_ec, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L20_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(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_et, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L20_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.info(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_ei, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":132 + * 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) + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":134 + * _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())) + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_14, 0, 0, 0); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + + /* "PyCafe.pyx":131 + * 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)) + */ + } + + /* "PyCafe.pyx":130 + * 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_, \ + */ + goto __pyx_L22; + } + + /* "PyCafe.pyx":136 + * raise Exception(_cyCafeException) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, e.what())) # <<<<<<<<<<<<<< + * + * return handleV + */ + /*else*/ { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_what); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_17 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_16))) { + __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16); + if (likely(__pyx_t_17)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16); + __Pyx_INCREF(__pyx_t_17); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_16, function); + } + } + if (__pyx_t_17) { + __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + } else { + __pyx_t_15 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + } + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = NULL; + __pyx_t_3 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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_3 = 1; + } + } + __pyx_t_17 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_3, __pyx_v_self->exString); + __Pyx_INCREF(__pyx_v__METHOD_); + __Pyx_GIVEREF(__pyx_v__METHOD_); + PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_3, __pyx_v__METHOD_); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_3, __pyx_t_15); + __pyx_t_15 = 0; + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_17, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); + __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_14, 0, 0, 0); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L20_error;} + } + __pyx_L22:; + } + + /* "PyCafe.pyx":129 + * try: + * status=self._c_cafe.openV(pvV, handleV) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * if isinstance (e.args, tuple): + * if 'CAFEException' in (e.args[0]): + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_DECREF(__pyx_v_e); + __pyx_v_e = NULL; + goto __pyx_L21; + } + /*exception exit:*/{ + __pyx_L20_error:; + __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_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 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_13 = __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_13; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19; + goto __pyx_L9_except_error; + } + __pyx_L21:; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L8_exception_handled; + } + goto __pyx_L9_except_error; + __pyx_L9_except_error:; + + /* "PyCafe.pyx":127 + * else: + * print ("Unknown type in {}".format(_METHOD_)) + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.openV(pvV, handleV) + * except RuntimeError as e: + */ + __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_L8_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_L14_try_end:; + } + + /* "PyCafe.pyx":138 + * raise Exception("{} {} {}".format(self.exString, _METHOD_, e.what())) + * + * return handleV # <<<<<<<<<<<<<< + * + * elif not isinstance(pv, (bytes,str)): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_handleV); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":118 + * cdef bytes py_string + * + * if isinstance(pv, (list)): # <<<<<<<<<<<<<< + * for i in range(0, len(pv)): + * if isinstance(pv[i], unicode): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":140 + * return handleV + * + * elif not isinstance(pv, (bytes,str)): # <<<<<<<<<<<<<< + * + * raise Exception("{} {} {}".format(self.exString, _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_L28_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_L28_bool_binop_done:; + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":142 + * elif not isinstance(pv, (bytes,str)): + * + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "Input argument, pv, should be ")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_3 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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_3 = 1; + } + } + __pyx_t_14 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_self->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_3, __pyx_v_self->exString); + __Pyx_INCREF(__pyx_v__METHOD_); + __Pyx_GIVEREF(__pyx_v__METHOD_); + PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_3, __pyx_v__METHOD_); + __Pyx_INCREF(__pyx_kp_u_Input_argument_pv_should_be_type); + __Pyx_GIVEREF(__pyx_kp_u_Input_argument_pv_should_be_type); + PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_3, __pyx_kp_u_Input_argument_pv_should_be_type); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":140 + * return handleV + * + * elif not isinstance(pv, (bytes,str)): # <<<<<<<<<<<<<< + * + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":145 + * "Input argument, pv, should be ")) + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":147 + * cdef unsigned int handle=0 + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.open(pv, handle) + * except RuntimeError as e: + */ + { + __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_10); + /*try:*/ { + + /* "PyCafe.pyx":148 + * + * try: + * status=self._c_cafe.open(pv, handle) # <<<<<<<<<<<<<< + * except RuntimeError as e: + * if isinstance (e.args, tuple): + */ + __pyx_t_27 = __Pyx_PyObject_AsString(__pyx_v_pv); if (unlikely((!__pyx_t_27) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L30_error;} + try { + __pyx_t_18 = __pyx_v_self->_c_cafe->open(__pyx_t_27, __pyx_v_handle); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L30_error;} + } + __pyx_v_status = __pyx_t_18; + + /* "PyCafe.pyx":147 + * cdef unsigned int handle=0 + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.open(pv, handle) + * except RuntimeError as e: + */ + } + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L37_try_end; + __pyx_L30_error:; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":149 + * try: + * status=self._c_cafe.open(pv, handle) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * if isinstance (e.args, tuple): + * if 'CAFEException' in (e.args[0]): + */ + __pyx_t_18 = 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_9, &__pyx_t_6, &__pyx_t_14) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L32_except_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_14); + __Pyx_INCREF(__pyx_t_6); + __pyx_v_e = __pyx_t_6; + /*try:*/ { + + /* "PyCafe.pyx":150 + * status=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, \ + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_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":151 + * 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)) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L43_error;}; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_CAFEException, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":152 + * 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) + */ + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_pv, __pyx_v_pv) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + + /* "PyCafe.pyx":153 + * 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: + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_ec, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_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(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_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(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":152 + * 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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":154 + * _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())) + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + + /* "PyCafe.pyx":151 + * 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)) + */ + } + + /* "PyCafe.pyx":150 + * status=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, \ + */ + goto __pyx_L45; + } + + /* "PyCafe.pyx":156 + * raise Exception(_cyCafeException) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, e.what())) # <<<<<<<<<<<<<< + * + * #print ("******************** HANDLE *******", handle); + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_what); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) { + __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15); + if (likely(__pyx_t_16)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); + __Pyx_INCREF(__pyx_t_16); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_15, function); + } + } + if (__pyx_t_16) { + __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + } else { + __pyx_t_17 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + } + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_15 = NULL; + __pyx_t_3 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_3 = 1; + } + } + __pyx_t_16 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_16); + if (__pyx_t_15) { + __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL; + } + __Pyx_INCREF(__pyx_v_self->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_3, __pyx_v_self->exString); + __Pyx_INCREF(__pyx_v__METHOD_); + __Pyx_GIVEREF(__pyx_v__METHOD_); + PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_3, __pyx_v__METHOD_); + __Pyx_GIVEREF(__pyx_t_17); + PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_3, __pyx_t_17); + __pyx_t_17 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_16, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L43_error;} + } + __pyx_L45:; + } + + /* "PyCafe.pyx":149 + * try: + * status=self._c_cafe.open(pv, handle) + * except RuntimeError as e: # <<<<<<<<<<<<<< + * if isinstance (e.args, tuple): + * if 'CAFEException' in (e.args[0]): + */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_DECREF(__pyx_v_e); + __pyx_v_e = NULL; + goto __pyx_L44; + } + /*exception exit:*/{ + __pyx_L43_error:; + __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_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 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_13 = __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_13; __pyx_filename = __pyx_t_28; + goto __pyx_L32_except_error; + } + __pyx_L44:; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L31_exception_handled; + } + goto __pyx_L32_except_error; + __pyx_L32_except_error:; + + /* "PyCafe.pyx":147 + * cdef unsigned int handle=0 + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.open(pv, handle) + * except RuntimeError as e: + */ + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + goto __pyx_L1_error; + __pyx_L31_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10); + __pyx_L37_try_end:; + } + + /* "PyCafe.pyx":160 + * #print ("******************** HANDLE *******", handle); + * + * return handle # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + __pyx_r = __pyx_t_14; + __pyx_t_14 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":111 + * + * ################################################################################## + * def open(self, pv): # <<<<<<<<<<<<<< + * cdef str _METHOD_="open(pv)" + * + */ + + /* 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_9); + __Pyx_XDECREF(__pyx_t_14); + __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_py_string); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF((PyObject *)__pyx_v__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":163 + * + * ################################################################################## + * def openNoWait(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_11openNoWait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_11openNoWait(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_10openNoWait(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_10openNoWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNoWait", 0); + + /* "PyCafe.pyx":164 + * ################################################################################## + * def openNoWait(self): + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + + /* "PyCafe.pyx":165 + * def openNoWait(self): + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + + /* "PyCafe.pyx":166 + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return # <<<<<<<<<<<<<< + * + * def openPrepare(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":163 + * + * ################################################################################## + * def openNoWait(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":168 + * return + * + * def openPrepare(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_13openPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_13openPrepare(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_12openPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_12openPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openPrepare", 0); + + /* "PyCafe.pyx":169 + * + * def openPrepare(self): + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + + /* "PyCafe.pyx":170 + * def openPrepare(self): + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + + /* "PyCafe.pyx":171 + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return # <<<<<<<<<<<<<< + * + * def openGroupPrepare(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":168 + * return + * + * def openPrepare(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":173 + * return + * + * def openGroupPrepare(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_15openGroupPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_15openGroupPrepare(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_14openGroupPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_14openGroupPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupPrepare", 0); + + /* "PyCafe.pyx":174 + * + * def openGroupPrepare(self): + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return + */ + __pyx_v_self->_c_cafe->channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + + /* "PyCafe.pyx":175 + * def openGroupPrepare(self): + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + + /* "PyCafe.pyx":176 + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return # <<<<<<<<<<<<<< + * + * def openMonitorPrepare(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":173 + * return + * + * def openGroupPrepare(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":178 + * return + * + * def openMonitorPrepare(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_17openMonitorPrepare(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_17openMonitorPrepare(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_16openMonitorPrepare(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_16openMonitorPrepare(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorPrepare", 0); + + /* "PyCafe.pyx":179 + * + * def openMonitorPrepare(self): + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO); + + /* "PyCafe.pyx":180 + * def openMonitorPrepare(self): + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + + /* "PyCafe.pyx":181 + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + * return # <<<<<<<<<<<<<< + * + * def setOpenDefaultPendTime(self, double timeout): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":178 + * return + * + * def openMonitorPrepare(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":183 + * return + * + * def setOpenDefaultPendTime(self, double timeout): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_19setOpenDefaultPendTime(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_19setOpenDefaultPendTime(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __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_18setOpenDefaultPendTime(((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_18setOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setOpenDefaultPendTime", 0); + + /* "PyCafe.pyx":184 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":183 + * return + * + * 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":186 + * return self._c_cafe.channelOpenPolicy.setDefaultTimeout(timeout) + * + * def getOpenDefaultPendTime(self): # <<<<<<<<<<<<<< + * return self._c_cafe.channelOpenPolicy.getDefaultTimeout() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_21getOpenDefaultPendTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_21getOpenDefaultPendTime(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_20getOpenDefaultPendTime(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_20getOpenDefaultPendTime(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getOpenDefaultPendTime", 0); + + /* "PyCafe.pyx":187 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":186 + * 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":191 + * + * ################################################################################## + * def openNow(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_23openNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_23openNow(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_22openNow(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_22openNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNow", 0); + + /* "PyCafe.pyx":192 + * ################################################################################## + * def openNow(self): + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.flushSendBufferNow(); + + /* "PyCafe.pyx":193 + * def openNow(self): + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * return + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + + /* "PyCafe.pyx":194 + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + + /* "PyCafe.pyx":195 + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":191 + * + * ################################################################################## + * 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_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":198 + * + * ################################################################################## + * def openNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setTimeout(timeout) + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_25openNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_25openNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNowAndWait (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_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __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_24openNowAndWait(((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_24openNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openNowAndWait", 0); + + /* "PyCafe.pyx":199 + * ################################################################################## + * def openNowAndWait(self, double timeout): + * self._c_cafe.channelOpenPolicy.setTimeout(timeout) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() + * #reset + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setTimeout(__pyx_v_timeout); + + /* "PyCafe.pyx":200 + * def openNowAndWait(self, double timeout): + * self._c_cafe.channelOpenPolicy.setTimeout(timeout) + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() # <<<<<<<<<<<<<< + * #reset + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.flushSendBufferNow(); + + /* "PyCafe.pyx":202 + * 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() + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + + /* "PyCafe.pyx":203 + * #reset + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setTimeoutToDefault() + * return + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + + /* "PyCafe.pyx":204 + * self._c_cafe.channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setTimeoutToDefault() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelOpenPolicy.setTimeoutToDefault(); + + /* "PyCafe.pyx":205 + * self._c_cafe.channelOpenPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenPolicy.setTimeoutToDefault() + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":198 + * + * ################################################################################## + * def openNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenPolicy.setTimeout(timeout) + * self._c_cafe.channelOpenPolicy.flushSendBufferNow() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":210 + * + * ################################################################################## + * def openGroupNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + * self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_27openGroupNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_27openGroupNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupNowAndWait (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_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __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_26openGroupNowAndWait(((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_26openGroupNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openGroupNowAndWait", 0); + + /* "PyCafe.pyx":211 + * ################################################################################## + * def openGroupNowAndWait(self, double timeout): + * self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() + * #reset + */ + __pyx_v_self->_c_cafe->channelOpenGroupPolicy.setTimeout(__pyx_v_timeout); + + /* "PyCafe.pyx":212 + * def openGroupNowAndWait(self, double timeout): + * self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + * self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() # <<<<<<<<<<<<<< + * #reset + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + __pyx_v_self->_c_cafe->channelOpenGroupPolicy.flushSendBufferNow(); + + /* "PyCafe.pyx":214 + * 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() + */ + __pyx_v_self->_c_cafe->channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + + /* "PyCafe.pyx":215 + * #reset + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * return + */ + __pyx_v_self->_c_cafe->channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT); + + /* "PyCafe.pyx":216 + * self._c_cafe.channelOpenGroupPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelOpenGroupPolicy.setTimeoutToDefault(); + + /* "PyCafe.pyx":217 + * self._c_cafe.channelOpenGroupPolicy.setFlushSendBufferKind(WITH_PEND_EVENT) + * self._c_cafe.channelOpenGroupPolicy.setTimeoutToDefault() + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":210 + * + * ################################################################################## + * def openGroupNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe.channelOpenGroupPolicy.setTimeout(timeout) + * self._c_cafe.channelOpenGroupPolicy.flushSendBufferNow() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":223 + * + * ################################################################################## + * def openMonitorNow(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * #reset + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_29openMonitorNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_29openMonitorNow(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_28openMonitorNow(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_28openMonitorNow(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("openMonitorNow", 0); + + /* "PyCafe.pyx":224 + * ################################################################################## + * def openMonitorNow(self): + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() # <<<<<<<<<<<<<< + * #reset + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.flushSendBufferNow(); + + /* "PyCafe.pyx":226 + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * #reset + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * return + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + + /* "PyCafe.pyx":227 + * #reset + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO); + + /* "PyCafe.pyx":228 + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":223 + * + * ################################################################################## + * def openMonitorNow(self): # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * #reset + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":233 + * + * ################################################################################## + * def openMonitorNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_31openMonitorNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_31openMonitorNowAndWait(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __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_30openMonitorNowAndWait(((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_30openMonitorNowAndWait(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("openMonitorNowAndWait", 0); + + /* "PyCafe.pyx":234 + * ################################################################################## + * def openMonitorNowAndWait(self, double timeout): + * self._c_cafe.channelMonitorPolicy.setTimeout(timeout) # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * time.sleep(timeout) + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.setTimeout(__pyx_v_timeout); + + /* "PyCafe.pyx":235 + * def openMonitorNowAndWait(self, double timeout): + * self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() # <<<<<<<<<<<<<< + * time.sleep(timeout) + * #reset + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.flushSendBufferNow(); + + /* "PyCafe.pyx":236 + * self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + * time.sleep(timeout) # <<<<<<<<<<<<<< + * #reset + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + */ + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_timeout); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __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 = NULL; + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":238 + * time.sleep(timeout) + * #reset + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * return + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW); + + /* "PyCafe.pyx":239 + * #reset + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO); + + /* "PyCafe.pyx":240 + * self._c_cafe.channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_NOW) + * self._c_cafe.channelMonitorPolicy.setFlushSendBufferKind(WITH_FLUSH_IO) + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":233 + * + * ################################################################################## + * def openMonitorNowAndWait(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe.channelMonitorPolicy.setTimeout(timeout) + * self._c_cafe.channelMonitorPolicy.flushSendBufferNow() + */ + + /* 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_AddTraceback("PyCafe.CyCafe.openMonitorNowAndWait", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":244 + * ################################################################################## + * + * def _ca_pend_event(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe._ca_pend_event(timeout) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_33_ca_pend_event(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_33_ca_pend_event(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __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_32_ca_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_32_ca_pend_event(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_ca_pend_event", 0); + + /* "PyCafe.pyx":245 + * + * def _ca_pend_event(self, double timeout): + * self._c_cafe._ca_pend_event(timeout) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->_ca_pend_event(__pyx_v_timeout); + + /* "PyCafe.pyx":246 + * def _ca_pend_event(self, double timeout): + * self._c_cafe._ca_pend_event(timeout) + * return # <<<<<<<<<<<<<< + * + * def _ca_pend_io(self, timeout): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":244 + * ################################################################################## + * + * def _ca_pend_event(self, double timeout): # <<<<<<<<<<<<<< + * self._c_cafe._ca_pend_event(timeout) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":248 + * return + * + * def _ca_pend_io(self, timeout): # <<<<<<<<<<<<<< + * self._c_cafe._ca_pend_io(timeout) + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_35_ca_pend_io(PyObject *__pyx_v_self, PyObject *__pyx_v_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_35_ca_pend_io(PyObject *__pyx_v_self, PyObject *__pyx_v_timeout) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_ca_pend_io (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_34_ca_pend_io(((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_34_ca_pend_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_ca_pend_io", 0); + + /* "PyCafe.pyx":249 + * + * def _ca_pend_io(self, timeout): + * self._c_cafe._ca_pend_io(timeout) # <<<<<<<<<<<<<< + * return + * + */ + __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->_c_cafe->_ca_pend_io(__pyx_t_1); + + /* "PyCafe.pyx":250 + * def _ca_pend_io(self, timeout): + * self._c_cafe._ca_pend_io(timeout) + * return # <<<<<<<<<<<<<< + * + * def _ca_poll(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":248 + * return + * + * def _ca_pend_io(self, timeout): # <<<<<<<<<<<<<< + * self._c_cafe._ca_pend_io(timeout) + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("PyCafe.CyCafe._ca_pend_io", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":252 + * return + * + * def _ca_poll(self): # <<<<<<<<<<<<<< + * self._c_cafe._ca_poll() + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_37_ca_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_37_ca_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_36_ca_poll(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_36_ca_poll(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_ca_poll", 0); + + /* "PyCafe.pyx":253 + * + * def _ca_poll(self): + * self._c_cafe._ca_poll() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->_ca_poll(); + + /* "PyCafe.pyx":254 + * def _ca_poll(self): + * self._c_cafe._ca_poll() + * return # <<<<<<<<<<<<<< + * + * def _ca_flush_io(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":252 + * return + * + * def _ca_poll(self): # <<<<<<<<<<<<<< + * self._c_cafe._ca_poll() + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":256 + * return + * + * def _ca_flush_io(self): # <<<<<<<<<<<<<< + * self._c_cafe._ca_flush_io() + * return + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_39_ca_flush_io(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_39_ca_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_38_ca_flush_io(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_38_ca_flush_io(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_ca_flush_io", 0); + + /* "PyCafe.pyx":257 + * + * def _ca_flush_io(self): + * self._c_cafe._ca_flush_io() # <<<<<<<<<<<<<< + * return + * + */ + __pyx_v_self->_c_cafe->_ca_flush_io(); + + /* "PyCafe.pyx":258 + * def _ca_flush_io(self): + * self._c_cafe._ca_flush_io() + * return # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":256 + * return + * + * def _ca_flush_io(self): # <<<<<<<<<<<<<< + * self._c_cafe._ca_flush_io() + * return + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":261 + * + * ################################################################################## + * def setChannelRequestPolicyGet(self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, \ # <<<<<<<<<<<<<< + * ChannelWaitForResponsePolicyKind wait, ChannelRequestPolicyKind method, \ + * object cb=None): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_41setChannelRequestPolicyGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_41setChannelRequestPolicyGet(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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":263 + * def setChannelRequestPolicyGet(self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, \ + * ChannelWaitForResponsePolicyKind wait, ChannelRequestPolicyKind method, \ + * object cb=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); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_when)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wait)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setChannelRequestPolicyGet", 0, 4, 5, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 4: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + 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_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_wait = ((ChannelWaitForResponsePolicyKind)__Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(values[2])); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_method = ((ChannelRequestPolicyKind)__Pyx_PyInt_As_ChannelRequestPolicyKind(values[3])); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __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_40setChannelRequestPolicyGet(((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":261 + * + * ################################################################################## + * def setChannelRequestPolicyGet(self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, \ # <<<<<<<<<<<<<< + * ChannelWaitForResponsePolicyKind wait, ChannelRequestPolicyKind method, \ + * object cb=None): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_40setChannelRequestPolicyGet(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; + CYTHON_UNUSED PyObject *__pyx_v_handle = NULL; + ChannelRequestPolicy __pyx_v_cp; + 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; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + unsigned int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setChannelRequestPolicyGet", 0); + + /* "PyCafe.pyx":264 + * ChannelWaitForResponsePolicyKind wait, ChannelRequestPolicyKind method, \ + * object cb=None): + * cdef str _METHOD_="setChannelRequestPolicyGet" # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_setChannelRequestPolicyGet); + __pyx_v__METHOD_ = __pyx_n_u_setChannelRequestPolicyGet; + + /* "PyCafe.pyx":266 + * cdef str _METHOD_="setChannelRequestPolicyGet" + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":267 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":266 + * cdef str _METHOD_="setChannelRequestPolicyGet" + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":268 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":269 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handle = __pyx_t_4; + __pyx_t_4 = 0; + + /* "PyCafe.pyx":268 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":271 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First Input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_Input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_First_Input_argument_should_be_t); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __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; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":277 + * + * cdef ChannelRequestPolicy cp + * self.ph.getChannelRequestPolicyGet(handlePV, cp) # <<<<<<<<<<<<<< + * if when: + * cp.setWhenToFlushSendBuffer(when) + */ + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->ph.getChannelRequestPolicyGet(__pyx_t_9, __pyx_v_cp); + + /* "PyCafe.pyx":278 + * cdef ChannelRequestPolicy cp + * self.ph.getChannelRequestPolicyGet(handlePV, cp) + * if when: # <<<<<<<<<<<<<< + * cp.setWhenToFlushSendBuffer(when) + * if wait: + */ + if (__pyx_v_when) { + + /* "PyCafe.pyx":279 + * self.ph.getChannelRequestPolicyGet(handlePV, cp) + * if when: + * cp.setWhenToFlushSendBuffer(when) # <<<<<<<<<<<<<< + * if wait: + * cp.setWaitKind(wait) + */ + __pyx_v_cp.setWhenToFlushSendBuffer(__pyx_v_when); + + /* "PyCafe.pyx":278 + * cdef ChannelRequestPolicy cp + * self.ph.getChannelRequestPolicyGet(handlePV, cp) + * if when: # <<<<<<<<<<<<<< + * cp.setWhenToFlushSendBuffer(when) + * if wait: + */ + } + + /* "PyCafe.pyx":280 + * if when: + * cp.setWhenToFlushSendBuffer(when) + * if wait: # <<<<<<<<<<<<<< + * cp.setWaitKind(wait) + * if method: + */ + if (__pyx_v_wait) { + + /* "PyCafe.pyx":281 + * cp.setWhenToFlushSendBuffer(when) + * if wait: + * cp.setWaitKind(wait) # <<<<<<<<<<<<<< + * if method: + * cp.setMethodKind(method) + */ + __pyx_v_cp.setWaitKind(__pyx_v_wait); + + /* "PyCafe.pyx":280 + * if when: + * cp.setWhenToFlushSendBuffer(when) + * if wait: # <<<<<<<<<<<<<< + * cp.setWaitKind(wait) + * if method: + */ + } + + /* "PyCafe.pyx":282 + * if wait: + * cp.setWaitKind(wait) + * if method: # <<<<<<<<<<<<<< + * cp.setMethodKind(method) + * if cb: + */ + if (__pyx_v_method) { + + /* "PyCafe.pyx":283 + * cp.setWaitKind(wait) + * if method: + * cp.setMethodKind(method) # <<<<<<<<<<<<<< + * if cb: + * py_cb_handle_get=cb + */ + __pyx_v_cp.setMethodKind(__pyx_v_method); + + /* "PyCafe.pyx":282 + * if wait: + * cp.setWaitKind(wait) + * if method: # <<<<<<<<<<<<<< + * cp.setMethodKind(method) + * if cb: + */ + } + + /* "PyCafe.pyx":284 + * if method: + * cp.setMethodKind(method) + * if cb: # <<<<<<<<<<<<<< + * py_cb_handle_get=cb + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_cb); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + + /* "PyCafe.pyx":285 + * cp.setMethodKind(method) + * if cb: + * py_cb_handle_get=cb # <<<<<<<<<<<<<< + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + * + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_cb_handle_get, __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":286 + * if cb: + * py_cb_handle_get=cb + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyGet(handlePV, cp) + */ + __pyx_v_cp.setPyHandlerGet(); + + /* "PyCafe.pyx":284 + * if method: + * cp.setMethodKind(method) + * if cb: # <<<<<<<<<<<<<< + * py_cb_handle_get=cb + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + */ + } + + /* "PyCafe.pyx":288 + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + * + * self.ph.setChannelRequestPolicyGet(handlePV, cp) # <<<<<<<<<<<<<< + * return + * ################################################################################## + */ + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->ph.setChannelRequestPolicyGet(__pyx_t_9, __pyx_v_cp); + + /* "PyCafe.pyx":289 + * + * self.ph.setChannelRequestPolicyGet(handlePV, cp) + * return # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":261 + * + * ################################################################################## + * def setChannelRequestPolicyGet(self, handlePV, ChannelWhenToFlushSendBufferPolicyKind when, \ # <<<<<<<<<<<<<< + * ChannelWaitForResponsePolicyKind wait, ChannelRequestPolicyKind method, \ + * object cb=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_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":293 + * + * ################################################################################## + * def setCallbackGet(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD_="setCallbackGet" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_43setCallbackGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_43setCallbackGet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __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_42setCallbackGet(((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_42setCallbackGet(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD_ = 0; + ChannelRequestPolicy __pyx_v_cp; + CYTHON_UNUSED 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setCallbackGet", 0); + + /* "PyCafe.pyx":295 + * def setCallbackGet(self, handlePV, object cb=None): + * + * cdef str _METHOD_="setCallbackGet" # <<<<<<<<<<<<<< + * + * cdef ChannelRequestPolicy cp + */ + __Pyx_INCREF(__pyx_n_u_setCallbackGet); + __pyx_v__METHOD_ = __pyx_n_u_setCallbackGet; + + /* "PyCafe.pyx":298 + * + * cdef ChannelRequestPolicy cp + * self.ph.getChannelRequestPolicyGet(handlePV, cp) # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->ph.getChannelRequestPolicyGet(__pyx_t_1, __pyx_v_cp); + + /* "PyCafe.pyx":300 + * self.ph.getChannelRequestPolicyGet(handlePV, cp) + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":301 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":300 + * self.ph.getChannelRequestPolicyGet(handlePV, cp) + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":302 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = ((__pyx_t_3 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":303 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":302 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":305 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":309 + * + * global py_cb_handle_get + * if cb: # <<<<<<<<<<<<<< + * py_cb_handle_get=cb + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cb); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "PyCafe.pyx":310 + * global py_cb_handle_get + * if cb: + * py_cb_handle_get=cb # <<<<<<<<<<<<<< + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_cb_handle_get, __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":311 + * if cb: + * py_cb_handle_get=cb + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * else: + * cp.setMethodKind(WITH_CALLBACK_DEFAULT) + */ + __pyx_v_cp.setPyHandlerGet(); + + /* "PyCafe.pyx":309 + * + * global py_cb_handle_get + * if cb: # <<<<<<<<<<<<<< + * py_cb_handle_get=cb + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":313 + * cp.setPyHandlerGet() #forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + * cp.setMethodKind(WITH_CALLBACK_DEFAULT) # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyGet(handlePV, cp) + */ + /*else*/ { + __pyx_v_cp.setMethodKind(WITH_CALLBACK_DEFAULT); + } + __pyx_L6:; + + /* "PyCafe.pyx":315 + * cp.setMethodKind(WITH_CALLBACK_DEFAULT) + * + * self.ph.setChannelRequestPolicyGet(handlePV, cp) # <<<<<<<<<<<<<< + * return + * ################################################################################## + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->ph.setChannelRequestPolicyGet(__pyx_t_1, __pyx_v_cp); + + /* "PyCafe.pyx":316 + * + * self.ph.setChannelRequestPolicyGet(handlePV, cp) + * return # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":293 + * + * ################################################################################## + * 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":321 + * + * ################################################################################## + * def setCallbackPut(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * + * cdef str _METHOD_="setCallbackPut" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_45setCallbackPut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_45setCallbackPut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_cb = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __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_44setCallbackPut(((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_44setCallbackPut(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_cb) { + PyObject *__pyx_v__METHOD_ = 0; + ChannelRequestPolicy __pyx_v_cp; + CYTHON_UNUSED 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setCallbackPut", 0); + + /* "PyCafe.pyx":323 + * def setCallbackPut(self, handlePV, object cb=None): + * + * cdef str _METHOD_="setCallbackPut" # <<<<<<<<<<<<<< + * + * cdef ChannelRequestPolicy cp + */ + __Pyx_INCREF(__pyx_n_u_setCallbackPut); + __pyx_v__METHOD_ = __pyx_n_u_setCallbackPut; + + /* "PyCafe.pyx":326 + * + * cdef ChannelRequestPolicy cp + * self.ph.getChannelRequestPolicyPut(handlePV, cp) # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->ph.getChannelRequestPolicyPut(__pyx_t_1, __pyx_v_cp); + + /* "PyCafe.pyx":328 + * self.ph.getChannelRequestPolicyPut(handlePV, cp) + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":329 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) + */ + __Pyx_INCREF(__pyx_v_handlePV); + __pyx_v_handle = __pyx_v_handlePV; + + /* "PyCafe.pyx":328 + * self.ph.getChannelRequestPolicyPut(handlePV, cp) + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":330 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_3 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_2 = ((__pyx_t_3 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":331 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handle = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":330 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":333 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":337 + * + * global py_cb_handle_put + * if cb: # <<<<<<<<<<<<<< + * py_cb_handle_put=cb + * cp.setPyHandlerPut() #forces when=WITH_CALLBACK_USER_SUPPLIED + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cb); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "PyCafe.pyx":338 + * global py_cb_handle_put + * if cb: + * py_cb_handle_put=cb # <<<<<<<<<<<<<< + * cp.setPyHandlerPut() #forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + */ + if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_cb_handle_put, __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":339 + * if cb: + * py_cb_handle_put=cb + * cp.setPyHandlerPut() #forces when=WITH_CALLBACK_USER_SUPPLIED # <<<<<<<<<<<<<< + * else: + * cp.setMethodKind(WITH_CALLBACK_DEFAULT) + */ + __pyx_v_cp.setPyHandlerPut(); + + /* "PyCafe.pyx":337 + * + * global py_cb_handle_put + * if cb: # <<<<<<<<<<<<<< + * py_cb_handle_put=cb + * cp.setPyHandlerPut() #forces when=WITH_CALLBACK_USER_SUPPLIED + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":341 + * cp.setPyHandlerPut() #forces when=WITH_CALLBACK_USER_SUPPLIED + * else: + * cp.setMethodKind(WITH_CALLBACK_DEFAULT) # <<<<<<<<<<<<<< + * + * self.ph.setChannelRequestPolicyPut(handlePV, cp) + */ + /*else*/ { + __pyx_v_cp.setMethodKind(WITH_CALLBACK_DEFAULT); + } + __pyx_L6:; + + /* "PyCafe.pyx":343 + * cp.setMethodKind(WITH_CALLBACK_DEFAULT) + * + * self.ph.setChannelRequestPolicyPut(handlePV, cp) # <<<<<<<<<<<<<< + * return + * ################################################################################## + */ + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->ph.setChannelRequestPolicyPut(__pyx_t_1, __pyx_v_cp); + + /* "PyCafe.pyx":344 + * + * self.ph.setChannelRequestPolicyPut(handlePV, cp) + * return # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":321 + * + * ################################################################################## + * 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":348 + * + * ################################################################################## + * def setTimeout(self, timeout): # <<<<<<<<<<<<<< + * return self.ph.setTimeout(timeout) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_47setTimeout(PyObject *__pyx_v_self, PyObject *__pyx_v_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_47setTimeout(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_46setTimeout(((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_46setTimeout(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setTimeout", 0); + + /* "PyCafe.pyx":349 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setTimeout(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":348 + * + * ################################################################################## + * 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":353 + * + * ################################################################################## + * def getTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue,p,g + * minValue=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_49getTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_49getTimeoutGet(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_48getTimeoutGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_48getTimeoutGet(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getTimeoutGet", 0); + + /* "PyCafe.pyx":355 + * def getTimeoutGet(self): + * cdef double minValue,p,g + * minValue=0 # <<<<<<<<<<<<<< + * p=0 + * g=0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":356 + * cdef double minValue,p,g + * minValue=0 + * p=0 # <<<<<<<<<<<<<< + * g=0 + * self.ph.getTimeoutMin(p,g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":357 + * minValue=0 + * p=0 + * g=0 # <<<<<<<<<<<<<< + * self.ph.getTimeoutMin(p,g) + * minValue=g + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":358 + * p=0 + * g=0 + * self.ph.getTimeoutMin(p,g) # <<<<<<<<<<<<<< + * minValue=g + * self.ph.getTimeoutMax(p,g) + */ + __pyx_v_self->ph.getTimeoutMin(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":359 + * 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":360 + * self.ph.getTimeoutMin(p,g) + * minValue=g + * self.ph.getTimeoutMax(p,g) # <<<<<<<<<<<<<< + * if (g < minValue): + * minValue=g + */ + __pyx_v_self->ph.getTimeoutMax(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":361 + * 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":362 + * self.ph.getTimeoutMax(p,g) + * if (g < minValue): + * minValue=g # <<<<<<<<<<<<<< + * return minValue + * ################################################################################## + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":361 + * minValue=g + * self.ph.getTimeoutMax(p,g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue=g + * return minValue + */ + } + + /* "PyCafe.pyx":363 + * 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_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":353 + * + * ################################################################################## + * 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":368 + * + * ################################################################################## + * def getTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue,p,g + * minValue=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_51getTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_51getTimeoutPut(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_50getTimeoutPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_50getTimeoutPut(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getTimeoutPut", 0); + + /* "PyCafe.pyx":370 + * def getTimeoutPut(self): + * cdef double minValue,p,g + * minValue=0 # <<<<<<<<<<<<<< + * p=0 + * g=0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":371 + * cdef double minValue,p,g + * minValue=0 + * p=0 # <<<<<<<<<<<<<< + * g=0 + * self.ph.getTimeoutMin(p,g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":372 + * minValue=0 + * p=0 + * g=0 # <<<<<<<<<<<<<< + * self.ph.getTimeoutMin(p,g) + * minValue=p + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":373 + * p=0 + * g=0 + * self.ph.getTimeoutMin(p,g) # <<<<<<<<<<<<<< + * minValue=p + * self.ph.getTimeoutMax(p,g) + */ + __pyx_v_self->ph.getTimeoutMin(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":374 + * 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":375 + * self.ph.getTimeoutMin(p,g) + * minValue=p + * self.ph.getTimeoutMax(p,g) # <<<<<<<<<<<<<< + * if (p < minValue): + * minValue=g + */ + __pyx_v_self->ph.getTimeoutMax(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":376 + * 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":377 + * self.ph.getTimeoutMax(p,g) + * if (p < minValue): + * minValue=g # <<<<<<<<<<<<<< + * return minValue + * ################################################################################## + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":376 + * minValue=p + * self.ph.getTimeoutMax(p,g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue=g + * return minValue + */ + } + + /* "PyCafe.pyx":378 + * 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_filename = __pyx_f[1]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":368 + * + * ################################################################################## + * 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":383 + * + * ################################################################################## + * def setSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * return self.ph.setSelfGoverningTimeout(b) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_53setSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_53setSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b) { + int __pyx_v_b; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __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_52setSelfGoverningTimeout(((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_52setSelfGoverningTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setSelfGoverningTimeout", 0); + + /* "PyCafe.pyx":384 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":383 + * + * ################################################################################## + * 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":390 + * # Synchronous Groups + * ################################################################################## + * def setSGTimeout(self, double timeout): # <<<<<<<<<<<<<< + * return self.ph.setSGTimeout(timeout) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_55setSGTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_55setSGTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_timeout) { + double __pyx_v_timeout; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __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_54setSGTimeout(((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_54setSGTimeout(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, double __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setSGTimeout", 0); + + /* "PyCafe.pyx":391 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":390 + * # 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":395 + * + * ################################################################################## + * def getSGTimeoutGet(self): # <<<<<<<<<<<<<< + * cdef double minValue,p,g + * minValue=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_57getSGTimeoutGet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_57getSGTimeoutGet(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_56getSGTimeoutGet(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_56getSGTimeoutGet(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getSGTimeoutGet", 0); + + /* "PyCafe.pyx":397 + * def getSGTimeoutGet(self): + * cdef double minValue,p,g + * minValue=0 # <<<<<<<<<<<<<< + * p=0 + * g=0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":398 + * cdef double minValue,p,g + * minValue=0 + * p=0 # <<<<<<<<<<<<<< + * g=0 + * self.ph.getSGTimeoutMin(p,g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":399 + * minValue=0 + * p=0 + * g=0 # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMin(p,g) + * minValue=g + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":400 + * p=0 + * g=0 + * self.ph.getSGTimeoutMin(p,g) # <<<<<<<<<<<<<< + * minValue=g + * self.ph.getSGTimeoutMax(p,g) + */ + __pyx_v_self->ph.getSGTimeoutMin(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":401 + * 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":402 + * self.ph.getSGTimeoutMin(p,g) + * minValue=g + * self.ph.getSGTimeoutMax(p,g) # <<<<<<<<<<<<<< + * if (g < minValue): + * minValue=g + */ + __pyx_v_self->ph.getSGTimeoutMax(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":403 + * 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":404 + * self.ph.getSGTimeoutMax(p,g) + * if (g < minValue): + * minValue=g # <<<<<<<<<<<<<< + * + * return minValue + */ + __pyx_v_minValue = __pyx_v_g; + + /* "PyCafe.pyx":403 + * minValue=g + * self.ph.getSGTimeoutMax(p,g) + * if (g < minValue): # <<<<<<<<<<<<<< + * minValue=g + * + */ + } + + /* "PyCafe.pyx":406 + * minValue=g + * + * return minValue # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":395 + * + * ################################################################################## + * 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":410 + * + * ################################################################################## + * def getSGTimeoutPut(self): # <<<<<<<<<<<<<< + * cdef double minValue,p,g + * minValue=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_59getSGTimeoutPut(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_59getSGTimeoutPut(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_58getSGTimeoutPut(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_58getSGTimeoutPut(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getSGTimeoutPut", 0); + + /* "PyCafe.pyx":412 + * def getSGTimeoutPut(self): + * cdef double minValue,p,g + * minValue=0 # <<<<<<<<<<<<<< + * p=0 + * g=0 + */ + __pyx_v_minValue = 0.0; + + /* "PyCafe.pyx":413 + * cdef double minValue,p,g + * minValue=0 + * p=0 # <<<<<<<<<<<<<< + * g=0 + * self.ph.getSGTimeoutMin(p,g) + */ + __pyx_v_p = 0.0; + + /* "PyCafe.pyx":414 + * minValue=0 + * p=0 + * g=0 # <<<<<<<<<<<<<< + * self.ph.getSGTimeoutMin(p,g) + * minValue=p + */ + __pyx_v_g = 0.0; + + /* "PyCafe.pyx":415 + * p=0 + * g=0 + * self.ph.getSGTimeoutMin(p,g) # <<<<<<<<<<<<<< + * minValue=p + * self.ph.getSGTimeoutMax(p,g) + */ + __pyx_v_self->ph.getSGTimeoutMin(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":416 + * 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":417 + * self.ph.getSGTimeoutMin(p,g) + * minValue=p + * self.ph.getSGTimeoutMax(p,g) # <<<<<<<<<<<<<< + * if (p < minValue): + * minValue=p + */ + __pyx_v_self->ph.getSGTimeoutMax(__pyx_v_p, __pyx_v_g); + + /* "PyCafe.pyx":418 + * 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":419 + * self.ph.getSGTimeoutMax(p,g) + * if (p < minValue): + * minValue=p # <<<<<<<<<<<<<< + * + * return minValue + */ + __pyx_v_minValue = __pyx_v_p; + + /* "PyCafe.pyx":418 + * minValue=p + * self.ph.getSGTimeoutMax(p,g) + * if (p < minValue): # <<<<<<<<<<<<<< + * minValue=p + * + */ + } + + /* "PyCafe.pyx":421 + * minValue=p + * + * return minValue # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_minValue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":410 + * + * ################################################################################## + * 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":425 + * + * ################################################################################## + * def setSGSelfGoverningTimeout(self, bint b): # <<<<<<<<<<<<<< + * cdef PolicyHelper ph + * return ph.setSGSelfGoverningTimeout(b) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_61setSGSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_61setSGSelfGoverningTimeout(PyObject *__pyx_v_self, PyObject *__pyx_arg_b) { + int __pyx_v_b; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __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_60setSGSelfGoverningTimeout(((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_60setSGSelfGoverningTimeout(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setSGSelfGoverningTimeout", 0); + + /* "PyCafe.pyx":427 + * 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_filename = __pyx_f[1]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":425 + * + * ################################################################################## + * 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":431 + * + * ################################################################################## + * def attachContext(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="attachContext" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_63attachContext(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_63attachContext(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_62attachContext(((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_62attachContext(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; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("attachContext", 0); + + /* "PyCafe.pyx":432 + * ################################################################################## + * 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":434 + * cdef str _METHOD_="attachContext" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * return self._c_cafe.attachContextByHandle(handlePV) + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":435 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":436 + * 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) + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":435 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":437 + * if isinstance(handlePV, (int,long)) == 1: + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":438 + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)) == 1: + * return self._c_cafe.attachContextByPVName(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_handlePV); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":437 + * if isinstance(handlePV, (int,long)) == 1: + * return self._c_cafe.attachContextByHandle(handlePV) + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":440 + * return self._c_cafe.attachContextByPVName(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __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; + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":431 + * + * ################################################################################## + * 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":447 + * + * ################################################################################## + * def loadCollectionsFromXML(self, const char * fileName): # <<<<<<<<<<<<<< + * #with nogil: + * # self._c_cafe.loadCollectionsFromXML(fileName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_65loadCollectionsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_65loadCollectionsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName) { + CYTHON_UNUSED char const *__pyx_v_fileName; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __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_64loadCollectionsFromXML(((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_64loadCollectionsFromXML(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED char const *__pyx_v_fileName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadCollectionsFromXML", 0); + + /* "PyCafe.pyx":450 + * #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":447 + * + * ################################################################################## + * 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":453 + * ################################################################################## + * ################################################################################## + * def loadGroupsFromXML(self, const char * fileName): # <<<<<<<<<<<<<< + * #with nogil: + * # self._c_cafe.loadGroupsFromXML(fileName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_67loadGroupsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_67loadGroupsFromXML(PyObject *__pyx_v_self, PyObject *__pyx_arg_fileName) { + CYTHON_UNUSED char const *__pyx_v_fileName; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __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_66loadGroupsFromXML(((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_66loadGroupsFromXML(CYTHON_UNUSED struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, CYTHON_UNUSED char const *__pyx_v_fileName) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("loadGroupsFromXML", 0); + + /* "PyCafe.pyx":456 + * #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":453 + * ################################################################################## + * ################################################################################## + * 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":461 + * + * ################################################################################## + * def groupList(self): # <<<<<<<<<<<<<< + * cdef vector[string] gList + * #conservative guess + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_69groupList(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_69groupList(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_68groupList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_68groupList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + std::vector __pyx_v_gList; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("groupList", 0); + + /* "PyCafe.pyx":464 + * cdef vector[string] gList + * #conservative guess + * gList.reserve(36) # <<<<<<<<<<<<<< + * + * self._c_cafe.groupList(gList) + */ + __pyx_v_gList.reserve(36); + + /* "PyCafe.pyx":466 + * gList.reserve(36) + * + * self._c_cafe.groupList(gList) # <<<<<<<<<<<<<< + * + * #Place in list to avoid this warning: + */ + __pyx_v_self->_c_cafe->groupList(__pyx_v_gList); + + /* "PyCafe.pyx":473 + * #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_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":461 + * + * ################################################################################## + * 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":477 + * + * + * def getMonitorIDInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getUsrArgsAsUInt(handle) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_71getMonitorIDInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_71getMonitorIDInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getMonitorIDInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_70getMonitorIDInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_70getMonitorIDInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getMonitorIDInCallback", 0); + + /* "PyCafe.pyx":478 + * + * def getMonitorIDInCallback(self, handle): + * return self.hh.getUsrArgsAsUInt(handle) # <<<<<<<<<<<<<< + * + * def getDataTypeInCallback(self, handle): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handle); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getUsrArgsAsUInt(__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":477 + * + * + * def getMonitorIDInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getUsrArgsAsUInt(handle) + * + */ + + /* 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.getMonitorIDInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":480 + * return self.hh.getUsrArgsAsUInt(handle) + * + * def getDataTypeInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getDataTypeCB(handle) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_73getDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_73getDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDataTypeInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_72getDataTypeInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_72getDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getDataTypeInCallback", 0); + + /* "PyCafe.pyx":481 + * + * def getDataTypeInCallback(self, handle): + * return self.hh.getDataTypeCB(handle) # <<<<<<<<<<<<<< + * + * def getDbrDataTypeInCallback(self, handle): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handle); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getDataTypeCB(__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":480 + * return self.hh.getUsrArgsAsUInt(handle) + * + * def getDataTypeInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getDataTypeCB(handle) + * + */ + + /* 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.getDataTypeInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":483 + * return self.hh.getDataTypeCB(handle) + * + * def getDbrDataTypeInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getDbrDataTypeCB(handle) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_75getDbrDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_75getDbrDataTypeInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrDataTypeInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_74getDbrDataTypeInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_74getDbrDataTypeInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getDbrDataTypeInCallback", 0); + + /* "PyCafe.pyx":484 + * + * def getDbrDataTypeInCallback(self, handle): + * return self.hh.getDbrDataTypeCB(handle) # <<<<<<<<<<<<<< + * + * def getDbrBaseInCallback(self, handle): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handle); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_long(((long)__pyx_v_self->hh.getDbrDataTypeCB(__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":483 + * return self.hh.getDataTypeCB(handle) + * + * def getDbrDataTypeInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getDbrDataTypeCB(handle) + * + */ + + /* 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.getDbrDataTypeInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":486 + * return self.hh.getDbrDataTypeCB(handle) + * + * def getDbrBaseInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getCafeDbrTypeCB(handle) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_77getDbrBaseInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_77getDbrBaseInCallback(PyObject *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getDbrBaseInCallback (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_76getDbrBaseInCallback(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), ((PyObject *)__pyx_v_handle)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_76getDbrBaseInCallback(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + unsigned int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getDbrBaseInCallback", 0); + + /* "PyCafe.pyx":487 + * + * def getDbrBaseInCallback(self, handle): + * return self.hh.getCafeDbrTypeCB(handle) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handle); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((unsigned int)__pyx_v_self->hh.getCafeDbrTypeCB(__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":486 + * return self.hh.getDbrDataTypeCB(handle) + * + * def getDbrBaseInCallback(self, handle): # <<<<<<<<<<<<<< + * return self.hh.getCafeDbrTypeCB(handle) + * + */ + + /* 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.getDbrBaseInCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":490 + * + * ################################################################################## + * def getHandlesFromWithinGroup(self, gHandleName): # <<<<<<<<<<<<<< + * + * cdef str _METHOD_="getHandlesFromWithinGroup(gHandleName)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_79getHandlesFromWithinGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_gHandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_79getHandlesFromWithinGroup(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_78getHandlesFromWithinGroup(((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_78getHandlesFromWithinGroup(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; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getHandlesFromWithinGroup", 0); + + /* "PyCafe.pyx":492 + * def getHandlesFromWithinGroup(self, gHandleName): + * + * cdef str _METHOD_="getHandlesFromWithinGroup(gHandleName)" # <<<<<<<<<<<<<< + * + * cdef unsigned int groupHandle=0 + */ + __Pyx_INCREF(__pyx_kp_u_getHandlesFromWithinGroup_gHandl); + __pyx_v__METHOD_ = __pyx_kp_u_getHandlesFromWithinGroup_gHandl; + + /* "PyCafe.pyx":494 + * cdef str _METHOD_="getHandlesFromWithinGroup(gHandleName)" + * + * cdef unsigned int groupHandle=0 # <<<<<<<<<<<<<< + * if isinstance(gHandleName, (int,long)) == 1: + * groupHandle=gHandleName + */ + __pyx_v_groupHandle = 0; + + /* "PyCafe.pyx":495 + * + * cdef unsigned int groupHandle=0 + * if isinstance(gHandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * groupHandle=gHandleName + * elif isinstance(gHandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":496 + * cdef unsigned int groupHandle=0 + * if isinstance(gHandleName, (int,long)) == 1: + * groupHandle=gHandleName # <<<<<<<<<<<<<< + * elif isinstance(gHandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_groupHandle = __pyx_t_4; + + /* "PyCafe.pyx":495 + * + * cdef unsigned int groupHandle=0 + * if isinstance(gHandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * groupHandle=gHandleName + * elif isinstance(gHandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":497 + * if isinstance(gHandleName, (int,long)) == 1: + * groupHandle=gHandleName + * elif isinstance(gHandleName, (str)) == 1: # <<<<<<<<<<<<<< + * groupHandle=self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_gHandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":498 + * groupHandle=gHandleName + * elif isinstance(gHandleName, (str)) == 1: + * groupHandle=self.hh.getGroupHandleFromGroupName(gHandleName) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + */ + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_gHandleName); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_groupHandle = __pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_5); + + /* "PyCafe.pyx":497 + * if isinstance(gHandleName, (int,long)) == 1: + * groupHandle=gHandleName + * elif isinstance(gHandleName, (str)) == 1: # <<<<<<<<<<<<<< + * groupHandle=self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":500 + * groupHandle=self.hh.getGroupHandleFromGroupName(gHandleName) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if group handle, else if group name")) + * + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->exString); + __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_t_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_3); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_t_3); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __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; + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __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; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":504 + * + * 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":505 + * cdef vector[unsigned int] hList + * hList=self.hh.getHandlesFromWithinGroupV(groupHandle) + * return hList # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_hList); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":490 + * + * ################################################################################## + * def getHandlesFromWithinGroup(self, gHandleName): # <<<<<<<<<<<<<< + * + * cdef str _METHOD_="getHandlesFromWithinGroup(gHandleName)" + */ + + /* 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":511 + * + * ################################################################################## + * def close(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="close" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_81close(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_81close(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_80close(((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_80close(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_stat; + 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; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("close", 0); + + /* "PyCafe.pyx":512 + * ################################################################################## + * def close(self, handlePV): + * cdef str _METHOD_="close" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_close); + __pyx_v__METHOD_ = __pyx_n_u_close; + + /* "PyCafe.pyx":513 + * def close(self, handlePV): + * cdef str _METHOD_="close" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":514 + * cdef str _METHOD_="close" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":515 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":514 + * cdef str _METHOD_="close" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":516 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":517 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":516 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":519 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":523 + * + * cdef int stat + * with nogil: # <<<<<<<<<<<<<< + * stat=self._c_cafe.close(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":524 + * cdef int stat + * with nogil: + * stat=self._c_cafe.close(handle) # <<<<<<<<<<<<<< + * + * return stat + */ + __pyx_v_stat = __pyx_v_self->_c_cafe->close(__pyx_v_handle); + } + + /* "PyCafe.pyx":523 + * + * cdef int stat + * with nogil: # <<<<<<<<<<<<<< + * stat=self._c_cafe.close(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":526 + * stat=self._c_cafe.close(handle) + * + * return stat # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_stat); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":511 + * + * ################################################################################## + * 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":529 + * + * ################################################################################## + * def closeChannels(self): # <<<<<<<<<<<<<< + * cdef int stat + * with nogil: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_83closeChannels(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_83closeChannels(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_82closeChannels(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_82closeChannels(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + int __pyx_v_stat; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("closeChannels", 0); + + /* "PyCafe.pyx":531 + * def closeChannels(self): + * cdef int stat + * with nogil: # <<<<<<<<<<<<<< + * stat=self._c_cafe.closeChannels() + * return stat + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":532 + * cdef int stat + * with nogil: + * stat=self._c_cafe.closeChannels() # <<<<<<<<<<<<<< + * return stat + * + */ + __pyx_v_stat = __pyx_v_self->_c_cafe->closeChannels(); + } + + /* "PyCafe.pyx":531 + * def closeChannels(self): + * cdef int stat + * with nogil: # <<<<<<<<<<<<<< + * stat=self._c_cafe.closeChannels() + * return stat + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":533 + * with nogil: + * stat=self._c_cafe.closeChannels() + * return stat # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_stat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":529 + * + * ################################################################################## + * def closeChannels(self): # <<<<<<<<<<<<<< + * cdef int stat + * 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":536 + * + * ################################################################################## + * def allConnected(self): # <<<<<<<<<<<<<< + * return self._c_cafe.allChannelsConnected() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_85allConnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_85allConnected(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_84allConnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_84allConnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("allConnected", 0); + + /* "PyCafe.pyx":537 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":536 + * + * ################################################################################## + * 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":540 + * + * ################################################################################## + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="isConnected" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_87isConnected(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_87isConnected(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_86isConnected(((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_86isConnected(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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("isConnected", 0); + + /* "PyCafe.pyx":541 + * ################################################################################## + * def isConnected(self, handlePV): + * cdef str _METHOD_="isConnected" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_n_u_isConnected); + __pyx_v__METHOD_ = __pyx_n_u_isConnected; + + /* "PyCafe.pyx":543 + * cdef str _METHOD_="isConnected" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":544 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":545 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":544 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":546 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":547 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":546 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":549 + * 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) + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":551 + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "First input argument, should be if handle, else if PV")) + * return self._c_cafe.isChannelConnected(handle) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyBool_FromLong((__pyx_v_self->_c_cafe->isChannelConnected(__pyx_v_handle) != 0)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":540 + * + * ################################################################################## + * def isConnected(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="isConnected" + * + */ + + /* 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.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":554 + * + * ################################################################################## + * def printDisconnected(self): # <<<<<<<<<<<<<< + * return self._c_cafe.printDisconnectedHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_89printDisconnected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_89printDisconnected(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_88printDisconnected(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_88printDisconnected(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("printDisconnected", 0); + + /* "PyCafe.pyx":555 + * ################################################################################## + * def printDisconnected(self): + * return self._c_cafe.printDisconnectedHandles() # <<<<<<<<<<<<<< + * + * def printDisconnectedHandles(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->printDisconnectedHandles()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":554 + * + * ################################################################################## + * def printDisconnected(self): # <<<<<<<<<<<<<< + * return self._c_cafe.printDisconnectedHandles() + * + */ + + /* function 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.printDisconnected", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":557 + * return self._c_cafe.printDisconnectedHandles() + * + * def printDisconnectedHandles(self): # <<<<<<<<<<<<<< + * return self._c_cafe.printDisconnectedHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_91printDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_91printDisconnectedHandles(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_90printDisconnectedHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_90printDisconnectedHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("printDisconnectedHandles", 0); + + /* "PyCafe.pyx":558 + * + * def printDisconnectedHandles(self): + * return self._c_cafe.printDisconnectedHandles() # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->printDisconnectedHandles()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":557 + * return self._c_cafe.printDisconnectedHandles() + * + * def printDisconnectedHandles(self): # <<<<<<<<<<<<<< + * return self._c_cafe.printDisconnectedHandles() + * + */ + + /* function 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.printDisconnectedHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":561 + * + * ################################################################################## + * def printHandles(self): # <<<<<<<<<<<<<< + * return self._c_cafe.printHandles() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_93printHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_93printHandles(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_92printHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_92printHandles(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("printHandles", 0); + + /* "PyCafe.pyx":562 + * ################################################################################## + * def printHandles(self): + * return self._c_cafe.printHandles() # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->printHandles()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":561 + * + * ################################################################################## + * def printHandles(self): # <<<<<<<<<<<<<< + * return self._c_cafe.printHandles() + * + */ + + /* function 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.printHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":565 + * + * ################################################################################## + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="printHandle" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_95printHandle(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_95printHandle(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_94printHandle(((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_94printHandle(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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("printHandle", 0); + + /* "PyCafe.pyx":566 + * ################################################################################## + * def printHandle(self, handlePV): + * cdef str _METHOD_="printHandle" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_printHandle); + __pyx_v__METHOD_ = __pyx_n_u_printHandle; + + /* "PyCafe.pyx":567 + * def printHandle(self, handlePV): + * cdef str _METHOD_="printHandle" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":568 + * cdef str _METHOD_="printHandle" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":569 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":568 + * cdef str _METHOD_="printHandle" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":570 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":571 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":570 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":573 + * 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.printHandle(handle) + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":575 + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "First input argument, should be if handle, else if PV")) + * return self._c_cafe.printHandle(handle) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->printHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":565 + * + * ################################################################################## + * def printHandle(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="printHandle" + * 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.printHandle", __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":579 + * + * ################################################################################## + * def printHandlesV(self, list handleList): # <<<<<<<<<<<<<< + * cdef str _METHOD_="printHandlesV" + * if isinstance(handleList[0], (str)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_97printHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_97printHandlesV(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_96printHandlesV(((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_96printHandlesV(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; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + unsigned int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("printHandlesV", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":580 + * ################################################################################## + * 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":581 + * 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_filename = __pyx_f[1]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __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":582 + * 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_, \ + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF_SET(__pyx_v_handleList, ((PyObject*)__pyx_t_1)); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":581 + * 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":583 + * 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")) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __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":584 + * 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")) + * + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->exString); + __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); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_kp_u_First_input_argument_should_be_a); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __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_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":583 + * 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")) + */ + } + __pyx_L3:; + + /* "PyCafe.pyx":589 + * #Do this only to avoid compiler warnings + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * return self.hh.printHandlesV(v) + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_handleList); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_7; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":590 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * return self.hh.printHandlesV(v) + * ################################################################################## + */ + if (unlikely(__pyx_v_handleList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + try { + __pyx_v_v.push_back(__pyx_t_10); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":591 + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) + * return self.hh.printHandlesV(v) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hh.printHandlesV(__pyx_v_v)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":579 + * + * ################################################################################## + * 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":595 + * + * ################################################################################## + * def getDisconnectedHandles(self): # <<<<<<<<<<<<<< + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_99getDisconnectedHandles(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_99getDisconnectedHandles(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_98getDisconnectedHandles(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_98getDisconnectedHandles(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getDisconnectedHandles", 0); + + /* "PyCafe.pyx":598 + * cdef vector[unsigned int] dhV + * cdef vector[string] pvV + * self.hh.getDisconnectedHandles(dhV,pvV) # <<<<<<<<<<<<<< + * return dhV,pvV + * ################################################################################## + */ + __pyx_v_self->hh.getDisconnectedHandles(__pyx_v_dhV, __pyx_v_pvV); + + /* "PyCafe.pyx":599 + * 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_filename = __pyx_f[1]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __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":595 + * + * ################################################################################## + * 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":604 + * + * ################################################################################## + * def getStatusSeverity(self, int statusCode): # <<<<<<<<<<<<<< + * return self._c_cafe.getCafeStatusSeverity().message(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_101getStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_101getStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __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_100getStatusSeverity(((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_100getStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStatusSeverity", 0); + + /* "PyCafe.pyx":605 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":604 + * + * ################################################################################## + * 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":608 + * + * ################################################################################## + * def getStatusCodeAsText(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.code(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_103getStatusCodeAsText(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_103getStatusCodeAsText(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __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_102getStatusCodeAsText(((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_102getStatusCodeAsText(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStatusCodeAsText", 0); + + /* "PyCafe.pyx":609 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":608 + * + * ################################################################################## + * 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":612 + * + * ################################################################################## + * def getStatusInfo(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.info(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_105getStatusInfo(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_105getStatusInfo(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __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_104getStatusInfo(((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_104getStatusInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStatusInfo", 0); + + /* "PyCafe.pyx":613 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":612 + * + * ################################################################################## + * 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":616 + * + * ################################################################################## + * def getStatusMsg(self, int statusCode): # <<<<<<<<<<<<<< + * return self.cs.message(statusCode) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_107getStatusMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_107getStatusMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_statusCode) { + int __pyx_v_statusCode; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __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_106getStatusMsg(((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_106getStatusMsg(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_statusCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStatusMsg", 0); + + /* "PyCafe.pyx":617 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":616 + * + * ################################################################################## + * 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":620 + * + * ################################################################################## + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getStatus" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_109getStatus(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_109getStatus(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_108getStatus(((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_108getStatus(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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStatus", 0); + + /* "PyCafe.pyx":621 + * ################################################################################## + * def getStatus(self, handlePV): + * cdef str _METHOD_="getStatus" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_n_u_getStatus); + __pyx_v__METHOD_ = __pyx_n_u_getStatus; + + /* "PyCafe.pyx":623 + * cdef str _METHOD_="getStatus" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":624 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":625 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":624 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":626 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":627 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":626 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":629 + * 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) + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":631 + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "First input argument, should be if handle, else if PV")) + * return self.hh.getStatus(handle) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getStatus(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":620 + * + * ################################################################################## + * def getStatus(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getStatus" + * + */ + + /* 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.getStatus", __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":634 + * + * ################################################################################## + * def getAlarmStatusSeverity(self,handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getAlarmStatusSeverity" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_111getAlarmStatusSeverity(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_111getAlarmStatusSeverity(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_110getAlarmStatusSeverity(((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_110getAlarmStatusSeverity(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + short __pyx_v_aStatSev[2]; + CYTHON_UNUSED 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getAlarmStatusSeverity", 0); + + /* "PyCafe.pyx":635 + * ################################################################################## + * def getAlarmStatusSeverity(self,handlePV): + * cdef str _METHOD_="getAlarmStatusSeverity" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_getAlarmStatusSeverity); + __pyx_v__METHOD_ = __pyx_n_u_getAlarmStatusSeverity; + + /* "PyCafe.pyx":636 + * def getAlarmStatusSeverity(self,handlePV): + * cdef str _METHOD_="getAlarmStatusSeverity" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":637 + * cdef str _METHOD_="getAlarmStatusSeverity" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":638 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":637 + * cdef str _METHOD_="getAlarmStatusSeverity" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":639 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":640 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":639 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":642 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":646 + * + * cdef short aStatSev[2] + * status=self.hh.getAlarmStatusSeverity(handle,aStatSev) # <<<<<<<<<<<<<< + * return aStatSev[0], aStatSev[1] + * + */ + __pyx_v_status = __pyx_v_self->hh.getAlarmStatusSeverity(__pyx_v_handle, __pyx_v_aStatSev); + + /* "PyCafe.pyx":647 + * cdef short aStatSev[2] + * status=self.hh.getAlarmStatusSeverity(handle,aStatSev) + * return aStatSev[0], aStatSev[1] # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_short((__pyx_v_aStatSev[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyInt_From_short((__pyx_v_aStatSev[1])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":634 + * + * ################################################################################## + * def getAlarmStatusSeverity(self,handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getAlarmStatusSeverity" + * 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.getAlarmStatusSeverity", __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":650 + * + * ################################################################################## + * def getTimeStamp(self,handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getTimeStamp" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_113getTimeStamp(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_113getTimeStamp(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_112getTimeStamp(((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_112getTimeStamp(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + HandleHelper __pyx_v_hh; + PyObject *__pyx_v_ll = 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getTimeStamp", 0); + + /* "PyCafe.pyx":651 + * ################################################################################## + * def getTimeStamp(self,handlePV): + * cdef str _METHOD_="getTimeStamp" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_getTimeStamp); + __pyx_v__METHOD_ = __pyx_n_u_getTimeStamp; + + /* "PyCafe.pyx":652 + * def getTimeStamp(self,handlePV): + * cdef str _METHOD_="getTimeStamp" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":653 + * cdef str _METHOD_="getTimeStamp" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":654 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":653 + * cdef str _METHOD_="getTimeStamp" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":655 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":656 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":655 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":658 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":663 + * cdef HandleHelper hh + * + * hh._etsNorm=self.hh.getEpicsTimeStampAsUInt32(handle) # <<<<<<<<<<<<<< + * + * cpdef ll=[] + */ + __pyx_v_hh._etsNorm = __pyx_v_self->hh.getEpicsTimeStampAsUInt32(__pyx_v_handle); + + /* "PyCafe.pyx":665 + * hh._etsNorm=self.hh.getEpicsTimeStampAsUInt32(handle) + * + * cpdef ll=[] # <<<<<<<<<<<<<< + * ll.append(hh._etsNorm.secPastEpoch) + * ll.append(hh._etsNorm.nsec) + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_ll = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":666 + * + * cpdef ll=[] + * ll.append(hh._etsNorm.secPastEpoch) # <<<<<<<<<<<<<< + * ll.append(hh._etsNorm.nsec) + * #print ("TimeStamp ", ll) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_hh._etsNorm.secPastEpoch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":667 + * cpdef ll=[] + * ll.append(hh._etsNorm.secPastEpoch) + * ll.append(hh._etsNorm.nsec) # <<<<<<<<<<<<<< + * #print ("TimeStamp ", ll) + * return ll + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_hh._etsNorm.nsec); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ll, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":669 + * ll.append(hh._etsNorm.nsec) + * #print ("TimeStamp ", ll) + * return ll # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":650 + * + * ################################################################################## + * def getTimeStamp(self,handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getTimeStamp" + * 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.getTimeStamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD_); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":672 + * + * ################################################################################## + * def getTimeStampAsDate(self,handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getimeStampAsDate" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_115getTimeStampAsDate(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_115getTimeStampAsDate(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_114getTimeStampAsDate(((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_114getTimeStampAsDate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + HandleHelper __pyx_v_hh; + PyObject *__pyx_v_ld = 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getTimeStampAsDate", 0); + + /* "PyCafe.pyx":673 + * ################################################################################## + * def getTimeStampAsDate(self,handlePV): + * cdef str _METHOD_="getimeStampAsDate" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_getimeStampAsDate); + __pyx_v__METHOD_ = __pyx_n_u_getimeStampAsDate; + + /* "PyCafe.pyx":674 + * def getTimeStampAsDate(self,handlePV): + * cdef str _METHOD_="getimeStampAsDate" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":675 + * cdef str _METHOD_="getimeStampAsDate" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":676 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":675 + * cdef str _METHOD_="getimeStampAsDate" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":677 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":678 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":677 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":680 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":684 + * + * cdef HandleHelper hh + * cpdef ld=[] # <<<<<<<<<<<<<< + * + * hh._etsDate =self.hh.getEpicsTimeStampAsDate(handle) + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_ld = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":686 + * cpdef ld=[] + * + * hh._etsDate =self.hh.getEpicsTimeStampAsDate(handle) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.year ) + * ld.append(hh._etsDate.mon ) + */ + __pyx_v_hh._etsDate = __pyx_v_self->hh.getEpicsTimeStampAsDate(__pyx_v_handle); + + /* "PyCafe.pyx":687 + * + * hh._etsDate =self.hh.getEpicsTimeStampAsDate(handle) + * ld.append(hh._etsDate.year ) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.mon ) + * ld.append(hh._etsDate.day ) + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.year); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":688 + * 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 ) + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.mon); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":689 + * 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_5 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.day); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":690 + * 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_5 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.hour); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":691 + * 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_5 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.min); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":692 + * ld.append(hh._etsDate.hour ) + * ld.append(hh._etsDate.min ) + * ld.append(hh._etsDate.sec ) # <<<<<<<<<<<<<< + * ld.append(hh._etsDate.nsec ) + * #print ("TimeStampAsDate ", ld) + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_hh._etsDate.sec); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":693 + * ld.append(hh._etsDate.min ) + * ld.append(hh._etsDate.sec ) + * ld.append(hh._etsDate.nsec ) # <<<<<<<<<<<<<< + * #print ("TimeStampAsDate ", ld) + * return ld + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_long(__pyx_v_hh._etsDate.nsec); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_ld, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":695 + * ld.append(hh._etsDate.nsec ) + * #print ("TimeStampAsDate ", ld) + * return ld # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ld); + __pyx_r = __pyx_v_ld; + goto __pyx_L0; + + /* "PyCafe.pyx":672 + * + * ################################################################################## + * def getTimeStampAsDate(self,handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getimeStampAsDate" + * 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.getTimeStampAsDate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD_); + __Pyx_XDECREF(__pyx_v_ld); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":699 + * ################################################################################## + * ### 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_117checkForHandle(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; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + char const *__pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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)) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_117checkForHandle)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_force); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __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; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafe.pyx":700 + * ### 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":701 + * 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_filename = __pyx_f[1]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v__handle = __pyx_v_self->hh.getHandleFromPV(__pyx_t_8); + + /* "PyCafe.pyx":702 + * 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":703 + * _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":704 + * 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_filename = __pyx_f[1]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_pv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_v_pv); + __Pyx_GIVEREF(__pyx_v_pv); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_pv); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __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; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":703 + * _handle=self.hh.getHandleFromPV(pv) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.open(pv) + * else: + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":706 + * 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":702 + * cdef unsigned int _handle=0; + * _handle=self.hh.getHandleFromPV(pv) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.open(pv) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":708 + * 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_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":699 + * ################################################################################## + * ### 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_117checkForHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_117checkForHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pv = 0; + int __pyx_v_force; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pv_3)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_116checkForHandle(((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_116checkForHandle(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __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":713 + * + * ################################################################################## + * cpdef checkForHandleList(self, list pvList, bint force=True): # <<<<<<<<<<<<<< + * + * cdef unsigned int nToOpen=0 + */ + +static PyObject *__pyx_pw_6PyCafe_6CyCafe_119checkForHandleList(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; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + char const *__pyx_t_9; + int __pyx_t_10; + unsigned int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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)) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForHandleList); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_119checkForHandleList)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_force); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafe.pyx":715 + * cpdef checkForHandleList(self, list pvList, bint force=True): + * + * cdef unsigned int nToOpen=0 # <<<<<<<<<<<<<< + * + * handleList=[] + */ + __pyx_v_nToOpen = 0; + + /* "PyCafe.pyx":717 + * 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_filename = __pyx_f[1]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_handleList = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":718 + * + * 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":719 + * 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_filename = __pyx_f[1]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_pvList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_6; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":720 + * 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_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v__handle = __pyx_v_self->hh.getHandleFromPV(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":721 + * for i in range(0, len(pvList)): + * _handle=self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: # <<<<<<<<<<<<<< + * if (force): + * nToOpen=nToOpen+1; + */ + __pyx_t_10 = ((__pyx_v__handle == 0) != 0); + if (__pyx_t_10) { + + /* "PyCafe.pyx":722 + * _handle=self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * nToOpen=nToOpen+1; + * self.openNoWait() + */ + __pyx_t_10 = (__pyx_v_force != 0); + if (__pyx_t_10) { + + /* "PyCafe.pyx":723 + * if _handle == 0: + * if (force): + * nToOpen=nToOpen+1; # <<<<<<<<<<<<<< + * self.openNoWait() + * _handle=self.open(pvList[i]) + */ + __pyx_v_nToOpen = (__pyx_v_nToOpen + 1); + + /* "PyCafe.pyx":724 + * 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_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __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":725 + * 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_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_7) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v__handle = __pyx_t_11; + + /* "PyCafe.pyx":722 + * _handle=self.hh.getHandleFromPV(pvList[i]) + * if _handle == 0: + * if (force): # <<<<<<<<<<<<<< + * nToOpen=nToOpen+1; + * self.openNoWait() + */ + } + + /* "PyCafe.pyx":726 + * 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_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_handleList, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":721 + * 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":728 + * handleList.append(_handle) + * else: + * handleList.append(_handle) # <<<<<<<<<<<<<< + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.001) + */ + /*else*/ { + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v__handle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_handleList, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L5:; + } + + /* "PyCafe.pyx":729 + * else: + * handleList.append(_handle) + * if nToOpen > 0: # <<<<<<<<<<<<<< + * self.openNowAndWait(2.0+nToOpen*0.001) + * return handleList + */ + __pyx_t_10 = ((__pyx_v_nToOpen > 0) != 0); + if (__pyx_t_10) { + + /* "PyCafe.pyx":730 + * handleList.append(_handle) + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.001) # <<<<<<<<<<<<<< + * return handleList + * ################################################################################## + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_openNowAndWait); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyFloat_FromDouble((2.0 + (__pyx_v_nToOpen * 0.001))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __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; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":729 + * else: + * handleList.append(_handle) + * if nToOpen > 0: # <<<<<<<<<<<<<< + * self.openNowAndWait(2.0+nToOpen*0.001) + * return handleList + */ + } + + /* "PyCafe.pyx":731 + * if nToOpen > 0: + * self.openNowAndWait(2.0+nToOpen*0.001) + * return handleList # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_handleList); + __pyx_r = __pyx_v_handleList; + goto __pyx_L0; + + /* "PyCafe.pyx":713 + * + * ################################################################################## + * 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_119checkForHandleList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_119checkForHandleList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_pvList = 0; + int __pyx_v_force; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pvList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_118checkForHandleList(((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_118checkForHandleList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __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":736 + * + * ################################################################################## + * cpdef checkForGroupHandle(self, str gName, bint force=True): # <<<<<<<<<<<<<< + * cdef unsigned int _ghandle=0; + * _ghandle=self.hh.getGroupHandleFromGroupName(gName) + */ + +static PyObject *__pyx_pw_6PyCafe_6CyCafe_121checkForGroupHandle(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; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + char const *__pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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)) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checkForGroupHandle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_121checkForGroupHandle)) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_force); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafe.pyx":737 + * ################################################################################## + * 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":738 + * 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_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v__ghandle = __pyx_v_self->hh.getGroupHandleFromGroupName(__pyx_t_8); + + /* "PyCafe.pyx":739 + * 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":740 + * _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":741 + * 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_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_4) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_gName); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_v_gName); + __Pyx_GIVEREF(__pyx_v_gName); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_gName); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __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; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":740 + * _ghandle=self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: + * if (force): # <<<<<<<<<<<<<< + * return self.groupOpen(gName) + * else: + */ + goto __pyx_L4; + } + + /* "PyCafe.pyx":743 + * 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":739 + * cdef unsigned int _ghandle=0; + * _ghandle=self.hh.getGroupHandleFromGroupName(gName) + * if _ghandle == 0: # <<<<<<<<<<<<<< + * if (force): + * return self.groupOpen(gName) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":745 + * 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_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + } + __pyx_L3:; + + /* "PyCafe.pyx":736 + * + * ################################################################################## + * 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_121checkForGroupHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_121checkForGroupHandle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_gName = 0; + int __pyx_v_force; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_120checkForGroupHandle(((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_120checkForGroupHandle(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[1]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __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":750 + * + * ################################################################################## + * def getPVNameFromHandle(self, int h): # <<<<<<<<<<<<<< + * return self._c_cafe.getPVFromHandle(h) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_123getPVNameFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_123getPVNameFromHandle(PyObject *__pyx_v_self, PyObject *__pyx_arg_h) { + int __pyx_v_h; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __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_122getPVNameFromHandle(((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_122getPVNameFromHandle(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, int __pyx_v_h) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVNameFromHandle", 0); + + /* "PyCafe.pyx":751 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":750 + * + * ################################################################################## + * 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":755 + * + * ################################################################################## + * def getHandleFromPVName(self, str name): # <<<<<<<<<<<<<< + * #if type(name) is unicode: + * # py_string = (name).encode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_125getHandleFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_125getHandleFromPVName(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_124getHandleFromPVName(((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_124getHandleFromPVName(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getHandleFromPVName", 0); + + /* "PyCafe.pyx":759 + * # 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_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":755 + * + * ################################################################################## + * 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":763 + * + * ################################################################################## + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getChannelInfo" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_127getChannelInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_127getChannelInfo(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_126getChannelInfo(((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_126getChannelInfo(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + ChannelRegalia __pyx_v_cr; + PyObject *__pyx_v_status = 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; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getChannelInfo", 0); + + /* "PyCafe.pyx":764 + * ################################################################################## + * def getChannelInfo(self, handlePV): + * cdef str _METHOD_="getChannelInfo" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): + */ + __Pyx_INCREF(__pyx_n_u_getChannelInfo); + __pyx_v__METHOD_ = __pyx_n_u_getChannelInfo; + + /* "PyCafe.pyx":765 + * def getChannelInfo(self, handlePV): + * cdef str _METHOD_="getChannelInfo" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)): + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":766 + * cdef str _METHOD_="getChannelInfo" + * 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":767 + * 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_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":766 + * cdef str _METHOD_="getChannelInfo" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":768 + * 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":769 + * handle=handlePV + * elif isinstance(handlePV, (str)): + * handle=self.checkForHandle(handlePV, force=True) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":768 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV, force=True) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":771 + * handle=self.checkForHandle(handlePV, force=True) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __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; + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":774 + * "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) + */ + __pyx_t_1 = ((__pyx_v_handle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":775 + * + * 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") + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":776 + * 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") + * + */ + __pyx_v_self->_c_cafe->printStatusMessage(ECAFE_INVALID_HANDLE); + + /* "PyCafe.pyx":775 + * + * 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") + */ + } + + /* "PyCafe.pyx":777 + * 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 + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":774 + * "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) + */ + } + + /* "PyCafe.pyx":780 + * + * cdef ChannelRegalia cr + * status=self._c_cafe.getChannelInfo(handle,cr) # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_cr)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_status = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":782 + * status=self._c_cafe.getChannelInfo(handle,cr) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyObject_RichCompare(__pyx_v_status, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":783 + * + * 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) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":784 + * 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) + * + */ + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_11); + + /* "PyCafe.pyx":783 + * + * 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) + */ + } + + /* "PyCafe.pyx":785 + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + * raise Exception("EXCEPTION RAISED in PyCafe def getChannelInfo. Status = %d" %status) # <<<<<<<<<<<<<< + * + * return channelRegaliaToStruct(cr) + */ + __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_2, __pyx_v_status); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":782 + * status=self._c_cafe.getChannelInfo(handle,cr) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":787 + * raise Exception("EXCEPTION RAISED in PyCafe def getChannelInfo. Status = %d" %status) + * + * return channelRegaliaToStruct(cr) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = ((PyObject *)__pyx_f_6PyCafe_channelRegaliaToStruct(__pyx_v_cr)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":763 + * + * ################################################################################## + * def getChannelInfo(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getChannelInfo" + * 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.getChannelInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD_); + __Pyx_XDECREF(__pyx_v_status); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":790 + * ################################################################################## + * + * def getChannelList(self, list listStrings): # <<<<<<<<<<<<<< + * return self._c_cafe.getFromGlobalChannelList(listStrings) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_129getChannelList(PyObject *__pyx_v_self, PyObject *__pyx_v_listStrings); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_129getChannelList(PyObject *__pyx_v_self, PyObject *__pyx_v_listStrings) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_128getChannelList(((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_128getChannelList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getChannelList", 0); + + /* "PyCafe.pyx":791 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":790 + * ################################################################################## + * + * 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":795 + * ################################################################################## + * + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getEnumFromString" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_131getEnumFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_131getEnumFromString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_enumString = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_enumString)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getEnumFromString", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEnumFromString") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_130getEnumFromString(((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_130getEnumFromString(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_enumString) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + short __pyx_v_enumValue; + 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; + PyObject *__pyx_t_9 = NULL; + std::string __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getEnumFromString", 0); + + /* "PyCafe.pyx":796 + * + * def getEnumFromString(self, handlePV, str enumString): + * cdef str _METHOD_="getEnumFromString" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_getEnumFromString); + __pyx_v__METHOD_ = __pyx_n_u_getEnumFromString; + + /* "PyCafe.pyx":797 + * def getEnumFromString(self, handlePV, str enumString): + * cdef str _METHOD_="getEnumFromString" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":798 + * cdef str _METHOD_="getEnumFromString" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":799 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":798 + * cdef str _METHOD_="getEnumFromString" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":800 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":801 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":800 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":803 + * 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) + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":805 + * 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_, \ + */ + __pyx_t_10 = __pyx_convert_string_from_py_std__in_string(__pyx_v_enumString); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_enumValue = __pyx_v_self->hh.getEnumFromString(__pyx_v_handle, __pyx_t_10); + + /* "PyCafe.pyx":806 + * "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! ")) + */ + __pyx_t_1 = ((__pyx_v_enumValue == -1L) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":807 + * enumValue=self.hh.getEnumFromString(handle, enumString) + * if enumValue == -1: + * raise Exception("{} {} {} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * ": ENUM string value:", enumString, "not recognized! ")) + * return enumValue + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__122, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + + /* "PyCafe.pyx":808 + * if enumValue == -1: + * raise Exception("{} {} {} {} {}".format(self.exString, _METHOD_, \ + * ": ENUM string value:", enumString, "not recognized! ")) # <<<<<<<<<<<<<< + * return enumValue + * + */ + __pyx_t_9 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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_8 = 1; + } + } + __pyx_t_7 = PyTuple_New(5+__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_self->exString); + __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_ENUM_string_value); + __Pyx_GIVEREF(__pyx_kp_u_ENUM_string_value); + PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_kp_u_ENUM_string_value); + __Pyx_INCREF(__pyx_v_enumString); + __Pyx_GIVEREF(__pyx_v_enumString); + PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_8, __pyx_v_enumString); + __Pyx_INCREF(__pyx_kp_u_not_recognized); + __Pyx_GIVEREF(__pyx_kp_u_not_recognized); + PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_8, __pyx_kp_u_not_recognized); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":807 + * enumValue=self.hh.getEnumFromString(handle, enumString) + * if enumValue == -1: + * raise Exception("{} {} {} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * ": ENUM string value:", enumString, "not recognized! ")) + * return enumValue + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":806 + * "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! ")) + */ + } + + /* "PyCafe.pyx":809 + * raise Exception("{} {} {} {} {}".format(self.exString, _METHOD_, \ + * ": ENUM string value:", enumString, "not recognized! ")) + * return enumValue # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_short(__pyx_v_enumValue); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":795 + * ################################################################################## + * + * def getEnumFromString(self, handlePV, str enumString): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getEnumFromString" + * 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.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":813 + * ################################################################################## + * + * def getStringFromEnum(self, handlePV, int enumValue): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getStringFromEnum" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_133getStringFromEnum(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_133getStringFromEnum(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + int __pyx_v_enumValue; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_enumValue)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getStringFromEnum", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getStringFromEnum") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __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_enumValue = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_enumValue == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getStringFromEnum", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __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_132getStringFromEnum(((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_132getStringFromEnum(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, int __pyx_v_enumValue) { + 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStringFromEnum", 0); + + /* "PyCafe.pyx":814 + * + * def getStringFromEnum(self, handlePV, int enumValue): + * cdef str _METHOD_="getStringFromEnum" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_getStringFromEnum); + __pyx_v__METHOD_ = __pyx_n_u_getStringFromEnum; + + /* "PyCafe.pyx":815 + * def getStringFromEnum(self, handlePV, int enumValue): + * cdef str _METHOD_="getStringFromEnum" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":816 + * cdef str _METHOD_="getStringFromEnum" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":817 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":816 + * cdef str _METHOD_="getStringFromEnum" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":818 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":819 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":818 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":821 + * 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) + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":823 + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "First input argument should be if handle, else if PV")) + * return self.hh.getStringFromEnum(handle, enumValue) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->hh.getStringFromEnum(__pyx_v_handle, __pyx_v_enumValue)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":813 + * ################################################################################## + * + * def getStringFromEnum(self, handlePV, int enumValue): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getStringFromEnum" + * 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.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":827 + * ################################################################################## + * + * def loadSFGroups(self): # <<<<<<<<<<<<<< + * cdef bytes py_string + * py_string = ('VA').encode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_135loadSFGroups(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_135loadSFGroups(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_134loadSFGroups(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_134loadSFGroups(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_v_py_string = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + std::string __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("loadSFGroups", 0); + + /* "PyCafe.pyx":829 + * def loadSFGroups(self): + * cdef bytes py_string + * py_string = ('VA').encode('UTF-8') # <<<<<<<<<<<<<< + * #cdef vector[string] gnV + * #gnV.push_back(py_string) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_n_u_VA, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_py_string = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafe.pyx":833 + * #gnV.push_back(py_string) + * #return self._c_cafe.loadSFGroups(gnV[0]) + * return self._c_cafe.loadSFGroups(py_string) # <<<<<<<<<<<<<< + * + * def loadSFGroupsWithBase(self, str VA): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_py_string); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_void_to_None(__pyx_v_self->_c_cafe->loadSFGroups(__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":827 + * ################################################################################## + * + * def loadSFGroups(self): # <<<<<<<<<<<<<< + * cdef bytes py_string + * py_string = ('VA').encode('UTF-8') + */ + + /* 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.CyCafe.loadSFGroups", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_py_string); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":835 + * return self._c_cafe.loadSFGroups(py_string) + * + * def loadSFGroupsWithBase(self, str VA): # <<<<<<<<<<<<<< + * cdef bytes py_string + * py_string = (VA).encode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_137loadSFGroupsWithBase(PyObject *__pyx_v_self, PyObject *__pyx_v_VA); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_137loadSFGroupsWithBase(PyObject *__pyx_v_self, PyObject *__pyx_v_VA) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_136loadSFGroupsWithBase(((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_136loadSFGroupsWithBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_VA) { + PyObject *__pyx_v_py_string = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + std::string __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("loadSFGroupsWithBase", 0); + + /* "PyCafe.pyx":837 + * 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) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_VA, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_py_string = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "PyCafe.pyx":838 + * cdef bytes py_string + * py_string = (VA).encode('UTF-8') + * return self._c_cafe.loadSFGroups(py_string) # <<<<<<<<<<<<<< + * #return self._c_cafe.loadSFGroups(VA) + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_py_string); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_void_to_None(__pyx_v_self->_c_cafe->loadSFGroups(__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":835 + * return self._c_cafe.loadSFGroups(py_string) + * + * def loadSFGroupsWithBase(self, str VA): # <<<<<<<<<<<<<< + * cdef bytes py_string + * py_string = (VA).encode('UTF-8') + */ + + /* 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.CyCafe.loadSFGroupsWithBase", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_py_string); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":845 + * + * ################################################################################## + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setDbrBase" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_139setDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_139setDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + DBR_TYPE __pyx_v_dbrBase; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dbrBase)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setDbrBase", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDbrBase") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_138setDbrBase(((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_138setDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, DBR_TYPE __pyx_v_dbrBase) { + 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setDbrBase", 0); + + /* "PyCafe.pyx":846 + * ################################################################################## + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): + * cdef str _METHOD_="setDbrBase" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_setDbrBase); + __pyx_v__METHOD_ = __pyx_n_u_setDbrBase; + + /* "PyCafe.pyx":847 + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): + * cdef str _METHOD_="setDbrBase" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":848 + * cdef str _METHOD_="setDbrBase" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":849 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":848 + * cdef str _METHOD_="setDbrBase" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":850 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":851 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":850 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":853 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":857 + * + * #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)") + */ + __pyx_t_1 = ((__pyx_v_dbrBase > DBR_TIME) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":858 + * #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" ) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":859 + * 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 + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":860 + * 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 + * + */ + __pyx_t_5 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v_dbrBase); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_hence_assuming_DBR_TIME); + __Pyx_GIVEREF(__pyx_kp_u_hence_assuming_DBR_TIME); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_hence_assuming_DBR_TIME); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __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":861 + * 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) + */ + __pyx_v_dbrBase = DBR_TIME; + + /* "PyCafe.pyx":857 + * + * #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)") + */ + } + + /* "PyCafe.pyx":863 + * dbrBase=DBR_TIME + * + * return self.hh.setCafeDbrType(handle, dbrBase) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.setCafeDbrType(__pyx_v_handle, __pyx_v_dbrBase)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":845 + * + * ################################################################################## + * def setDbrBase(self, handlePV, DBR_TYPE dbrBase): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setDbrBase" + * 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.setDbrBase", __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":868 + * + * ################################################################################## + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getDbrBase" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_141getDbrBase(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_141getDbrBase(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_140getDbrBase(((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_140getDbrBase(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + DBR_TYPE __pyx_v__cafeDbrType; + CYTHON_UNUSED 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getDbrBase", 0); + + /* "PyCafe.pyx":869 + * ################################################################################## + * def getDbrBase(self, handlePV): + * cdef str _METHOD_="getDbrBase" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_getDbrBase); + __pyx_v__METHOD_ = __pyx_n_u_getDbrBase; + + /* "PyCafe.pyx":870 + * def getDbrBase(self, handlePV): + * cdef str _METHOD_="getDbrBase" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":871 + * cdef str _METHOD_="getDbrBase" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":872 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":871 + * cdef str _METHOD_="getDbrBase" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":873 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":874 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":873 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":876 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":879 + * "First input argument, should be if handle, else if PV")) + * + * cdef DBR_TYPE _cafeDbrType=DBR_PLAIN # <<<<<<<<<<<<<< + * cdef int status=self.hh.getCafeDbrType(handle,_cafeDbrType) + * + */ + __pyx_v__cafeDbrType = DBR_PLAIN; + + /* "PyCafe.pyx":880 + * + * cdef DBR_TYPE _cafeDbrType=DBR_PLAIN + * cdef int status=self.hh.getCafeDbrType(handle,_cafeDbrType) # <<<<<<<<<<<<<< + * + * return _cafeDbrType + */ + __pyx_v_status = __pyx_v_self->hh.getCafeDbrType(__pyx_v_handle, __pyx_v__cafeDbrType); + + /* "PyCafe.pyx":882 + * cdef int status=self.hh.getCafeDbrType(handle,_cafeDbrType) + * + * return _cafeDbrType # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_DBR_TYPE(__pyx_v__cafeDbrType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":868 + * + * ################################################################################## + * def getDbrBase(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getDbrBase" + * 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.getDbrBase", __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":888 + * + * ################################################################################## + * def setGetCacheWaitPolicy(self, handlePV, ChannelGetCacheWaitPolicyKind wpk): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setGetCacheWaitPolicy" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_143setGetCacheWaitPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_143setGetCacheWaitPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelGetCacheWaitPolicyKind __pyx_v_wpk; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wpk)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGetCacheWaitPolicy", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGetCacheWaitPolicy") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __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_142setGetCacheWaitPolicy(((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_142setGetCacheWaitPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetCacheWaitPolicyKind __pyx_v_wpk) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + ChannelGetCacheWaitPolicy __pyx_v_channelGetCacheWaitPolicy; + 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; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setGetCacheWaitPolicy", 0); + + /* "PyCafe.pyx":889 + * ################################################################################## + * def setGetCacheWaitPolicy(self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * cdef str _METHOD_="setGetCacheWaitPolicy" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_setGetCacheWaitPolicy); + __pyx_v__METHOD_ = __pyx_n_u_setGetCacheWaitPolicy; + + /* "PyCafe.pyx":890 + * def setGetCacheWaitPolicy(self, handlePV, ChannelGetCacheWaitPolicyKind wpk): + * cdef str _METHOD_="setGetCacheWaitPolicy" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":891 + * cdef str _METHOD_="setGetCacheWaitPolicy" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":892 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":891 + * cdef str _METHOD_="setGetCacheWaitPolicy" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":893 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":894 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":893 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":896 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":900 + * + * #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)") + */ + __pyx_t_1 = ((__pyx_v_wpk > GET_CACHE_WAIT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":901 + * #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" ) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":902 + * 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 + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":903 + * 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 + * + */ + __pyx_t_5 = __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(__pyx_v_wpk); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __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_6, 2, __pyx_kp_u_hence_assuming_default_value_GET); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __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":904 + * 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 + */ + __pyx_v_wpk = GET_CACHE_WAIT; + + /* "PyCafe.pyx":900 + * + * #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)") + */ + } + + /* "PyCafe.pyx":907 + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + * channelGetCacheWaitPolicy.setWaitKind(wpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetCacheWaitPolicy(handle,channelGetCacheWaitPolicy) + */ + __pyx_v_channelGetCacheWaitPolicy.setWaitKind(__pyx_v_wpk); + + /* "PyCafe.pyx":909 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicy(handle,channelGetCacheWaitPolicy) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetCacheWaitPolicy(__pyx_v_handle, __pyx_v_channelGetCacheWaitPolicy)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":888 + * + * ################################################################################## + * def setGetCacheWaitPolicy(self, handlePV, ChannelGetCacheWaitPolicyKind wpk): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setGetCacheWaitPolicy" + * 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.setGetCacheWaitPolicy", __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":913 + * + * ################################################################################## + * def setGetCacheWaitPolicyAllHandles(self, ChannelGetCacheWaitPolicyKind wpk): # <<<<<<<<<<<<<< + * + * #Print Warning Message + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_145setGetCacheWaitPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wpk); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_145setGetCacheWaitPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wpk) { + ChannelGetCacheWaitPolicyKind __pyx_v_wpk; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __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_144setGetCacheWaitPolicyAllHandles(((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_144setGetCacheWaitPolicyAllHandles(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setGetCacheWaitPolicyAllHandles", 0); + + /* "PyCafe.pyx":916 + * + * #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)") + */ + __pyx_t_1 = ((__pyx_v_wpk > GET_CACHE_WAIT) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":917 + * #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" ) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":918 + * 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 + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__130, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":919 + * 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 + * + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(__pyx_v_wpk); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __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":920 + * 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 + */ + __pyx_v_wpk = GET_CACHE_WAIT; + + /* "PyCafe.pyx":916 + * + * #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)") + */ + } + + /* "PyCafe.pyx":923 + * + * cdef ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy + * channelGetCacheWaitPolicy.setWaitKind(wpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles(channelGetCacheWaitPolicy) + */ + __pyx_v_channelGetCacheWaitPolicy.setWaitKind(__pyx_v_wpk); + + /* "PyCafe.pyx":925 + * channelGetCacheWaitPolicy.setWaitKind(wpk) + * + * return self.ph.setChannelGetCacheWaitPolicyAllHandles(channelGetCacheWaitPolicy) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetCacheWaitPolicyAllHandles(__pyx_v_channelGetCacheWaitPolicy)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":913 + * + * ################################################################################## + * def setGetCacheWaitPolicyAllHandles(self, ChannelGetCacheWaitPolicyKind wpk): # <<<<<<<<<<<<<< + * + * #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.setGetCacheWaitPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":929 + * + * ################################################################################## + * def setGetActionWhenMonitorPolicy(self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setGetActionWhenMonitorPolicy" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_147setGetActionWhenMonitorPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_147setGetActionWhenMonitorPolicy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wmpk)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGetActionWhenMonitorPolicy", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGetActionWhenMonitorPolicy") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __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_146setGetActionWhenMonitorPolicy(((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_146setGetActionWhenMonitorPolicy(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_handle; + ChannelGetActionWhenMonitorPolicy __pyx_v_channelGetActionWhenMonitorPolicy; + 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; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicy", 0); + + /* "PyCafe.pyx":930 + * ################################################################################## + * def setGetActionWhenMonitorPolicy(self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * cdef str _METHOD_="setGetActionWhenMonitorPolicy" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_n_u_setGetActionWhenMonitorPolicy); + __pyx_v__METHOD_ = __pyx_n_u_setGetActionWhenMonitorPolicy; + + /* "PyCafe.pyx":931 + * def setGetActionWhenMonitorPolicy(self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): + * cdef str _METHOD_="setGetActionWhenMonitorPolicy" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":932 + * cdef str _METHOD_="setGetActionWhenMonitorPolicy" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":933 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":932 + * cdef str _METHOD_="setGetActionWhenMonitorPolicy" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":934 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":935 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":934 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":937 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":941 + * + * #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)") + */ + __pyx_t_1 = ((__pyx_v_wmpk > GET_FROM_IOC) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":942 + * #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" ) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":943 + * 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 + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":944 + * 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 + * + */ + __pyx_t_5 = __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(__pyx_v_wmpk); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_kp_u_The_value_entered_was); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The_value_entered_was); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __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_6, 2, __pyx_kp_u_hence_assuming_default_value_GET_2); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __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":945 + * 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 + */ + __pyx_v_wmpk = GET_FROM_IOC; + + /* "PyCafe.pyx":941 + * + * #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)") + */ + } + + /* "PyCafe.pyx":948 + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetActionWhenMonitorPolicy(handle,channelGetActionWhenMonitorPolicy) + */ + __pyx_v_channelGetActionWhenMonitorPolicy.setActionKind(__pyx_v_wmpk); + + /* "PyCafe.pyx":950 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicy(handle,channelGetActionWhenMonitorPolicy) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetActionWhenMonitorPolicy(__pyx_v_handle, __pyx_v_channelGetActionWhenMonitorPolicy)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":929 + * + * ################################################################################## + * def setGetActionWhenMonitorPolicy(self, handlePV, ChannelGetActionWhenMonitorPolicyKind wmpk): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setGetActionWhenMonitorPolicy" + * 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.setGetActionWhenMonitorPolicy", __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":955 + * + * ################################################################################## + * def setGetActionWhenMonitorPolicyAllHandles(self, ChannelGetActionWhenMonitorPolicyKind wmpk): # <<<<<<<<<<<<<< + * + * #Print Warning Message + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_149setGetActionWhenMonitorPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wmpk); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_149setGetActionWhenMonitorPolicyAllHandles(PyObject *__pyx_v_self, PyObject *__pyx_arg_wmpk) { + ChannelGetActionWhenMonitorPolicyKind __pyx_v_wmpk; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __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_148setGetActionWhenMonitorPolicyAllHandles(((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_148setGetActionWhenMonitorPolicyAllHandles(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setGetActionWhenMonitorPolicyAllHandles", 0); + + /* "PyCafe.pyx":958 + * + * #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)") + */ + __pyx_t_1 = ((__pyx_v_wmpk > GET_FROM_IOC) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":959 + * #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" ) + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":960 + * 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 + */ + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "PyCafe.pyx":961 + * 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 + * + */ + __pyx_t_2 = __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(__pyx_v_wmpk); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __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":962 + * 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 + */ + __pyx_v_wmpk = GET_FROM_IOC; + + /* "PyCafe.pyx":958 + * + * #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)") + */ + } + + /* "PyCafe.pyx":965 + * + * cdef ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) # <<<<<<<<<<<<<< + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles(channelGetActionWhenMonitorPolicy) + */ + __pyx_v_channelGetActionWhenMonitorPolicy.setActionKind(__pyx_v_wmpk); + + /* "PyCafe.pyx":967 + * channelGetActionWhenMonitorPolicy.setActionKind(wmpk) + * + * return self.ph.setChannelGetActionWhenMonitorPolicyAllHandles(channelGetActionWhenMonitorPolicy) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->ph.setChannelGetActionWhenMonitorPolicyAllHandles(__pyx_v_channelGetActionWhenMonitorPolicy)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":955 + * + * ################################################################################## + * def setGetActionWhenMonitorPolicyAllHandles(self, ChannelGetActionWhenMonitorPolicyKind wmpk): # <<<<<<<<<<<<<< + * + * #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.setGetActionWhenMonitorPolicyAllHandles", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":971 + * + * ################################################################################## + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getNonBlocking" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_151getNonBlocking(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_151getNonBlocking(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_150getNonBlocking(((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_150getNonBlocking(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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getNonBlocking", 0); + + /* "PyCafe.pyx":973 + * def getNonBlocking(self, handlePV): + * ################################################################################## + * cdef str _METHOD_="getNonBlocking" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * cdef int status + */ + __Pyx_INCREF(__pyx_n_u_getNonBlocking); + __pyx_v__METHOD_ = __pyx_n_u_getNonBlocking; + + /* "PyCafe.pyx":974 + * ################################################################################## + * cdef str _METHOD_="getNonBlocking" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * cdef int status + * + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":977 + * cdef int status + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":978 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":977 + * cdef int status + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":979 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":980 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":979 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":982 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * with nogil: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":984 + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "First input argument should be if handle, else if PV")) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getNonBlocking(handle) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":985 + * "First input argument should be if handle, else if PV")) + * 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":984 + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "First input argument should be if handle, else if PV")) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getNonBlocking(handle) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":987 + * status=self._c_cafe.getNonBlocking(handle) + * + * 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":988 + * + * 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":989 + * 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":990 + * 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":989 + * 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":992 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self.haveExceptions: + * raise Exception("EXCEPTION RAISED in PyCafe def get. Status = %d" %status) + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L11:; + + /* "PyCafe.pyx":988 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":993 + * else: + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED in PyCafe def get. Status = %d" %status) + * + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":994 + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: + * raise Exception("EXCEPTION RAISED in PyCafe def get. Status = %d" %status) # <<<<<<<<<<<<<< + * + * return status + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":993 + * else: + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED in PyCafe def get. Status = %d" %status) + * + */ + } + + /* "PyCafe.pyx":987 + * status=self._c_cafe.getNonBlocking(handle) + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":996 + * raise Exception("EXCEPTION RAISED in PyCafe def get. Status = %d" %status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":971 + * + * ################################################################################## + * def getNonBlocking(self, handlePV): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getNonBlocking" + */ + + /* 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.getNonBlocking", __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":1000 + * + * ################################################################################## + * def getStr(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV,dt='str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_153getStr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_153getStr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __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_152getStr(((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_152getStr(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStr", 0); + + /* "PyCafe.pyx":1001 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __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":1000 + * + * ################################################################################## + * 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":1005 + * + * ################################################################################## + * def getInt(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV,'dt=int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_155getInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_155getInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __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_154getInt(((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_154getInt(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getInt", 0); + + /* "PyCafe.pyx":1006 + * ################################################################################## + * def getInt(self, handlePV, object cb=None): + * return self.get(handlePV,'dt=int') # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __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_kp_u_dt_int); + __Pyx_GIVEREF(__pyx_kp_u_dt_int); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_kp_u_dt_int); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __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":1005 + * + * ################################################################################## + * 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_5); + __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":1010 + * + * ################################################################################## + * def getFloat(self, handlePV, object cb=None): # <<<<<<<<<<<<<< + * return self.get(handlePV, dt='float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_157getFloat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_157getFloat(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + CYTHON_UNUSED PyObject *__pyx_v_cb = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __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_156getFloat(((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_156getFloat(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getFloat", 0); + + /* "PyCafe.pyx":1011 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __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":1010 + * + * ################################################################################## + * 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":1015 + * + * ################################################################################## + * def get(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_ = "get" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_159get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_159get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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[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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_158get(((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_158get(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_CyCafeException *__pyx_v__cyCafeException = 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; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get", 0); + + /* "PyCafe.pyx":1017 + * def get(self, handlePV, str dt='native'): + * ################################################################################## + * cdef str _METHOD_ = "get" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * + */ + __Pyx_INCREF(__pyx_n_u_get); + __pyx_v__METHOD_ = __pyx_n_u_get; + + /* "PyCafe.pyx":1018 + * ################################################################################## + * cdef str _METHOD_ = "get" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1020 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1021 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1020 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1022 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1023 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1022 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1025 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":1029 + * + * cdef int status + * cdef long dtr=0 # <<<<<<<<<<<<<< + * status=self.hh.getDataTypeNative(handle, dtr) + * + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":1030 + * cdef int status + * 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":1032 + * 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":1033 + * + * 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":1034 + * 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":1035 + * 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":1034 + * 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":1037 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * if self.haveExceptions: + * + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":1033 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":1038 + * else: + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: # <<<<<<<<<<<<<< + * + * _cyCafeException = CyCafeException(_type='cafe', _source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1040 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1041 + * + * _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 + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1040 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1042 + * _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 + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1038 + * else: + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: # <<<<<<<<<<<<<< + * + * _cyCafeException = CyCafeException(_type='cafe', _source=_METHOD_,_handle=handle, _pv=self._c_cafe.getPVFromHandle(handle), \ + */ + } + + /* "PyCafe.pyx":1043 + * _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]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "PyCafe.pyx":1032 + * 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":1045 + * 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":1046 + * + * 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":1047 + * 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() ) + */ + __pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":1048 + * 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: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1049 + * 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. \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":1048 + * 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: + */ + } + + /* "PyCafe.pyx":1050 + * 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()) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1053 + * #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()), \ + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1054 + * #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())) + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1055 + * _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) + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1056 + * _ec=self.channelInfo.getCafeConnectionState(), \ + * _et=self.cs.code(self.channelInfo.getCafeConnectionState()), \ + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) # <<<<<<<<<<<<<< + * raise Exception(_cyCafeException) + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1053 + * #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()), \ + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1057 + * _et=self.cs.code(self.channelInfo.getCafeConnectionState()), \ + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1050 + * 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()) + */ + } + + /* "PyCafe.pyx":1060 + * + * + * return None # <<<<<<<<<<<<<< + * + * #Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "PyCafe.pyx":1046 + * + * 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":1063 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1064 + * #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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":1063 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + } + + /* "PyCafe.pyx":1065 + * 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)) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1066 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type_3, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1067 + * 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 + */ + __pyx_t_6 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1066 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1068 + * _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 + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1065 + * 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)) + */ + } + + /* "PyCafe.pyx":1069 + * _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 + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "PyCafe.pyx":1045 + * 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":1076 + * #self.setChannelRequestPolicyGet(handle, wait=WAIT, when=FLUSH_NOW, method=WITH_CALLBACK_USER_SUPPLIED, pcb=True) + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck=getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":1077 + * + * cdef unsigned int dtcheck = dtr + * dtcheck=getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":1081 + * + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.getString(handle, self.valStr) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":1082 + * + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1083 + * 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":1082 + * + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":1084 + * 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_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1085 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1084 + * 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":1081 + * + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.getString(handle, self.valStr) + */ + break; + + /* "PyCafe.pyx":1086 + * 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_SHORT: + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":1087 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1088 + * 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":1087 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L21; + } + __pyx_L21:; + } + } + + /* "PyCafe.pyx":1089 + * 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_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1090 + * 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_6 = __Pyx_PyInt_From_int(__pyx_v_self->valInt); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1089 + * 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":1086 + * 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; + + /* "PyCafe.pyx":1091 + * 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_FLOAT: + case CAFE_DOUBLE: + + /* "PyCafe.pyx":1092 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1093 + * 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":1092 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L25; + } + __pyx_L25:; + } + } + + /* "PyCafe.pyx":1095 + * status=self._c_cafe.getDouble(handle, self.valFloat) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * elif dtcheck==CAFE_ENUM: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1096 + * + * if status==ICAFE_NORMAL: + * return self.valFloat # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_ENUM: + * #if enum, string taken as native + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->valFloat); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1095 + * status=self._c_cafe.getDouble(handle, self.valFloat) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * elif dtcheck==CAFE_ENUM: + */ + } + + /* "PyCafe.pyx":1091 + * 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; + + /* "PyCafe.pyx":1097 + * if status==ICAFE_NORMAL: + * return self.valFloat + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * if self._c_cafe.isEnum(handle): + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":1099 + * 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_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1100 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1101 + * 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":1100 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L30; + } + __pyx_L30:; + } + } + + /* "PyCafe.pyx":1102 + * with nogil: + * status=self._c_cafe.getString(handle, self.valStr) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1103 + * status=self._c_cafe.getString(handle, self.valStr) + * if status==ICAFE_NORMAL: + * return self.valStr # <<<<<<<<<<<<<< + * else: + * with nogil: + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1102 + * with nogil: + * status=self._c_cafe.getString(handle, self.valStr) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + } + + /* "PyCafe.pyx":1099 + * 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_L27; + } + + /* "PyCafe.pyx":1105 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1106 + * 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":1105 + * return self.valStr + * else: + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getLong(handle, self.valInt) + * if status ==ICAFE_NORMAL: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L34; + } + __pyx_L34:; + } + } + + /* "PyCafe.pyx":1107 + * with nogil: + * status=self._c_cafe.getLong(handle, self.valInt) + * if status ==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * else: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1108 + * 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_6 = __Pyx_PyInt_From_int(__pyx_v_self->valInt); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1107 + * with nogil: + * status=self._c_cafe.getLong(handle, self.valInt) + * if status ==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * else: + */ + } + } + __pyx_L27:; + + /* "PyCafe.pyx":1097 + * 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":1110 + * return self.valInt + * else: + * print ("This line in PyCafe def get should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1111 + * else: + * print ("This line in PyCafe def get should never appear!") + * return None # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + break; + } + + /* "PyCafe.pyx":1113 + * return None + * + * 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":1114 + * + * 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":1115 + * 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":1116 + * 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":1115 + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L38; + } + + /* "PyCafe.pyx":1118 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L38:; + + /* "PyCafe.pyx":1114 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":1119 + * 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)) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1120 + * 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) + */ + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1121 + * 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 + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ec, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1120 + * 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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1122 + * _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 + * + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1119 + * 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)) + */ + } + + /* "PyCafe.pyx":1123 + * _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) + * raise Exception(_cyCafeException) + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "PyCafe.pyx":1113 + * return None + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":1015 + * + * ################################################################################## + * def get(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_ = "get" + */ + + /* 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.get", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD_); + __Pyx_XDECREF((PyObject *)__pyx_v__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1132 + * + * ################################################################################## + * def getIntList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_161getIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_161getIntList(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_160getIntList(((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_160getIntList(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getIntList", 0); + + /* "PyCafe.pyx":1133 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __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":1132 + * + * ################################################################################## + * 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":1136 + * + * ################################################################################## + * def getFloatList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_163getFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_163getFloatList(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_162getFloatList(((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_162getFloatList(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getFloatList", 0); + + /* "PyCafe.pyx":1137 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __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":1136 + * + * ################################################################################## + * 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":1140 + * + * ################################################################################## + * def getStrList(self, handlePV): # <<<<<<<<<<<<<< + * return self.getList(handlePV, 'str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_165getStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_165getStrList(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_164getStrList(((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_164getStrList(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStrList", 0); + + /* "PyCafe.pyx":1141 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __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":1140 + * + * ################################################################################## + * 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":1144 + * + * ################################################################################## + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getList(handlePV, str dt='native')" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_167getList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_167getList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_166getList(((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_166getList(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_CyCafeException *__pyx_v__cyCafeException = 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; + int *__pyx_v_valIntArray; + double *__pyx_v_valDoubleArray; + PyObject *__pyx_v_ll = NULL; + long __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; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + long __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getList", 0); + + /* "PyCafe.pyx":1145 + * ################################################################################## + * def getList(self, handlePV, str dt='native'): + * cdef str _METHOD_="getList(handlePV, str dt='native')" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_kp_u_getList_handlePV_str_dt_native); + __pyx_v__METHOD_ = __pyx_kp_u_getList_handlePV_str_dt_native; + + /* "PyCafe.pyx":1147 + * cdef str _METHOD_="getList(handlePV, str dt='native')" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1148 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1149 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1148 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1150 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1151 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1150 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1153 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":1158 + * + * cdef int status + * cdef long dtr=0 # <<<<<<<<<<<<<< + * + * status=self.hh.getDataTypeNative(handle, dtr) + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":1160 + * 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":1162 + * 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":1163 + * + * 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":1164 + * 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":1165 + * 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":1164 + * 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":1167 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":1163 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":1168 + * 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)) + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1169 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1170 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1169 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1171 + * _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] + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1168 + * 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)) + */ + } + + /* "PyCafe.pyx":1173 + * raise Exception(_cyCafeException) + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __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":1162 + * 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":1175 + * 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":1176 + * + * 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":1177 + * 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() ) + */ + __pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":1178 + * 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: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1179 + * 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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":1178 + * 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: + */ + } + + /* "PyCafe.pyx":1180 + * 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()),\ + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1181 + * 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())) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1182 + * 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) + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __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_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1183 + * _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] + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1181 + * 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())) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1184 + * _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * return [None] + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1180 + * 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()),\ + */ + } + + /* "PyCafe.pyx":1185 + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) + * return [None] # <<<<<<<<<<<<<< + * + * #This paragraph should be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __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":1176 + * + * 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":1188 + * + * #This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1189 + * #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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":1188 + * + * #This paragraph should be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + } + + /* "PyCafe.pyx":1190 + * 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)) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1191 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1192 + * 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] + */ + __pyx_t_6 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1191 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1193 + * _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] + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1190 + * 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)) + */ + } + + /* "PyCafe.pyx":1194 + * _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 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __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":1175 + * 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":1196 + * return [None] + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck=getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":1197 + * + * cdef unsigned int dtcheck = dtr + * dtcheck=getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":1200 + * + * + * 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":1201 + * + * 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":1202 + * 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_nelemRequest = __pyx_v_self->hh.getNelemRequest(__pyx_v_handle); + + /* "PyCafe.pyx":1205 + * + * + * cdef unsigned int nelemMethod = nelemClient # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_nelemMethod = __pyx_v_nelemClient; + + /* "PyCafe.pyx":1213 + * cdef double * valDoubleArray + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":1215 + * if dtcheck in [CAFE_STRING]: + * + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valStringArray = ((char (*)[40])malloc((__pyx_v_nelemMethod * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":1217 + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1218 + * + * 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":1217 + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":1220 + * status=self._c_cafe.getDbrStringArray(handle, valStringArray) + * + * ll=[] # <<<<<<<<<<<<<< + * for i in range(0,nelemMethod): + * ll.append(valStringArray[i]) + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_ll = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1221 + * + * ll=[] + * for i in range(0,nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valStringArray[i]) + * free(valStringArray) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1222 + * ll=[] + * for i in range(0,nelemMethod): + * ll.append(valStringArray[i]) # <<<<<<<<<<<<<< + * free(valStringArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_6 = __Pyx_PyObject_FromString((__pyx_v_valStringArray[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":1223 + * for i in range(0,nelemMethod): + * ll.append(valStringArray[i]) + * free(valStringArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valStringArray); + + /* "PyCafe.pyx":1224 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1225 + * free(valStringArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":1224 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":1213 + * cdef double * valDoubleArray + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + */ + break; + + /* "PyCafe.pyx":1227 + * return ll + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * valIntArray = malloc( nelemMethod * sizeof(int)) + */ + case CAFE_SHORT: + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":1229 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * valIntArray = malloc( nelemMethod * sizeof(int)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valIntArray = ((int *)malloc((__pyx_v_nelemMethod * (sizeof(int))))); + + /* "PyCafe.pyx":1231 + * valIntArray = malloc( nelemMethod * sizeof(int)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getLongArray(handle, valIntArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1232 + * + * 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":1231 + * valIntArray = malloc( nelemMethod * sizeof(int)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getLongArray(handle, valIntArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L23; + } + __pyx_L23:; + } + } + + /* "PyCafe.pyx":1234 + * status=self._c_cafe.getLongArray(handle, valIntArray) + * + * ll=[] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_ll = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1235 + * + * ll=[] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valIntArray[i]) + * free(valIntArray) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1236 + * ll=[] + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) # <<<<<<<<<<<<<< + * free(valIntArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_valIntArray[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":1237 + * for i in range(0, nelemMethod): + * ll.append(valIntArray[i]) + * free(valIntArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valIntArray); + + /* "PyCafe.pyx":1238 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1239 + * free(valIntArray) + * if status == ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":1238 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":1227 + * return ll + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * valIntArray = malloc( nelemMethod * sizeof(int)) + */ + break; + + /* "PyCafe.pyx":1241 + * return ll + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * valDoubleArray = malloc( nelemMethod * sizeof(double)) + */ + case CAFE_FLOAT: + case CAFE_DOUBLE: + + /* "PyCafe.pyx":1243 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * valDoubleArray = malloc( nelemMethod * sizeof(double)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valDoubleArray = ((double *)malloc((__pyx_v_nelemMethod * (sizeof(double))))); + + /* "PyCafe.pyx":1245 + * valDoubleArray = malloc( nelemMethod * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1246 + * + * 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":1245 + * valDoubleArray = malloc( nelemMethod * sizeof(double)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L29; + } + __pyx_L29:; + } + } + + /* "PyCafe.pyx":1248 + * status=self._c_cafe.getDoubleArray(handle, valDoubleArray) + * + * ll=[] # <<<<<<<<<<<<<< + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_ll = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1249 + * + * ll=[] + * for i in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1250 + * ll=[] + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) # <<<<<<<<<<<<<< + * free(valDoubleArray) + * if status == ICAFE_NORMAL: + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_valDoubleArray[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":1251 + * for i in range(0, nelemMethod): + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valDoubleArray); + + /* "PyCafe.pyx":1252 + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1253 + * 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":1252 + * ll.append(valDoubleArray[i]) + * free(valDoubleArray) + * if status == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * + */ + } + + /* "PyCafe.pyx":1241 + * return ll + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * valDoubleArray = malloc( nelemMethod * sizeof(double)) + */ + break; + + /* "PyCafe.pyx":1255 + * return ll + * + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * + * #if enum, string taken as native + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":1258 + * + * #if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + * + */ + __pyx_t_2 = (__pyx_v_self->_c_cafe->isEnum(__pyx_v_handle) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1259 + * #if enum, string taken as native + * if self._c_cafe.isEnum(handle): + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_valStringArray = ((char (*)[40])malloc((__pyx_v_nelemMethod * (sizeof(dbr_string_t))))); + + /* "PyCafe.pyx":1261 + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1262 + * + * 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":1261 + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDbrStringArray(handle, valStringArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L36; + } + __pyx_L36:; + } + } + + /* "PyCafe.pyx":1264 + * status=self._c_cafe.getDbrStringArray(handle, valStringArray) + * + * ll=[] # <<<<<<<<<<<<<< + * for i in range(0,nelemMethod): + * ll.append(valStringArray[i]) + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_ll = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1265 + * + * ll=[] + * for i in range(0,nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valStringArray[i]) + * free(valStringArray) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1266 + * ll=[] + * for i in range(0,nelemMethod): + * ll.append(valStringArray[i]) # <<<<<<<<<<<<<< + * free(valStringArray) + * if status ==ICAFE_NORMAL: + */ + __pyx_t_6 = __Pyx_PyObject_FromString((__pyx_v_valStringArray[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":1267 + * for i in range(0,nelemMethod): + * ll.append(valStringArray[i]) + * free(valStringArray) # <<<<<<<<<<<<<< + * if status ==ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valStringArray); + + /* "PyCafe.pyx":1268 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status ==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * else: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1269 + * free(valStringArray) + * if status ==ICAFE_NORMAL: + * return ll # <<<<<<<<<<<<<< + * else: + * valIntArray = malloc( nelemMethod * sizeof(int)) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ll); + __pyx_r = __pyx_v_ll; + goto __pyx_L0; + + /* "PyCafe.pyx":1268 + * ll.append(valStringArray[i]) + * free(valStringArray) + * if status ==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * else: + */ + } + + /* "PyCafe.pyx":1258 + * + * #if enum, string taken as native + * if self._c_cafe.isEnum(handle): # <<<<<<<<<<<<<< + * valStringArray = malloc( nelemMethod * sizeof(dbr_string_t)) + * + */ + goto __pyx_L33; + } + + /* "PyCafe.pyx":1271 + * return ll + * else: + * valIntArray = malloc( nelemMethod * sizeof(int)) # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.getLongArray(handle, valIntArray) + */ + /*else*/ { + __pyx_v_valIntArray = ((int *)malloc((__pyx_v_nelemMethod * (sizeof(int))))); + + /* "PyCafe.pyx":1272 + * else: + * valIntArray = malloc( nelemMethod * sizeof(int)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getLongArray(handle, valIntArray) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1273 + * valIntArray = malloc( nelemMethod * sizeof(int)) + * 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":1272 + * else: + * valIntArray = malloc( nelemMethod * sizeof(int)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getLongArray(handle, valIntArray) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L42; + } + __pyx_L42:; + } + } + + /* "PyCafe.pyx":1275 + * status=self._c_cafe.getLongArray(handle, valIntArray) + * + * ll=[] # <<<<<<<<<<<<<< + * for i in range(0,nelemMethod): + * ll.append(valIntArray[i]) + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_ll = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1276 + * + * ll=[] + * for i in range(0,nelemMethod): # <<<<<<<<<<<<<< + * ll.append(valIntArray[i]) + * free(valIntArray) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1277 + * ll=[] + * for i in range(0,nelemMethod): + * ll.append(valIntArray[i]) # <<<<<<<<<<<<<< + * free(valIntArray) + * if status ==ICAFE_NORMAL: + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_valIntArray[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":1278 + * for i in range(0,nelemMethod): + * ll.append(valIntArray[i]) + * free(valIntArray) # <<<<<<<<<<<<<< + * if status ==ICAFE_NORMAL: + * return ll + */ + free(__pyx_v_valIntArray); + + /* "PyCafe.pyx":1279 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status ==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * #Will not happen; already covered above + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1280 + * free(valIntArray) + * 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":1279 + * ll.append(valIntArray[i]) + * free(valIntArray) + * if status ==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return ll + * #Will not happen; already covered above + */ + } + } + __pyx_L33:; + + /* "PyCafe.pyx":1255 + * return ll + * + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * + * #if enum, string taken as native + */ + break; + + /* "PyCafe.pyx":1282 + * 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 + */ + case CAFE_NO_ACCESS: + case CAFE_TYPENOTCONN: + + /* "PyCafe.pyx":1283 + * #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: + */ + __pyx_t_6 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_n_u_Channel); + __Pyx_GIVEREF(__pyx_n_u_Channel); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_u_Channel); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_not_connected); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_not_connected); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __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":1284 + * 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!") + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "PyCafe.pyx":1282 + * 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 + */ + break; + default: + + /* "PyCafe.pyx":1286 + * return None + * else: + * print ("This line in PyCafe def getAsList should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1287 + * else: + * print ("This line in PyCafe def getAsList should never appear!") + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + break; + } + + /* "PyCafe.pyx":1290 + * + * + * 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":1291 + * + * 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":1292 + * 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":1293 + * 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":1292 + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L48; + } + + /* "PyCafe.pyx":1295 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L48:; + + /* "PyCafe.pyx":1291 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":1296 + * 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)) + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_withExceptions); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = (__pyx_t_6 == Py_False); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1297 + * 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) + */ + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1298 + * 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) + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ec, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1297 + * 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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1299 + * _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 + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1296 + * 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)) + */ + } + + /* "PyCafe.pyx":1301 + * raise Exception(_cyCafeException) + * + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "PyCafe.pyx":1290 + * + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":1144 + * + * ################################################################################## + * def getList(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getList(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_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __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__cyCafeException); + __Pyx_XDECREF(__pyx_v_ll); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1305 + * + * ################################################################################## + * def getStrArray(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='str', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_169getStrArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_169getStrArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_168getStrArray(((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_168getStrArray(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStrArray", 0); + + /* "PyCafe.pyx":1306 + * ################################################################################## + * def getStrArray(self, handlePV, str art='memoryview'): + * 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_filename = __pyx_f[1]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __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":1305 + * + * ################################################################################## + * def getStrArray(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * 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":1310 + * + * ################################################################################## + * def getIntArray(self, handlePV, str art='memoryview' ): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='int', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_171getIntArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_171getIntArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_170getIntArray(((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_170getIntArray(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getIntArray", 0); + + /* "PyCafe.pyx":1311 + * ################################################################################## + * def getIntArray(self, handlePV, str art='memoryview' ): + * 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_filename = __pyx_f[1]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __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":1310 + * + * ################################################################################## + * def getIntArray(self, handlePV, str art='memoryview' ): # <<<<<<<<<<<<<< + * 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":1315 + * + * ################################################################################## + * def getFloatArray(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * return self.getArray(handlePV, dt='float', art=art ) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_173getFloatArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_173getFloatArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_172getFloatArray(((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_172getFloatArray(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getFloatArray", 0); + + /* "PyCafe.pyx":1316 + * ################################################################################## + * def getFloatArray(self, handlePV, str art='memoryview'): + * 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_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __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":1315 + * + * ################################################################################## + * def getFloatArray(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * 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":1320 + * + * ################################################################################## + * def getArray(self, handlePV, str dt='native', str art='memoryview'): # <<<<<<<<<<<<<< + * ################################################################################## + * #Typed Memoryviews from K.W. Smith + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_175getArray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_175getArray(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_174getArray(((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_174getArray(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_CyCafeException *__pyx_v__cyCafeException = 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_mvShortNP = NULL; + PyObject *__pyx_v_mvIntNP = NULL; + CYTHON_UNUSED PyObject *__pyx_v_start = 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + 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; + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getArray", 0); + + /* "PyCafe.pyx":1337 + * #a unitary stride, i.e. is contiguous in memory, hence C contiguous + * + * cdef str _METHOD_="getArray" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_n_u_getArray); + __pyx_v__METHOD_ = __pyx_n_u_getArray; + + /* "PyCafe.pyx":1339 + * cdef str _METHOD_="getArray" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1340 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1341 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1340 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1342 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1343 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1342 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1345 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":1360 + * #str [:,::1] mvStr + * cnp.ndarray arr + * long dtr=0 # <<<<<<<<<<<<<< + * int status + * #cvarray mvDoubleArray + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":1368 + * #cdef PVDataHolder pvd + * + * status=self.hh.getDataTypeNative(handle, dtr) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = __pyx_v_self->hh.getDataTypeNative(__pyx_v_handle, __pyx_v_dtr); + + /* "PyCafe.pyx":1371 + * + * + * 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":1372 + * + * 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":1373 + * 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":1374 + * 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":1373 + * 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":1376 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":1372 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":1377 + * 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)) + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1378 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1379 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1378 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1380 + * _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] + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1377 + * 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)) + */ + } + + /* "PyCafe.pyx":1382 + * raise Exception(_cyCafeException) + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __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":1371 + * + * + * if status != ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":1384 + * 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":1385 + * + * 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":1386 + * 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() ) + */ + __pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":1387 + * 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: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1388 + * 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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":1387 + * 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: + */ + } + + /* "PyCafe.pyx":1389 + * 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()),\ + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1390 + * 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())) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1391 + * 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) + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __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_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1392 + * _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] + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1390 + * 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())) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1393 + * _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * return [None] + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1389 + * 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()),\ + */ + } + + /* "PyCafe.pyx":1394 + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) + * return [None] # <<<<<<<<<<<<<< + * + * #Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __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":1385 + * + * 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":1397 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1398 + * #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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":1397 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + } + + /* "PyCafe.pyx":1399 + * 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)) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1400 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1401 + * 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] + */ + __pyx_t_6 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1400 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1402 + * _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] + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1399 + * 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)) + */ + } + + /* "PyCafe.pyx":1403 + * _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 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __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":1384 + * 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":1405 + * return [None] + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * + * dtcheck=getMatchedDataType(dt, dtr) + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":1407 + * cdef unsigned int dtcheck = dtr + * + * dtcheck=getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemNative = self.hh.getNelemNative (handle) + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":1409 + * 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":1410 + * + * 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":1411 + * 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":1413 + * 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 + * + */ + __pyx_v_nelemMethod = __pyx_v_nelemClient; + + /* "PyCafe.pyx":1414 + * + * 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)) + */ + __pyx_v_nelemMemory = __pyx_v_nelemClient; + + /* "PyCafe.pyx":1426 + * #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: + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + case CAFE_ENUM: + + /* "PyCafe.pyx":1427 + * + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = 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":1428 + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = malloc( nelemMemory * sizeof(dbr_string_t)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDbrStringArray(handle, sval) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1429 + * 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 + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getDbrStringArray(__pyx_v_handle, __pyx_v_sval); + } + + /* "PyCafe.pyx":1428 + * if dtcheck in [CAFE_STRING, CAFE_ENUM]: + * sval = malloc( nelemMemory * sizeof(dbr_string_t)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getDbrStringArray(handle, sval) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":1434 + * #Some data types are not yet supported, like boolean arrays and string arrays. + * + * locallist=[] # <<<<<<<<<<<<<< + * + * if status==ICAFE_NORMAL: + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_locallist = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1436 + * locallist=[] + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1438 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=(np.str_,40)) + * #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __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_10, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __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_10, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __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_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1439 + * + * if art in ['numpy','ndarray','numpy.ndarray']: + * mvStr = np.empty(nelemMethod, dtype=(np.str_,40)) # <<<<<<<<<<<<<< + * #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + * + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __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_nelemMethod); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __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; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_str_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_11); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_40); + __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __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":1442 + * #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_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_i = __pyx_t_12; + + /* "PyCafe.pyx":1444 + * 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_7 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_i])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1447 + * #locallist.append(sval[i]) + * + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":1449 + * 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":1438 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=(np.str_,40)) + * #mvStr=np.array(self.hh.getNelemRequest(handle), dtype='S40') + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":1451 + * return mvStr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=(np.str_,40), order='C') + * + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L25_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L25_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L25_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1452 + * + * elif art in ['memoryview','mv','memoryviewslice']: + * mvStr = np.empty(nelemMethod, dtype=(np.str_,40), order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_str_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_40); + __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvStr = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1454 + * mvStr = np.empty(nelemMethod, dtype=(np.str_,40), order='C') + * + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvStr[ij]=str(sval[ij]) + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1455 + * + * for ij in range(0, nelemMethod): + * 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_filename = __pyx_f[1]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":1456 + * for ij in range(0, nelemMethod): + * mvStr[ij]=str(sval[ij]) + * free(sval) # <<<<<<<<<<<<<< + * + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":1459 + * + * + * return memoryview(mvStr) # <<<<<<<<<<<<<< + * + * elif art in ['array','array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_mvStr); + __Pyx_GIVEREF(__pyx_v_mvStr); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_mvStr); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1451 + * return mvStr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemMethod, dtype=(np.str_,40), order='C') + * + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":1461 + * 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; + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L30_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L30_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1462 + * + * 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') + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":1465 + * #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_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1466 + * #arrayArray=array.array('u', 'hello \u2641') + * arrayArray=[] + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * arrayArray.append(str(sval[ij])) + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1467 + * arrayArray=[] + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) # <<<<<<<<<<<<<< + * free(sval) + * return arrayArray + */ + __pyx_t_7 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1468 + * for ij in range(0, nelemMethod): + * arrayArray.append(str(sval[ij])) + * free(sval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":1469 + * 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":1461 + * 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; + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":1471 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_char_p*nelemMethod)() #c_wchar_p is unicode! + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L34_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L34_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1472 + * + * 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') + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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); + } + } + if (__pyx_t_5) { + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1473 + * 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) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1474 + * 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 + */ + __pyx_t_7 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1475 + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=(sval[ij]).encode('utf-8') + * free(sval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":1476 + * 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":1471 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_char_p*nelemMethod)() #c_wchar_p is unicode! + * for ij in range(0, nelemMethod): + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":1479 + * + * else: + * print("Unknown array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_7, 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_7, 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_7, 2, __pyx_kp_u_Possible_types_are); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __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":1480 + * 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') + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1481 + * 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): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1482 + * 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] + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __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_nelemMethod); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_40); + __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvStr = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":1483 + * 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) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1484 + * mvStr = np.empty(nelemMethod, dtype=(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_filename = __pyx_f[1]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":1485 + * for ij in range(0, nelemMethod): + * mvStr[ij]=sval[ij] + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":1487 + * free(sval) + * + * return mvStr # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mvStr); + __pyx_r = __pyx_v_mvStr; + goto __pyx_L0; + } + __pyx_L19:; + + /* "PyCafe.pyx":1436 + * locallist=[] + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + } + + /* "PyCafe.pyx":1426 + * #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: + */ + break; + + /* "PyCafe.pyx":1490 + * + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc( nelemMemory * sizeof(np.int16)) + */ + case CAFE_SHORT: + case CAFE_CHAR: + + /* "PyCafe.pyx":1492 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + * + * i16val = malloc( nelemMemory * sizeof(np.int16)) # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.getShortArray(handle, i16val) + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_i16val = ((short *)malloc((__pyx_v_nelemMemory * (sizeof(__pyx_t_9))))); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1493 + * + * i16val = malloc( nelemMemory * sizeof(np.int16)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getShortArray(handle, i16val) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1494 + * i16val = malloc( nelemMemory * sizeof(np.int16)) + * with nogil: + * status=self._c_cafe.getShortArray(handle, i16val) # <<<<<<<<<<<<<< + * + * if status==ICAFE_NORMAL: + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getShortArray(__pyx_v_handle, __pyx_v_i16val); + } + + /* "PyCafe.pyx":1493 + * + * i16val = malloc( nelemMemory * sizeof(np.int16)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getShortArray(handle, i16val) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L42; + } + __pyx_L42:; + } + } + + /* "PyCafe.pyx":1496 + * 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 + * + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1499 + * #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 + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L45_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L45_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L45_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1505 + * # ##set_base(arr, ival) + * + * mvShortNP = np.empty(nelemMethod, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemMethod): + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __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_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvShortNP = __pyx_t_11; + __pyx_t_11 = 0; + + /* "PyCafe.pyx":1507 + * mvShortNP = np.empty(nelemMethod, dtype=np.int16, order='C') + * + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvShortNP[ij]=i16val[ij] + * #arr=np.asarray(mvShort) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1508 + * + * for ij in range(0, nelemMethod): + * mvShortNP[ij]=i16val[ij] # <<<<<<<<<<<<<< + * #arr=np.asarray(mvShort) + * + */ + __pyx_t_11 = __Pyx_PyInt_From_npy_int16(((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvShortNP, __pyx_v_ij, __pyx_t_11, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":1511 + * #arr=np.asarray(mvShort) + * + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShortNP #arr + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":1513 + * 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":1499 + * #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 + */ + goto __pyx_L44; + } + + /* "PyCafe.pyx":1515 + * return mvShortNP #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_10 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L50_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L50_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L50_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1516 + * + * 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_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_C) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_7); + if (unlikely(!__pyx_t_14.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":1517 + * 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_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1518 + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij]=i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_15)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":1519 + * for ij in range(0, nelemMethod): + * mvShort[ij]=i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return memoryview(mvShort) + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":1521 + * free(i16val) + * + * return memoryview(mvShort) # <<<<<<<<<<<<<< + * + * elif art in ['array','array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1515 + * return mvShortNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L44; + } + + /* "PyCafe.pyx":1523 + * return memoryview(mvShort) + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L55_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L55_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1524 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(i16val[ij]) + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1525 + * elif art in ['array','array.array']: + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * arrayArray.append(i16val[ij]) + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1526 + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): + * arrayArray.append(i16val[ij]) # <<<<<<<<<<<<<< + * free(i16val) + * return arrayArray + */ + __pyx_t_7 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1527 + * for ij in range(0, nelemMethod): + * arrayArray.append(i16val[ij]) + * free(i16val) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":1528 + * arrayArray.append(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":1523 + * return memoryview(mvShort) + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L44; + } + + /* "PyCafe.pyx":1530 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L59_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L59_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1531 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray=(ctypes.c_int16*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=i16val[ij] + */ + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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); + } + } + if (__pyx_t_11) { + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } else { + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1532 + * elif art in ['ctypes', 'ctype']: + * ctypesArray=(ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij]=i16val[ij] + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1533 + * ctypesArray=(ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * return ctypesArray + */ + __pyx_t_7 = __Pyx_PyInt_From_short(((short)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1534 + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":1535 + * 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":1530 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_int16*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L44; + } + + /* "PyCafe.pyx":1538 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_7, 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_7, 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_7, 2, __pyx_kp_u_Possible_types_are); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1539 + * 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') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1540 + * 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): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1541 + * 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_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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_6); + if (unlikely(!__pyx_t_14.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":1542 + * 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_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1543 + * mvShort = np.empty(nelemMethod, dtype=np.int16, order='C') + * for ij in range(0, nelemMethod): + * mvShort[ij]=i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __pyx_t_17 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_17 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __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":1544 + * for ij in range(0, nelemMethod): + * mvShort[ij]=i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":1546 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L44:; + + /* "PyCafe.pyx":1496 + * 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 + * + */ + } + + /* "PyCafe.pyx":1490 + * + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc( nelemMemory * sizeof(np.int16)) + */ + break; + + /* "PyCafe.pyx":1549 + * + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc( nelemMemory * sizeof(np.int32)) + */ + case CAFE_LONG: + + /* "PyCafe.pyx":1551 + * elif dtcheck in [CAFE_LONG]: + * + * ival = malloc( nelemMemory * sizeof(np.int32)) # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.getLongArray(handle, ival) + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ival = ((int *)malloc((__pyx_v_nelemMemory * (sizeof(__pyx_t_9))))); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1552 + * + * ival = malloc( nelemMemory * sizeof(np.int32)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getLongArray(handle, ival) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1553 + * 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":1552 + * + * ival = malloc( nelemMemory * sizeof(np.int32)) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getLongArray(handle, ival) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L67; + } + __pyx_L67:; + } + } + + /* "PyCafe.pyx":1555 + * 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_3 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1560 + * #nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty(nelemMethod, dtype=np.int32, order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L70_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L70_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L70_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1562 + * if art in ['numpy','ndarray','numpy.ndarray']: + * + * mvIntNP = np.empty(nelemMethod, dtype=np.int32, order='C') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvIntNP[ij]=ival[ij] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __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_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvIntNP = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1563 + * + * mvIntNP = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvIntNP[ij]=ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1564 + * mvIntNP = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + * mvIntNP[ij]=ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return mvIntNP #arr + */ + __pyx_t_5 = __Pyx_PyInt_From_npy_int32(((__pyx_t_5numpy_int32_t)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvIntNP, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":1565 + * for ij in range(0, nelemMethod): + * mvIntNP[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvIntNP #arr + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":1566 + * 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":1560 + * #nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty(nelemMethod, dtype=np.int32, order='C') + */ + goto __pyx_L69; + } + + /* "PyCafe.pyx":1568 + * return mvIntNP #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_10 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __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_10, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __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_10, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __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_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1569 + * + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_u_C) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_7); + if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvInt = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; + + /* "PyCafe.pyx":1570 + * 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_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1571 + * 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_19 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_19)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":1572 + * for ij in range(0, nelemMethod): + * mvInt[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return memoryview(mvInt) + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":1573 + * mvInt[ij]=ival[ij] + * free(ival) + * return memoryview(mvInt) # <<<<<<<<<<<<<< + * + * elif art in ['array','array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1568 + * return mvIntNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemMethod, dtype=np.int32, order='C') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L69; + } + + /* "PyCafe.pyx":1575 + * return memoryview(mvInt) + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __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_10, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __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_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1576 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(ival[ij]) + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1577 + * elif art in ['array','array.array']: + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * arrayArray.append(ival[ij]) + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1578 + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): + * arrayArray.append(ival[ij]) # <<<<<<<<<<<<<< + * free(ival) + * return arrayArray + */ + __pyx_t_7 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1579 + * for ij in range(0, nelemMethod): + * arrayArray.append(ival[ij]) + * free(ival) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":1580 + * arrayArray.append(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":1575 + * return memoryview(mvInt) + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('h') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L69; + } + + /* "PyCafe.pyx":1582 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __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_10, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __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_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1583 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray=(ctypes.c_int32*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=ival[ij] + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + if (__pyx_t_5) { + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1584 + * elif art in ['ctypes', 'ctype']: + * ctypesArray=(ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij]=ival[ij] + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1585 + * ctypesArray=(ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=ival[ij] # <<<<<<<<<<<<<< + * free(ival) + * return ctypesArray + */ + __pyx_t_7 = __Pyx_PyInt_From_int(((int)(__pyx_v_ival[__pyx_v_ij]))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1585; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1586 + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":1587 + * 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":1582 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_int32*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L69; + } + + /* "PyCafe.pyx":1590 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_7, 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_7, 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_7, 2, __pyx_kp_u_Possible_types_are); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1591 + * 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') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1592 + * 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): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1593 + * 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_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_6); + if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __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":1594 + * 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_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1595 + * 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_20 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_20 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_20)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":1596 + * for ij in range(0, nelemMethod): + * mvInt[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":1597 + * mvInt[ij]=ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L69:; + + /* "PyCafe.pyx":1555 + * 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":1549 + * + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc( nelemMemory * sizeof(np.int32)) + */ + break; + + /* "PyCafe.pyx":1600 + * + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc( nelemMemory * sizeof(float)) + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":1602 + * 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":1603 + * + * fval = malloc( nelemMemory * sizeof(float)) + * start=time.time() # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.getFloatArray(handle, fval) + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + if (__pyx_t_9) { + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_start = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1604 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1605 + * 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":1604 + * fval = malloc( nelemMemory * sizeof(float)) + * start=time.time() + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getFloatArray(handle, fval) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L92; + } + __pyx_L92:; + } + } + + /* "PyCafe.pyx":1612 + * # status=self._c_cafe.get(handle, pvd) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * #nelemMethod=self.hh.getnelemMethod(handle) + * + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1615 + * #nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty(nelemMethod, dtype=np.float32) + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L95_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L95_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L95_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1617 + * if art in ['numpy','ndarray','numpy.ndarray']: + * + * mvFloatNP = np.empty(nelemMethod, dtype=np.float32) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvFloatNP[ij]=fval[ij] # pvd.getAsFloat(ij) + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __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_nelemMethod); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __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; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __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_mvFloatNP = __pyx_t_11; + __pyx_t_11 = 0; + + /* "PyCafe.pyx":1618 + * + * mvFloatNP = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloatNP[ij]=fval[ij] # pvd.getAsFloat(ij) + * #arr=np.asarray(mvFloat) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1619 + * mvFloatNP = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloatNP[ij]=fval[ij] # pvd.getAsFloat(ij) # <<<<<<<<<<<<<< + * #arr=np.asarray(mvFloat) + * + */ + __pyx_t_11 = PyFloat_FromDouble(((float)(__pyx_v_fval[__pyx_v_ij]))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvFloatNP, __pyx_v_ij, __pyx_t_11, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + + /* "PyCafe.pyx":1622 + * #arr=np.asarray(mvFloat) + * + * free(fval) # <<<<<<<<<<<<<< + * + * #arr = np.ascontiguousarray(mvDouble) + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":1627 + * #set_base(arr, dval) + * + * 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":1615 + * #nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty(nelemMethod, dtype=np.float32) + */ + goto __pyx_L94; + } + + /* "PyCafe.pyx":1629 + * return mvFloatNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L100_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L100_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L100_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1633 + * + * #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_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_7); + if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvFloat = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; + + /* "PyCafe.pyx":1634 + * #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_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1635 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij]=fval[ij] # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_22 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_22 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_22)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":1637 + * mvFloat[ij]=fval[ij] + * + * free(fval) # <<<<<<<<<<<<<< + * #memoryview(mvFloat).tolist() #tolist() only supports byte views + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":1640 + * #memoryview(mvFloat).tolist() #tolist() only supports byte views + * + * return memoryview(mvFloat) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1629 + * return mvFloatNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L94; + } + + /* "PyCafe.pyx":1656 + * + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('f') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L105_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L105_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1657 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('f') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(fval[ij]) + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1658 + * elif art in ['array','array.array']: + * arrayArray=array.array('f') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * arrayArray.append(fval[ij]) + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1659 + * arrayArray=array.array('f') + * for ij in range(0, nelemMethod): + * arrayArray.append(fval[ij]) # <<<<<<<<<<<<<< + * free(fval) + * return arrayArray + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1660 + * for ij in range(0, nelemMethod): + * arrayArray.append(fval[ij]) + * free(fval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":1661 + * 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":1656 + * + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('f') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L94; + } + + /* "PyCafe.pyx":1663 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L109_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L109_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1664 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray=(ctypes.c_float*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=fval[ij] + */ + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_c_float); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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); + } + } + if (__pyx_t_11) { + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } else { + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1665 + * elif art in ['ctypes', "ctype"]: + * ctypesArray=(ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij]=fval[ij] + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1666 + * ctypesArray=(ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return ctypesArray + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_fval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1667 + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":1668 + * 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":1663 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_float*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L94; + } + + /* "PyCafe.pyx":1671 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_7, 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_7, 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_7, 2, __pyx_kp_u_Possible_types_are); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __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":1672 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1673 + * 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): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1674 + * 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_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __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_nelemMethod); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_5); + if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __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":1675 + * print("Returning memoryview") + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvFloat[ij]=fval[ij] + * free(fval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1676 + * mvFloat = np.empty(nelemMethod, dtype=np.float32) + * for ij in range(0, nelemMethod): + * mvFloat[ij]=fval[ij] # <<<<<<<<<<<<<< + * free(fval) + * return mvFloat + */ + __pyx_t_23 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_23 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_23)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":1677 + * for ij in range(0, nelemMethod): + * mvFloat[ij]=fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":1678 + * mvFloat[ij]=fval[ij] + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + } + __pyx_L94:; + + /* "PyCafe.pyx":1612 + * # status=self._c_cafe.get(handle, pvd) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * #nelemMethod=self.hh.getnelemMethod(handle) + * + */ + } + + /* "PyCafe.pyx":1600 + * + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc( nelemMemory * sizeof(float)) + */ + break; + + /* "PyCafe.pyx":1681 + * + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * #start=time.time() + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":1684 + * + * #start=time.time() + * dval = malloc( nelemMemory * sizeof(double)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_dval = ((double *)malloc((__pyx_v_nelemMemory * (sizeof(double))))); + + /* "PyCafe.pyx":1686 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1688 + * 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":1686 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L117; + } + __pyx_L117:; + } + } + + /* "PyCafe.pyx":1690 + * status=self._c_cafe.getDoubleArray(handle, dval) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * #nelemMethod=self.hh.getnelemMethod(handle) + * + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1693 + * #nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * #mvDouble=dval + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L120_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L120_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L120_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1696 + * + * #mvDouble=dval + * mvDoubleNP = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDoubleNP[ij]=dval[ij] + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float64); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvDoubleNP = __pyx_t_9; + __pyx_t_9 = 0; + + /* "PyCafe.pyx":1697 + * #mvDouble=dval + * mvDoubleNP = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDoubleNP[ij]=dval[ij] + * #arr=np.asarray(mvDouble) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1698 + * mvDoubleNP = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDoubleNP[ij]=dval[ij] # <<<<<<<<<<<<<< + * #arr=np.asarray(mvDouble) + * free(dval) + */ + __pyx_t_9 = PyFloat_FromDouble(((double)(__pyx_v_dval[__pyx_v_ij]))); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvDoubleNP, __pyx_v_ij, __pyx_t_9, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":1700 + * mvDoubleNP[ij]=dval[ij] + * #arr=np.asarray(mvDouble) + * free(dval) # <<<<<<<<<<<<<< + * #end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":1703 + * #end=time.time() + * #print (end - start) + * 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":1693 + * #nelemMethod=self.hh.getnelemMethod(handle) + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * #mvDouble=dval + */ + goto __pyx_L119; + } + + /* "PyCafe.pyx":1705 + * return mvDoubleNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * #Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L125_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L125_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L125_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1708 + * + * #Method A to return memory view + * mvDouble = np.empty(nelemMethod, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * mvDouble[ij]=dval[ij] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __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_nelemMethod); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_7); + if (unlikely(!__pyx_t_24.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvDouble = __pyx_t_24; + __pyx_t_24.memview = NULL; + __pyx_t_24.data = NULL; + + /* "PyCafe.pyx":1709 + * #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_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1710 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij]=dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * #end=time.time() + */ + __pyx_t_25 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_25 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_25)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":1711 + * for ij in range(0, nelemMethod): + * mvDouble[ij]=dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * #end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":1714 + * #end=time.time() + * #print (end - start) + * return memoryview(mvDouble) # <<<<<<<<<<<<<< + * + * elif art in ['array','array.array']: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_memoryview, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1705 + * return mvDoubleNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * #Method A to return memory view + */ + goto __pyx_L119; + } + + /* "PyCafe.pyx":1716 + * return memoryview(mvDouble) + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('d') + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L130_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L130_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1717 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(dval[ij]) + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__150, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_arrayArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1718 + * elif art in ['array','array.array']: + * arrayArray=array.array('d') + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * arrayArray.append(dval[ij]) + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1719 + * arrayArray=array.array('d') + * for ij in range(0, nelemMethod): + * arrayArray.append(dval[ij]) # <<<<<<<<<<<<<< + * free(dval) + * #end=time.time() + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_7); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1720 + * for ij in range(0, nelemMethod): + * arrayArray.append(dval[ij]) + * free(dval) # <<<<<<<<<<<<<< + * #end=time.time() + * #print (end - start) + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":1723 + * #end=time.time() + * #print (end - start) + * 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":1716 + * return memoryview(mvDouble) + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('d') + * for ij in range(0, nelemMethod): + */ + goto __pyx_L119; + } + + /* "PyCafe.pyx":1725 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_10 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L134_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L134_bool_binop_done:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1726 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray=(ctypes.c_double*nelemMethod)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=dval[ij] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_c_double); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __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_filename = __pyx_f[1]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = PyNumber_Multiply(__pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + if (__pyx_t_9) { + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ctypesArray = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":1727 + * elif art in ['ctypes', "ctype"]: + * ctypesArray=(ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * ctypesArray[ij]=dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1728 + * ctypesArray=(ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return ctypesArray + */ + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_dval[__pyx_v_ij])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ctypesArray, __pyx_v_ij, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":1729 + * for ij in range(0, nelemMethod): + * ctypesArray[ij]=dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":1730 + * 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":1725 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_double*nelemMethod)() + * for ij in range(0, nelemMethod): + */ + goto __pyx_L119; + } + + /* "PyCafe.pyx":1733 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_7, 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_7, 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_7, 2, __pyx_kp_u_Possible_types_are); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __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":1734 + * 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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1735 + * 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): + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__152, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1736 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemMethod); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_6); + if (unlikely(!__pyx_t_24.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __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":1737 + * print("Returning memoryview") + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): # <<<<<<<<<<<<<< + * mvDouble[ij]=dval[ij] + * free(dval) + */ + __pyx_t_4 = __pyx_v_nelemMethod; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_4; __pyx_t_12+=1) { + __pyx_v_ij = __pyx_t_12; + + /* "PyCafe.pyx":1738 + * mvDouble = np.empty(nelemMethod, dtype=np.float64) + * for ij in range(0, nelemMethod): + * mvDouble[ij]=dval[ij] # <<<<<<<<<<<<<< + * free(dval) + * return mvDouble + */ + __pyx_t_26 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_26 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_26)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":1739 + * for ij in range(0, nelemMethod): + * mvDouble[ij]=dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":1740 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L119:; + + /* "PyCafe.pyx":1690 + * status=self._c_cafe.getDoubleArray(handle, dval) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * #nelemMethod=self.hh.getnelemMethod(handle) + * + */ + } + + /* "PyCafe.pyx":1681 + * + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * #start=time.time() + */ + break; + default: break; + } + + /* "PyCafe.pyx":1742 + * 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":1743 + * + * 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":1744 + * 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":1745 + * 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":1744 + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L142; + } + + /* "PyCafe.pyx":1747 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L142:; + + /* "PyCafe.pyx":1743 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":1748 + * 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)) + */ + __pyx_t_3 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1749 + * 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) + */ + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1750 + * 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) + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ec, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":1749 + * 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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":1751 + * _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] + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1748 + * 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)) + */ + } + + /* "PyCafe.pyx":1753 + * raise Exception(_cyCafeException) + * + * return [None] # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __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":1742 + * return mvDouble + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":1320 + * + * ################################################################################## + * def getArray(self, handlePV, str dt='native', str art='memoryview'): # <<<<<<<<<<<<<< + * ################################################################################## + * #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_10); + __Pyx_XDECREF(__pyx_t_11); + __PYX_XDEC_MEMVIEW(&__pyx_t_14, 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.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__cyCafeException); + __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_start); + __Pyx_XDECREF(__pyx_v_mvFloatNP); + __Pyx_XDECREF(__pyx_v_mvDoubleNP); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1761 + * + * ################################################################################## + * def getPVInt(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV,'int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_177getPVInt(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_177getPVInt(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_176getPVInt(((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_176getPVInt(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVInt", 0); + + /* "PyCafe.pyx":1762 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __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":1761 + * + * ################################################################################## + * 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":1766 + * + * ################################################################################## + * def getPVFloat(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV,'float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_179getPVFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_179getPVFloat(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_178getPVFloat(((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_178getPVFloat(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVFloat", 0); + + /* "PyCafe.pyx":1767 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __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":1766 + * + * ################################################################################## + * 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":1771 + * + * ################################################################################## + * def getPVStr(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPV(handlePV,'str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_181getPVStr(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_181getPVStr(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_180getPVStr(((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_180getPVStr(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVStr", 0); + + /* "PyCafe.pyx":1772 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1772; __pyx_clineno = __LINE__; goto __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":1771 + * + * ################################################################################## + * 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":1776 + * + * ################################################################################## + * def getPV(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getPV" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_183getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_183getPV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_182getPV(((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_182getPV(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_CyCafeException *__pyx_v__cyCafeException = 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPV", 0); + + /* "PyCafe.pyx":1778 + * 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":1780 + * cdef str _METHOD_="getPV" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":1782 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":1783 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1782 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1784 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1785 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":1784 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":1787 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":1791 + * + * cdef int status + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_pvd = PVDataHolder(__pyx_v_self->hh.getNelemNative(__pyx_v_handle)); + + /* "PyCafe.pyx":1793 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":1794 + * + * 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":1793 + * cdef PVDataHolder pvd = PVDataHolder(self.hh.getNelemNative(handle)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.get(handle, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":1796 + * 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":1797 + * + * 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":1798 + * 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":1799 + * 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":1798 + * 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":1801 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L11:; + + /* "PyCafe.pyx":1797 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":1802 + * 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)) + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":1803 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1804 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1803 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1805 + * _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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1802 + * 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)) + */ + } + + /* "PyCafe.pyx":1808 + * + * + * pvd_valnone=PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * pvd_valnone.value[0]=None + * return pvd_valnone + */ + __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_t_10)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __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":1809 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1810 + * 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":1796 + * status=self._c_cafe.get(handle, pvd) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":1812 + * return pvd_valnone + * + * return PVDataHolderToStruct(pvd, dt) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __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_t_10)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1776 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvd_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":1820 + * + * ################################################################################## + * def getPVStrList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_185getPVStrList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_185getPVStrList(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_184getPVStrList(((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_184getPVStrList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVStrList", 0); + + /* "PyCafe.pyx":1821 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __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":1820 + * + * ################################################################################## + * 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":1825 + * + * ################################################################################## + * def getPVIntList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_187getPVIntList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_187getPVIntList(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_186getPVIntList(((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_186getPVIntList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVIntList", 0); + + /* "PyCafe.pyx":1826 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __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":1825 + * + * ################################################################################## + * 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":1830 + * + * ################################################################################## + * def getPVFloatList(self, handleList): # <<<<<<<<<<<<<< + * return self.getPVList(handleList, dt='float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_189getPVFloatList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_189getPVFloatList(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_188getPVFloatList(((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_188getPVFloatList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVFloatList", 0); + + /* "PyCafe.pyx":1831 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __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":1830 + * + * ################################################################################## + * 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":1835 + * + * ################################################################################## + * def getPVList(self, handleList, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getPVList" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_191getPVList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_191getPVList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPVList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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, "getPVList") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1835; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getPVList", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1835; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1835; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_190getPVList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __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_190getPVList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt) { + 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; + 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + unsigned int __pyx_t_11; + long __pyx_t_12; + unsigned int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":1837 + * def getPVList(self, handleList, str dt='native'): + * ################################################################################## + * 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":1839 + * 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":1840 + * + * if isinstance(handleList, (str,int,long)): + * hl=[] # <<<<<<<<<<<<<< + * hl.append(handleList) + * handleList=[] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_hl = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1841 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1842 + * hl=[] + * hl.append(handleList) + * handleList=[] # <<<<<<<<<<<<<< + * handleList=hl + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1843 + * 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":1839 + * cdef str _METHOD_="getPVList" + * + * if isinstance(handleList, (str,int,long)): # <<<<<<<<<<<<<< + * hl=[] + * hl.append(handleList) + */ + } + + /* "PyCafe.pyx":1845 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __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":1846 + * + * if isinstance(handleList[0], (str)): + * handleList=self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":1845 + * handleList=hl + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList=self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":1847 + * 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")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __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":1848 + * 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")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":1847 + * 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")) + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":1865 + * #do this to avoid compiler warning messages + * + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1866 + * + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd = self._c_cafe.getPVData(v) + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":1868 + * v.push_back(handleList[i]) + * + * 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":1870 + * 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 + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1871 + * + * 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 + * + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (__pyx_v_pvd[__pyx_v_i]).setNelem(__pyx_v_self->hh.getNelemNative(__pyx_t_11)); + } + + /* "PyCafe.pyx":1876 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getPVArray(v, pvd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":1877 + * + * 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":1876 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getPVArray(v, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L16; + } + __pyx_L16:; + } + } + + /* "PyCafe.pyx":1879 + * 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":1880 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * for i in range(0, len(handleList)): + */ + __pyx_t_3 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1881 + * 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): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":1880 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * for i in range(0, len(handleList)): + */ + } + + /* "PyCafe.pyx":1882 + * 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]) ) + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1883 + * 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() ) + */ + __pyx_t_3 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1884 + * 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) + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __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_11)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __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_4); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); + __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_6); + PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_6); + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __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":1885 + * 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 ("") + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __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_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __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":1886 + * 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) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":1887 + * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":1883 + * 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() ) + */ + } + } + + /* "PyCafe.pyx":1879 + * 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":1894 + * cdef unsigned int dtcheck + * + * pvdList=[] # <<<<<<<<<<<<<< + * cpdef pvdata p1 + * + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_pvdList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":1897 + * cpdef pvdata p1 + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType(); + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":1898 + * + * for i in range(0, len(handleList)): + * dtn = pvd[i].getDataType(); # <<<<<<<<<<<<<< + * + * dtcheck=getMatchedDataType(dt, dtn) + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":1900 + * dtn = pvd[i].getDataType(); + * + * dtcheck=getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * localList=[] + * + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_dtcheck = __pyx_t_11; + + /* "PyCafe.pyx":1901 + * + * dtcheck=getMatchedDataType(dt, dtn) + * localList=[] # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_localList, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":1903 + * 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":1904 + * + * 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":1905 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1904 + * + * if pvd[i].getNelem() == 1: + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: + */ + break; + + /* "PyCafe.pyx":1906 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":1907 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1906 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + break; + + /* "PyCafe.pyx":1908 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":1909 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1908 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + break; + + /* "PyCafe.pyx":1910 + * 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]): + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":1912 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_3 = (__pyx_v_self->_c_cafe->isEnum(__pyx_t_11) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":1913 + * #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_filename = __pyx_f[1]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1912 + * 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_L25; + } + + /* "PyCafe.pyx":1915 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_CHAR: + * localList.append(pvd[i].getAsLong()) #( pvd[i].getAsChar()) + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L25:; + + /* "PyCafe.pyx":1910 + * 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; + + /* "PyCafe.pyx":1916 + * else: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) #( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":1917 + * 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()) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1916 + * else: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) #( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + break; + + /* "PyCafe.pyx":1918 + * 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: + */ + case CAFE_LONG: + + /* "PyCafe.pyx":1919 + * 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()) + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1918 + * 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: + */ + break; + + /* "PyCafe.pyx":1920 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":1921 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1920 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":1923 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "PyCafe.pyx":1903 + * localList=[] + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L24; + } + + /* "PyCafe.pyx":1926 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":1927 + * 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":1928 + * 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_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1929 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":1927 + * else: + * localListInner=[] + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + + /* "PyCafe.pyx":1930 + * 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)) + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":1931 + * 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_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1932 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":1930 + * 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; + + /* "PyCafe.pyx":1933 + * 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)) + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":1934 + * 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_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1935 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":1933 + * 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; + + /* "PyCafe.pyx":1936 + * 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 + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":1937 + * 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_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1939 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __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":1940 + * #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_filename = __pyx_f[1]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1939 + * 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_L34; + } + + /* "PyCafe.pyx":1942 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __pyx_L34:; + } + + /* "PyCafe.pyx":1936 + * 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; + + /* "PyCafe.pyx":1943 + * 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)) + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":1944 + * 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: + */ + __pyx_t_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1945 + * 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()): + */ + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":1943 + * 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)) + */ + break; + + /* "PyCafe.pyx":1946 + * 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)) + */ + case CAFE_LONG: + + /* "PyCafe.pyx":1947 + * 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: + */ + __pyx_t_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1948 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":1946 + * 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)) + */ + break; + + /* "PyCafe.pyx":1949 + * 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)) + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":1950 + * 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_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1951 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + + /* "PyCafe.pyx":1949 + * 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":1953 + * 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_11 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":1954 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + + /* "PyCafe.pyx":1955 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L24:; + + /* "PyCafe.pyx":1957 + * localList.append(localListInner) + * + * p1 = pvdata() # <<<<<<<<<<<<<< + * p1.value=localList + * p1.status=pvd[i].getStatus() + */ + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_pvdata), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __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":1958 + * + * 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":1959 + * 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":1960 + * 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":1961 + * p1.status=pvd[i].getStatus() + * p1.nelem=pvd[i].getNelem() + * p1.alarmStatus=pvd[i].getAlarmStatus() # <<<<<<<<<<<<<< + * p1.alarmSeverity=pvd[i].getAlarmSeverity() + * + */ + __pyx_v_p1->alarmStatus = (__pyx_v_pvd[__pyx_v_i]).getAlarmStatus(); + + /* "PyCafe.pyx":1962 + * p1.nelem=pvd[i].getNelem() + * p1.alarmStatus=pvd[i].getAlarmStatus() + * p1.alarmSeverity=pvd[i].getAlarmSeverity() # <<<<<<<<<<<<<< + * + * pvd._etsNorm=pvd[i].getEpicsTimeStampAsUInt32() + */ + __pyx_v_p1->alarmSeverity = (__pyx_v_pvd[__pyx_v_i]).getAlarmSeverity(); + + /* "PyCafe.pyx":1964 + * p1.alarmSeverity=pvd[i].getAlarmSeverity() + * + * pvd._etsNorm=pvd[i].getEpicsTimeStampAsUInt32() # <<<<<<<<<<<<<< + * + * ll=[] + */ + __pyx_v_pvd->_etsNorm = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsUInt32(); + + /* "PyCafe.pyx":1966 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_ll, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":1967 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1968 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1969 + * 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":1971 + * p1.ts=ll + * + * pvd._etsDate=pvd[i].getEpicsTimeStampAsDate() # <<<<<<<<<<<<<< + * + * ld=[] + */ + __pyx_v_pvd->_etsDate = (__pyx_v_pvd[__pyx_v_i]).getEpicsTimeStampAsDate(); + + /* "PyCafe.pyx":1973 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_ld, ((PyObject*)__pyx_t_9)); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":1974 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1975 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1976 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1977 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1978 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1979 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1980 + * 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_filename = __pyx_f[1]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":1981 + * 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":1983 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":1988 + * + * + * return pvdList, status # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_v_pvdList); + __Pyx_GIVEREF(__pyx_v_pvdList); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_pvdList); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1835 + * + * ################################################################################## + * def getPVList(self, handleList, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * 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":1996 + * + * ################################################################################## + * def printStatusIfError(self, handleList, statusList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="printStatusIfError" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_193printStatusIfError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_193printStatusIfError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_statusList = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_statusList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("printStatusIfError", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "printStatusIfError") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __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_192printStatusIfError(((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_192printStatusIfError(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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + unsigned int __pyx_t_11; + std::vector __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("printStatusIfError", 0); + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_INCREF(__pyx_v_statusList); + + /* "PyCafe.pyx":1998 + * 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":2000 + * 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":2001 + * + * if isinstance(handleList,(str,int,long)): + * handleListB=[] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * handleList=[] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2002 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2003 + * handleListB=[] + * handleListB.append(handleList) + * handleList=[] # <<<<<<<<<<<<<< + * handleList=handleListB + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2004 + * 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":2000 + * cdef str _METHOD_="printStatusIfError" + * + * if isinstance(handleList,(str,int,long)): # <<<<<<<<<<<<<< + * handleListB=[] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":2006 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __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":2007 + * + * if isinstance(handleList[0], (str)): + * handleList=self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2006 + * handleList=handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList=self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":2008 + * 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")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __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":2009 + * 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")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_3); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2008 + * 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")) + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":2012 + * "First input argument should be a 'list' of 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":2013 + * + * if isinstance(statusList, (int,long)): + * statusListB=[] # <<<<<<<<<<<<<< + * statusListB.append(statusList) + * statusList=[] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_statusListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2014 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2015 + * statusListB=[] + * statusListB.append(statusList) + * statusList=[] # <<<<<<<<<<<<<< + * statusList=statusListB + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2016 + * 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":2012 + * "First input argument should be a 'list' of if handles or if PVs")) + * + * if isinstance(statusList, (int,long)): # <<<<<<<<<<<<<< + * statusListB=[] + * statusListB.append(statusList) + */ + } + + /* "PyCafe.pyx":2018 + * statusList=statusListB + * + * if not isinstance(statusList, (list)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "Second input argument should be of ")) + */ + __pyx_t_1 = PyList_Check(__pyx_v_statusList); + __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":2019 + * + * if not isinstance(statusList, (list)): + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "Second input argument should be of ")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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_8 = 1; + } + } + __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_self->exString); + __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_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2018 + * statusList=statusListB + * + * if not isinstance(statusList, (list)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "Second input argument should be of ")) + */ + } + + /* "PyCafe.pyx":2022 + * "Second input argument should be of ")) + * + * if not isinstance(statusList[0], (int, long, float)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "Second input argument should be a of ")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_statusList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __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":2023 + * + * if not isinstance(statusList[0], (int, long, float)): + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "Second input argument should be a of ")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_filename = __pyx_f[1]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2022 + * "Second input argument should be of ")) + * + * if not isinstance(statusList[0], (int, long, float)): # <<<<<<<<<<<<<< + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ + * "Second input argument should be a of ")) + */ + } + + /* "PyCafe.pyx":2029 + * #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 + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":2030 + * #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 # <<<<<<<<<<<<<< + * + * return self._c_cafe.printStatusIfError(v, statusList) + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":2032 + * v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + * + * return self._c_cafe.printStatusIfError(v, statusList) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_12 = __pyx_convert_vector_from_py_int(__pyx_v_statusList); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->printStatusIfError(__pyx_v_v, __pyx_t_12)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":1996 + * + * ################################################################################## + * 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":2037 + * + * ################################################################################## + * def getAsyn(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getAsyn" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_195getAsyn(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_195getAsyn(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_194getAsyn(((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_194getAsyn(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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + unsigned int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getAsyn", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":2039 + * 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":2041 + * 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":2042 + * + * if isinstance(handleList, (str,int,long)): + * handleListB=[] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * handleList=[] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2043 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2044 + * handleListB=[] + * handleListB.append(handleList) + * handleList=[] # <<<<<<<<<<<<<< + * handleList=handleListB + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2045 + * 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":2041 + * cdef str _METHOD_="getAsyn" + * + * if isinstance(handleList, (str,int,long)): # <<<<<<<<<<<<<< + * handleListB=[] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":2047 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __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":2048 + * + * if isinstance(handleList[0], (str)): + * handleList=self.checkForHandleList(handleList) # <<<<<<<<<<<<<< + * elif not isinstance(handleList[0], (int, long)): + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2047 + * handleList=handleListB + * + * if isinstance(handleList[0], (str)): # <<<<<<<<<<<<<< + * handleList=self.checkForHandleList(handleList) + * elif not isinstance(handleList[0], (int, long)): + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":2049 + * 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")) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __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":2050 + * 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")) + * + */ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_3); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_a_3); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_a_3); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2049 + * 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")) + */ + } + __pyx_L7:; + + /* "PyCafe.pyx":2055 + * cdef vector[unsigned int] v + * cdef vector[int] vStatus + * v.reserve (len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.reserve(__pyx_t_8); + + /* "PyCafe.pyx":2056 + * cdef vector[int] vStatus + * v.reserve (len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * #do next step to avoid: + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vStatus.reserve(__pyx_t_8); + + /* "PyCafe.pyx":2060 + * #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 + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":2061 + * #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 # <<<<<<<<<<<<<< + * + * #Need to copy to a vector since + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":2065 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":2066 + * #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":2065 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":2068 + * 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":2069 + * + * 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":2070 + * if (status!=ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * print ("Error/Warning from def getAsyn: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2071 + * 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":2069 + * + * if (status!=ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print ("Error/Warning from def getAsyn: ") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2068 + * 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":2073 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); + __pyx_t_4 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2037 + * + * ################################################################################## + * 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":2083 + * + * ################################################################################## + * def waitForGetEvent(self,handlePV): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="waitForGetEvent(handlePV)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_197waitForGetEvent(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_197waitForGetEvent(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_196waitForGetEvent(((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_196waitForGetEvent(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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("waitForGetEvent", 0); + + /* "PyCafe.pyx":2085 + * def waitForGetEvent(self,handlePV): + * ################################################################################## + * cdef str _METHOD_="waitForGetEvent(handlePV)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_kp_u_waitForGetEvent_handlePV); + __pyx_v__METHOD_ = __pyx_kp_u_waitForGetEvent_handlePV; + + /* "PyCafe.pyx":2087 + * cdef str _METHOD_="waitForGetEvent(handlePV)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":2088 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2089 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":2088 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2090 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2091 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":2090 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2093 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument, should be if handle, else if PV")) + * with nogil: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t_2); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t_2); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t_2); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":2095 + * 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 + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2096 + * "First input argument, should be if handle, else if PV")) + * with nogil: + * status=self._c_cafe.waitForGetEvent(handle) # <<<<<<<<<<<<<< + * return status + * ################################################################################## + */ + __pyx_v_status = __pyx_v_self->_c_cafe->waitForGetEvent(__pyx_v_handle); + } + + /* "PyCafe.pyx":2095 + * 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 + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":2097 + * with nogil: + * status=self._c_cafe.waitForGetEvent(handle) + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * #END: def waitForGetEvent(self, handlePV) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2083 + * + * ################################################################################## + * def waitForGetEvent(self,handlePV): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="waitForGetEvent(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_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("PyCafe.CyCafe.waitForGetEvent", __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":2104 + * + * ################################################################################## + * def waitForBundledEvents(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="waitForBundledEvents(self, handleList)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_199waitForBundledEvents(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_199waitForBundledEvents(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_198waitForBundledEvents(((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_198waitForBundledEvents(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; + unsigned int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("waitForBundledEvents", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":2106 + * 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":2108 + * 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":2109 + * + * if isinstance(handleList, (str,int,long)): + * handleListB=[] # <<<<<<<<<<<<<< + * handleListB.append(handleList) + * handleList=[] + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_v_handleListB = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2110 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2111 + * handleListB=[] + * handleListB.append(handleList) + * handleList=[] # <<<<<<<<<<<<<< + * handleList=handleListB + * + */ + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2112 + * 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":2108 + * cdef str _METHOD_="waitForBundledEvents(self, handleList)" + * + * if isinstance(handleList, (str,int,long)): # <<<<<<<<<<<<<< + * handleListB=[] + * handleListB.append(handleList) + */ + } + + /* "PyCafe.pyx":2114 + * 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":2115 + * + * 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(__pyx_builtin_Exception, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2114 + * 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":2118 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2118; __pyx_clineno = __LINE__; goto __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":2119 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":2118 + * 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":2120 + * 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") + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __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":2121 + * 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") + * + */ + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2120 + * 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") + */ + } + __pyx_L8:; + + /* "PyCafe.pyx":2127 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.reserve(__pyx_t_6); + + /* "PyCafe.pyx":2128 + * + * 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 + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vRB.reserve(__pyx_t_6); + + /* "PyCafe.pyx":2129 + * 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 + * + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":2130 + * vRB.reserve(len(handleList)) + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) #do this copy to avoid compiler warning messages # <<<<<<<<<<<<<< + * + * + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_8); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":2134 + * + * #Wait for bundle + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.waitForBundledEvents(v, vRB) + * if (status!=ICAFE_NORMAL): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2135 + * #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":2134 + * + * #Wait for bundle + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.waitForBundledEvents(v, vRB) + * if (status!=ICAFE_NORMAL): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L15; + } + __pyx_L15:; + } + } + + /* "PyCafe.pyx":2136 + * 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":2137 + * 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":2138 + * 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__157, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":2139 + * 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":2137 + * 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":2140 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2136 + * 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":2141 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = __pyx_convert_vector_to_py_int(__pyx_v_vRB); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9); + __pyx_t_4 = 0; + __pyx_t_9 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2104 + * + * ################################################################################## + * 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_9); + __Pyx_XDECREF(__pyx_t_10); + __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":2147 + * + * ################################################################################## + * def getStrScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='str') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_201getStrScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_201getStrScalarList(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_200getStrScalarList(((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_200getStrScalarList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStrScalarList", 0); + + /* "PyCafe.pyx":2149 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __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":2147 + * + * ################################################################################## + * 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":2152 + * + * ################################################################################## + * def getIntScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='int') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_203getIntScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_203getIntScalarList(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_202getIntScalarList(((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_202getIntScalarList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getIntScalarList", 0); + + /* "PyCafe.pyx":2154 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __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":2152 + * + * ################################################################################## + * 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":2157 + * + * ################################################################################## + * def getFloatScalarList(self, handleList): # <<<<<<<<<<<<<< + * ################################################################################## + * return self.getScalarList(handleList, dt='float') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_205getFloatScalarList(PyObject *__pyx_v_self, PyObject *__pyx_v_handleList); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_205getFloatScalarList(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_204getFloatScalarList(((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_204getFloatScalarList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getFloatScalarList", 0); + + /* "PyCafe.pyx":2159 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __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":2157 + * + * ################################################################################## + * 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":2163 + * + * ################################################################################## + * def getScalarList(self, handleList, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getScalarList(handleList, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_207getScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_207getScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getScalarList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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, "getScalarList") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getScalarList", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_206getScalarList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __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_206getScalarList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt) { + 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; + int __pyx_v_status; + PyObject *__pyx_v_j = NULL; + std::vector __pyx_v_vRB; + int __pyx_v_statusBundle; + unsigned int __pyx_v_dtcheck; + PVDataHolder *__pyx_v_pvd; + CYTHON_UNUSED int __pyx_v_statusNoWait; + 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; + size_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + size_t __pyx_t_14; + unsigned int __pyx_t_15; + PyObject *__pyx_t_16 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getScalarList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":2165 + * def getScalarList(self, handleList, str dt='native'): + * ################################################################################## + * cdef str _METHOD_="getScalarList(handleList, str dt='native')" # <<<<<<<<<<<<<< + * + * #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":2169 + * #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":2170 + * + * 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(__pyx_builtin_Exception, __pyx_tuple__158, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2169 + * #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":2173 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __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":2174 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2173 + * 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":2175 + * 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") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __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":2176 + * 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") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__159, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2175 + * 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") + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":2179 + * First input argument, should be a 'list' of 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_filename = __pyx_f[1]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2181 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2182 + * + * for i in range(0, len(handleList)): + * nelemPrevious.append(self._c_cafe.setNelemToOne(handleList[i])) # <<<<<<<<<<<<<< + * + * #c=self.hh.getNelemClient(handleList[i]) + */ + __pyx_t_3 = PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2181 + * 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":2195 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.reserve(__pyx_t_5); + + /* "PyCafe.pyx":2196 + * + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vStatus.reserve(__pyx_t_5); + + /* "PyCafe.pyx":2198 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2199 + * + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) #do this copy to avoid compiler warning messages # <<<<<<<<<<<<<< + * + * #Need to copy to a vector since + */ + __pyx_t_6 = PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":2198 + * vStatus.reserve(len(handleList)) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + * + */ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2203 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":2204 + * #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":2203 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":2212 + * #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":2213 + * #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_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2214 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_10]) == ICAFE_WAITING_FOR_PREV_CALLBACK) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2216 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2217 + * #getHandle + * 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_filename = __pyx_f[1]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (((__pyx_v_v[__pyx_t_10]) == (__pyx_v_v[__pyx_t_14])) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2218 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (((__pyx_v_vStatus[__pyx_t_14]) == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2219 + * if(v[j]==v[i]): + * if (vStatus[j]==ICAFE_NORMAL): + * vStatus[i]=vStatus[j] # <<<<<<<<<<<<<< + * + * #ca_poll() Not required as above will flush! + */ + __pyx_t_14 = __Pyx_PyInt_As_size_t(__pyx_v_j); if (unlikely((__pyx_t_14 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + (__pyx_v_vStatus[__pyx_t_10]) = (__pyx_v_vStatus[__pyx_t_14]); + + /* "PyCafe.pyx":2218 + * for j in range(0,(i-1)): + * if(v[j]==v[i]): + * if (vStatus[j]==ICAFE_NORMAL): # <<<<<<<<<<<<<< + * vStatus[i]=vStatus[j] + * + */ + } + + /* "PyCafe.pyx":2217 + * #getHandle + * for j in range(0,(i-1)): + * if(v[j]==v[i]): # <<<<<<<<<<<<<< + * if (vStatus[j]==ICAFE_NORMAL): + * vStatus[i]=vStatus[j] + */ + } + + /* "PyCafe.pyx":2216 + * 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":2214 + * 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":2213 + * #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":2212 + * #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":2225 + * #Wait for bundle + * cdef vector[int] vRB + * with nogil: # <<<<<<<<<<<<<< + * statusBundle=self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle!=ICAFE_NORMAL): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2226 + * cdef vector[int] vRB + * 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":2225 + * #Wait for bundle + * cdef vector[int] vRB + * with nogil: # <<<<<<<<<<<<<< + * statusBundle=self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle!=ICAFE_NORMAL): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L24; + } + __pyx_L24:; + } + } + + /* "PyCafe.pyx":2227 + * 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: ") + */ + __pyx_t_2 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2228 + * 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) + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2229 + * 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__160, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2230 + * 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":2228 + * 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) + */ + } + + /* "PyCafe.pyx":2227 + * 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: ") + */ + } + + /* "PyCafe.pyx":2232 + * 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":2233 + * + * cdef unsigned int dtcheck=CAFE_NOT_REQUESTED #native type not yet know + * dtcheck=getMatchedDataType(dt, dtcheck) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtcheck); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":2240 + * + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":2242 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":2243 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->vStr.reserve(__pyx_t_5); + + /* "PyCafe.pyx":2245 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2246 + * + * 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":2245 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L29; + } + __pyx_L29:; + } + } + + /* "PyCafe.pyx":2248 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_11 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_11); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":2249 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * ##localList=[] + */ + __pyx_t_11 = PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_15 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_15 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_8, __pyx_t_15); + + /* "PyCafe.pyx":2248 + * 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":2256 + * #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_filename = __pyx_f[1]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_3); + __pyx_t_6 = 0; + __pyx_t_11 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_16; + __pyx_t_16 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2240 + * + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + + /* "PyCafe.pyx":2258 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_SHORT: + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":2260 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":2261 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->vInt.reserve(__pyx_t_5); + + /* "PyCafe.pyx":2263 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2264 + * + * 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":2263 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L34; + } + __pyx_L34:; + } + } + + /* "PyCafe.pyx":2269 + * #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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __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_16); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_16); + __pyx_t_16 = 0; + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_16)) || PyTuple_CheckExact(__pyx_t_16)) { + __pyx_t_3 = __pyx_t_16; __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_16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 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_COMPILING_IN_CPYTHON + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_16 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_16 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + #endif + } + } else { + __pyx_t_16 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_16)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_16); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_16); + __pyx_t_16 = 0; + + /* "PyCafe.pyx":2270 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * ##localList=[] + */ + __pyx_t_16 = PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_15 = __Pyx_PyInt_As_unsigned_int(__pyx_t_16); if (unlikely((__pyx_t_15 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_16); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2270; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_15, __pyx_t_8); + + /* "PyCafe.pyx":2269 + * #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":2276 + * + * #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_filename = __pyx_f[1]; __pyx_lineno = 2276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_11 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2276; __pyx_clineno = __LINE__; goto __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_16); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_11); + __pyx_t_3 = 0; + __pyx_t_16 = 0; + __pyx_t_11 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2258 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + + /* "PyCafe.pyx":2278 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_FLOAT: + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2280 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":2281 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->vFloat.reserve(__pyx_t_5); + + /* "PyCafe.pyx":2283 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2284 + * + * 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":2283 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L39; + } + __pyx_L39:; + } + } + + /* "PyCafe.pyx":2286 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_11)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_6 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2287 + * + * 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 = PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_15 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_8, __pyx_t_15); + + /* "PyCafe.pyx":2286 + * 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":2303 + * + * #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_filename = __pyx_f[1]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2303; __pyx_clineno = __LINE__; goto __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_16); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_16); + __pyx_t_11 = 0; + __pyx_t_6 = 0; + __pyx_t_16 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2278 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":2316 + * #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":2332 + * + * #Required to allocate memory for shared pointer + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_16 = __pyx_t_3; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_7 = Py_TYPE(__pyx_t_16)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_16))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_16)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_16)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_16); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2333 + * #Required to allocate memory for shared pointer + * for i in range(0, 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_filename = __pyx_f[1]; __pyx_lineno = 2333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + (__pyx_v_pvd[__pyx_t_12]).setNelem(1); + + /* "PyCafe.pyx":2332 + * + * #Required to allocate memory for shared pointer + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(1) + * + */ + } + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "PyCafe.pyx":2335 + * 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":2337 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __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_16); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_16); + __pyx_t_16 = 0; + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (likely(PyList_CheckExact(__pyx_t_16)) || PyTuple_CheckExact(__pyx_t_16)) { + __pyx_t_3 = __pyx_t_16; __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_16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 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_COMPILING_IN_CPYTHON + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_16 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_16); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_16 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + #endif + } + } else { + __pyx_t_16 = __pyx_t_7(__pyx_t_3); + if (unlikely(!__pyx_t_16)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_16); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_16); + __pyx_t_16 = 0; + + /* "PyCafe.pyx":2338 + * + * for i in range(0, len(handleList)): + * self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * #statusList=[] + */ + __pyx_t_16 = PyObject_GetItem(__pyx_v_handleList, __pyx_v_i); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_15 = __Pyx_PyInt_As_unsigned_int(__pyx_t_16); if (unlikely((__pyx_t_15 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_t_16 = PyObject_GetItem(__pyx_v_nelemPrevious, __pyx_v_i); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_16); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_15, __pyx_t_8); + + /* "PyCafe.pyx":2337 + * 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":2360 + * cdef unsigned int dtn + * + * localList=[] # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_localList = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2362 + * localList=[] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType(); + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_16 = __pyx_t_3; __Pyx_INCREF(__pyx_t_16); __pyx_t_5 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_5 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_7 = Py_TYPE(__pyx_t_16)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_16))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_16)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_16)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_16, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + } + } else { + __pyx_t_3 = __pyx_t_7(__pyx_t_16); + if (unlikely(!__pyx_t_3)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2364 + * for i in range(0, 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_filename = __pyx_f[1]; __pyx_lineno = 2364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_dtn = (__pyx_v_pvd[__pyx_t_12]).getDataType(); + + /* "PyCafe.pyx":2365 + * + * dtn = pvd[i].getDataType(); + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * #print ("dt=", dt, "dtn=", dtn, "dtcheck=", dtcheck) + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __pyx_f_6PyCafe_getMatchedDataType(__pyx_v_dt, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":2371 + * #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":2372 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2371 + * #print (pvd[i].getAsDouble()) + * + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: + */ + break; + + /* "PyCafe.pyx":2373 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":2374 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2373 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + break; + + /* "PyCafe.pyx":2375 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":2376 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2375 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + break; + + /* "PyCafe.pyx":2377 + * elif dtcheck==CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":2380 + * #if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName()))==1: # <<<<<<<<<<<<<< + * 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_filename = __pyx_f[1]; __pyx_lineno = 2380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPV((__pyx_v_pvd[__pyx_t_12]).getPVName())) == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2381 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName()))==1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_t_12]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2380 + * #if enum, string taken as native + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPV(pvd[i].getPVName()))==1: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * else: + */ + goto __pyx_L48; + } + + /* "PyCafe.pyx":2383 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L48:; + + /* "PyCafe.pyx":2377 + * elif dtcheck==CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * + */ + break; + + /* "PyCafe.pyx":2385 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsLong()) # pvd[i].getAsChar() + * elif dtcheck==CAFE_LONG: + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":2386 + * + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsLong()) # pvd[i].getAsChar() # <<<<<<<<<<<<<< + * 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_filename = __pyx_f[1]; __pyx_lineno = 2386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2385 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsLong()) # pvd[i].getAsChar() + * elif dtcheck==CAFE_LONG: + */ + break; + + /* "PyCafe.pyx":2387 + * 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: + */ + case CAFE_LONG: + + /* "PyCafe.pyx":2388 + * 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()) + */ + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_t_12]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2387 + * 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: + */ + break; + + /* "PyCafe.pyx":2389 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2390 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_t_12]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2389 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":2392 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2392; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2393 + * 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!") + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_HIGH) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2394 + * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2395 + * 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() ) + */ + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_Entering_0_for_element); + __Pyx_GIVEREF(__pyx_kp_u_Entering_0_for_element); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Entering_0_for_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_as_channel_is_not_connected); + __Pyx_GIVEREF(__pyx_kp_u_as_channel_is_not_connected); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_as_channel_is_not_connected); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2395; __pyx_clineno = __LINE__; goto __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":2393 + * 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!") + */ + } + break; + } + + /* "PyCafe.pyx":2362 + * localList=[] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType(); + */ + } + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "PyCafe.pyx":2401 + * #free(pvd) + * + * return localList, status, vStatus # use vstatus instead of statusList (as cache is NoWait) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2401; __pyx_clineno = __LINE__; goto __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_16); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3); + __pyx_t_16 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2163 + * + * ################################################################################## + * def getScalarList(self, handleList, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getScalarList(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_6); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_16); + __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_localList); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2410 + * ### # int alarmStatus=None, int alarmSev=None): + * ################################################################################## + * def getCompoundList(self, handleList, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getCompoundList(handleList, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_209getCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_209getCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getCompoundList (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_handleList,&__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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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, "getCompoundList") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2410; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("getCompoundList", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2410; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_208getCompoundList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handleList, __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_208getCompoundList(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handleList, PyObject *__pyx_v_dt) { + CYTHON_UNUSED PyObject *__pyx_v__METHOD_ = 0; + std::vector __pyx_v_v; + std::vector __pyx_v_vStatus; + int __pyx_v_flagCompound; + unsigned int __pyx_v_nelemLocal; + Py_ssize_t __pyx_v_i; + int __pyx_v_status; + std::vector __pyx_v_vRB; + int __pyx_v_statusBundle; + unsigned int __pyx_v_dtcheck; + PVDataHolder *__pyx_v_pvd; + CYTHON_UNUSED int __pyx_v_statusNoWait; + 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; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + unsigned int __pyx_t_10; + int __pyx_t_11; + long __pyx_t_12; + unsigned int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getCompoundList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":2412 + * def getCompoundList(self, handleList, str dt='native'): + * ################################################################################## + * 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":2414 + * cdef str _METHOD_="getCompoundList(handleList, str dt='native')" + * + * 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":2415 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2414 + * cdef str _METHOD_="getCompoundList(handleList, str dt='native')" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList=self.getHandlesFromWithinGroup(handleList) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2417 + * handleList=self.getHandlesFromWithinGroup(handleList) + * 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_2 = PyList_Check(__pyx_v_handleList); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2418 + * 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(__pyx_builtin_Exception, __pyx_tuple__162, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2418; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2417 + * handleList=self.getHandlesFromWithinGroup(handleList) + * 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":2421 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2421; __pyx_clineno = __LINE__; goto __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":2422 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2422; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":2421 + * 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":2423 + * 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") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyInt_Check(__pyx_t_3); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_3); + __pyx_t_1 = (__pyx_t_7 != 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":2424 + * 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") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__163, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2423 + * 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") + */ + } + __pyx_L5:; + } + __pyx_L3:; + + /* "PyCafe.pyx":2433 + * cdef vector[int] vStatus + * + * v.reserve (len(handleList)) # <<<<<<<<<<<<<< + * vStatus.reserve(len(handleList)) + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.reserve(__pyx_t_8); + + /* "PyCafe.pyx":2434 + * + * v.reserve (len(handleList)) + * vStatus.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * cdef bint flagCompound=False + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vStatus.reserve(__pyx_t_8); + + /* "PyCafe.pyx":2436 + * vStatus.reserve(len(handleList)) + * + * cdef bint flagCompound=False # <<<<<<<<<<<<<< + * + * cdef unsigned int nelemLocal=1 + */ + __pyx_v_flagCompound = 0; + + /* "PyCafe.pyx":2438 + * cdef bint flagCompound=False + * + * cdef unsigned int nelemLocal=1 # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_nelemLocal = 1; + + /* "PyCafe.pyx":2440 + * cdef unsigned int nelemLocal=1 + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) #do this copy to avoid compiler warning messages + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":2441 + * + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) #do this copy to avoid compiler warning messages # <<<<<<<<<<<<<< + * + * + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":2444 + * + * + * if (nelemLocal==1): # <<<<<<<<<<<<<< + * nelemLocal=self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + */ + __pyx_t_1 = ((__pyx_v_nelemLocal == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2445 + * + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2445; __pyx_clineno = __LINE__; goto __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":2446 + * if (nelemLocal==1): + * nelemLocal=self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: # <<<<<<<<<<<<<< + * flagCompound=True + * + */ + __pyx_t_1 = ((__pyx_v_nelemLocal > 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2447 + * nelemLocal=self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + * flagCompound=True # <<<<<<<<<<<<<< + * + * #Need to copy to a vector since + */ + __pyx_v_flagCompound = 1; + + /* "PyCafe.pyx":2446 + * if (nelemLocal==1): + * nelemLocal=self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: # <<<<<<<<<<<<<< + * flagCompound=True + * + */ + } + + /* "PyCafe.pyx":2444 + * + * + * if (nelemLocal==1): # <<<<<<<<<<<<<< + * nelemLocal=self.hh.getNelemNative(handleList[i]) + * if nelemLocal > 1: + */ + } + } + + /* "PyCafe.pyx":2451 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":2452 + * #Coercion from Python not allowed without the GIL + * with nogil: + * status=self._c_cafe.getV(v, 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":2451 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L14; + } + __pyx_L14:; + } + } + + /* "PyCafe.pyx":2458 + * #Wait for bundle + * cdef vector[int] vRB + * with nogil: # <<<<<<<<<<<<<< + * statusBundle=self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle!=ICAFE_NORMAL): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2459 + * cdef vector[int] vRB + * 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":2458 + * #Wait for bundle + * cdef vector[int] vRB + * with nogil: # <<<<<<<<<<<<<< + * statusBundle=self._c_cafe.waitForBundledEvents(v, vRB) + * if (statusBundle!=ICAFE_NORMAL): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":2460 + * 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: ") + */ + __pyx_t_1 = ((__pyx_v_statusBundle != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2461 + * 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) + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2462 + * 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__164, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "PyCafe.pyx":2463 + * 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":2461 + * 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) + */ + } + + /* "PyCafe.pyx":2460 + * 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: ") + */ + } + + /* "PyCafe.pyx":2465 + * 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":2466 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_dtcheck = __pyx_t_10; + + /* "PyCafe.pyx":2469 + * + * #Use Scalar + * if flagCompound == False: # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + __pyx_t_1 = ((__pyx_v_flagCompound == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2471 + * if flagCompound == False: + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + switch (__pyx_v_dtcheck) { + case CAFE_STRING: + + /* "PyCafe.pyx":2473 + * if dtcheck in [CAFE_STRING]: + * + * self.vStr.clear() # <<<<<<<<<<<<<< + * self.vStr.reserve(len(handleList)) + * + */ + __pyx_v_self->vStr.clear(); + + /* "PyCafe.pyx":2474 + * + * self.vStr.clear() + * self.vStr.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->vStr.reserve(__pyx_t_8); + + /* "PyCafe.pyx":2476 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2477 + * + * with nogil: + * status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) # <<<<<<<<<<<<<< + * + * #localList=[] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVStr(__pyx_v_v, __pyx_v_self->vStr, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":2476 + * self.vStr.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVStr(v, self.vStr, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L23; + } + __pyx_L23:; + } + } + + /* "PyCafe.pyx":2484 + * #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_4 = __pyx_convert_vector_to_py_std_3a__3a_string(__pyx_v_self->vStr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2484; __pyx_clineno = __LINE__; goto __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_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2471 + * if flagCompound == False: + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * + * self.vStr.clear() + */ + break; + + /* "PyCafe.pyx":2486 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + case CAFE_SHORT: + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":2488 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: + * + * self.vInt.clear() # <<<<<<<<<<<<<< + * self.vInt.reserve(len(handleList)) + * + */ + __pyx_v_self->vInt.clear(); + + /* "PyCafe.pyx":2489 + * + * self.vInt.clear() + * self.vInt.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->vInt.reserve(__pyx_t_8); + + /* "PyCafe.pyx":2491 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2492 + * + * with nogil: + * status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) # <<<<<<<<<<<<<< + * + * #localList=[] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVLong(__pyx_v_v, __pyx_v_self->vInt, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":2491 + * self.vInt.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVLong(v, self.vInt, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L26; + } + __pyx_L26:; + } + } + + /* "PyCafe.pyx":2497 + * #statusList=[] + * + * return self.vInt, status, vStatus # <<<<<<<<<<<<<< + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_convert_vector_to_py_dbr_long_t(__pyx_v_self->vInt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2497; __pyx_clineno = __LINE__; goto __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_6); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2486 + * return self.vStr, status, vStatus + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR, CAFE_LONG]: # <<<<<<<<<<<<<< + * + * self.vInt.clear() + */ + break; + + /* "PyCafe.pyx":2499 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + case CAFE_FLOAT: + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2501 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * + * self.vFloat.clear() # <<<<<<<<<<<<<< + * self.vFloat.reserve(len(handleList)) + * + */ + __pyx_v_self->vFloat.clear(); + + /* "PyCafe.pyx":2502 + * + * self.vFloat.clear() + * self.vFloat.reserve(len(handleList)) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->vFloat.reserve(__pyx_t_8); + + /* "PyCafe.pyx":2504 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2505 + * + * with nogil: + * status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) # <<<<<<<<<<<<<< + * + * #localList=[] + */ + __pyx_v_status = __pyx_v_self->_c_cafe->getCacheVDouble(__pyx_v_v, __pyx_v_self->vFloat, __pyx_v_vStatus); + } + + /* "PyCafe.pyx":2504 + * self.vFloat.reserve(len(handleList)) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheVDouble(v, self.vFloat, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L29; + } + __pyx_L29:; + } + } + + /* "PyCafe.pyx":2510 + * #statusList=[] + * + * return self.vFloat, status, vStatus # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __pyx_convert_vector_to_py_double(__pyx_v_self->vFloat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2510; __pyx_clineno = __LINE__; goto __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_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2499 + * return self.vInt, status, vStatus + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * self.vFloat.clear() + */ + break; + default: break; + } + + /* "PyCafe.pyx":2469 + * + * #Use Scalar + * if flagCompound == False: # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + } + + /* "PyCafe.pyx":2517 + * #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":2521 + * + * #Required to allocate memory for shared pointer + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) + * + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":2522 + * #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) + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (__pyx_v_pvd[__pyx_v_i]).setNelem(__pyx_v_self->hh.getNelemClient(__pyx_t_10)); + } + + /* "PyCafe.pyx":2524 + * pvd[i].setNelem(self.hh.getNelemClient(handleList[i])) + * + * statusNoWait=self._c_cafe.getCachePVArrayNoWait(v, pvd) # <<<<<<<<<<<<<< + * + * cdef unsigned int dtn + */ + __pyx_v_statusNoWait = __pyx_v_self->_c_cafe->getCachePVArrayNoWait(__pyx_v_v, __pyx_v_pvd); + + /* "PyCafe.pyx":2528 + * cdef unsigned int dtn + * + * localList=[] # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2528; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2530 + * localList=[] + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * + * dtn = pvd[i].getDataType(); + */ + __pyx_t_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":2532 + * for i in range(0, len(handleList)): + * + * dtn = pvd[i].getDataType(); # <<<<<<<<<<<<<< + * dtcheck = getMatchedDataType(dt, dtn) + * + */ + __pyx_v_dtn = (__pyx_v_pvd[__pyx_v_i]).getDataType(); + + /* "PyCafe.pyx":2533 + * + * dtn = pvd[i].getDataType(); + * dtcheck = getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_10; + + /* "PyCafe.pyx":2537 + * + * + * 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":2538 + * + * 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":2539 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2538 + * + * if pvd[i].getNelem() == 1: + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: + */ + break; + + /* "PyCafe.pyx":2540 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":2541 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2540 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + break; + + /* "PyCafe.pyx":2542 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":2543 + * 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_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2542 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + break; + + /* "PyCafe.pyx":2544 + * 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: + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":2546 + * 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_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_t_10) == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2547 + * #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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2546 + * 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_L35; + } + + /* "PyCafe.pyx":2549 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck==CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L35:; + + /* "PyCafe.pyx":2544 + * 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; + + /* "PyCafe.pyx":2551 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":2552 + * + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2551 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + break; + + /* "PyCafe.pyx":2553 + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + */ + case CAFE_LONG: + + /* "PyCafe.pyx":2554 + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2553 + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + */ + break; + + /* "PyCafe.pyx":2555 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2556 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) #no data + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2555 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":2558 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) #no data # <<<<<<<<<<<<<< + * else: + * localListInner=[] + */ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "PyCafe.pyx":2537 + * + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L34; + } + + /* "PyCafe.pyx":2560 + * localList.append(0) #no data + * else: + * localListInner=[] # <<<<<<<<<<<<<< + * if dtcheck==CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2561 + * 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":2562 + * 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(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2563 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2563; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":2561 + * else: + * localListInner=[] + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + + /* "PyCafe.pyx":2564 + * 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)) + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":2565 + * 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(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2566 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":2564 + * 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; + + /* "PyCafe.pyx":2567 + * 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)) + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":2568 + * 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(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2569 + * elif dtcheck==CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_ENUM: + * + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":2567 + * 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; + + /* "PyCafe.pyx":2570 + * 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()): + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":2572 + * 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(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2574 + * 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_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_t_13) == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2575 + * #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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2574 + * 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_L44; + } + + /* "PyCafe.pyx":2577 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck==CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L44:; + } + + /* "PyCafe.pyx":2570 + * 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; + + /* "PyCafe.pyx":2579 + * 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)) + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":2580 + * + * 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: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2581 + * 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()): + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":2579 + * 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)) + */ + break; + + /* "PyCafe.pyx":2582 + * 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)) + */ + case CAFE_LONG: + + /* "PyCafe.pyx":2583 + * 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: + */ + __pyx_t_10 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2584 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":2582 + * 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)) + */ + break; + + /* "PyCafe.pyx":2585 + * 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)) + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2586 + * 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(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2587 + * 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_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + /*else*/ { + + /* "PyCafe.pyx":2589 + * 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(); + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) { + __pyx_v_j = __pyx_t_12; + + /* "PyCafe.pyx":2590 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) #no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_int_0); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":2585 + * 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":2591 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) #no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L34:; + } + + /* "PyCafe.pyx":2596 + * #free(pvd) + * + * 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_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2596; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2596; __pyx_clineno = __LINE__; goto __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_6); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2410 + * ### # int alarmStatus=None, int alarmSev=None): + * ################################################################################## + * def getCompoundList(self, handleList, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * 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_6); + __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_localList); + __Pyx_XDECREF(__pyx_v_localListInner); + __Pyx_XDECREF(__pyx_v_handleList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2605 + * + * ################################################################################## + * def getCompoundPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getCompoundPVGroup(ghandleName, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_211getCompoundPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_211getCompoundPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 2605; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 2605; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2605; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_210getCompoundPVGroup(((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_210getCompoundPVGroup(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; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + PyObject *(*__pyx_t_12)(PyObject *); + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_13; + int __pyx_t_14; + int __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getCompoundPVGroup", 0); + + /* "PyCafe.pyx":2607 + * 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":2609 + * cdef str _METHOD_="getCompoundPVGroup(ghandleName, str dt='native')" + * + * cdef unsigned int ghandle=0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":2610 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2611 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":2610 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2612 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2613 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":2612 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2616 + * else: + * + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if group handle, else if group name") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__165, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":2619 + * First input argument, should be if group handle, else if group name") + * + * handleList=[] # <<<<<<<<<<<<<< + * handleList=self.getHandlesFromWithinGroup(ghandle) + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2619; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_handleList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2620 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_8) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else { + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __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_DECREF_SET(__pyx_v_handleList, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2622 + * handleList=self.getHandlesFromWithinGroup(ghandle) + * + * localList=[] # <<<<<<<<<<<<<< + * statusList=[] + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2622; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2623 + * + * localList=[] + * statusList=[] # <<<<<<<<<<<<<< + * + * cdef vector[unsigned int] hV + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2627 + * cdef vector[unsigned int] hV + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * hV.push_back(handleList[i]) + * + */ + __pyx_t_10 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2627; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":2628 + * + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":2630 + * hV.push_back(handleList[i]) + * + * self.hh.setCafeDbrTypeV(hV, DBR_TIME) # <<<<<<<<<<<<<< + * + * localList, status, statusList=self.getCompoundList(handleList, dt) + */ + __pyx_v_self->hh.setCafeDbrTypeV(__pyx_v_hV, DBR_TIME); + + /* "PyCafe.pyx":2632 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __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_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_handleList); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_v_dt); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_9 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_9); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + #endif + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + index = 2; __pyx_t_9 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L9_unpacking_done; + __pyx_L8_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2632; __pyx_clineno = __LINE__; goto __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_7; + __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_statusList, __pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":2636 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":2637 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":2636 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":2640 + * + * cdef PVDataHolder * pvd + * pvd=pvg.getPVData() # <<<<<<<<<<<<<< + * + * cdef pvdata p1 + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":2644 + * cdef pvdata p1 + * + * localListToStruct=[] # <<<<<<<<<<<<<< + * + * cdef int groupStatus=ICAFE_NORMAL + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localListToStruct = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2646 + * localListToStruct=[] + * + * cdef int groupStatus=ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_v_groupStatus = ICAFE_NORMAL; + + /* "PyCafe.pyx":2648 + * cdef int groupStatus=ICAFE_NORMAL + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * p1 = pvdata() + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":2649 + * + * for i in range(0, pvg.getNPV()): + * p1 = pvdata() # <<<<<<<<<<<<<< + * + * #pvd[i].setDouble(localList[i]) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_pvdata), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __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":2652 + * + * #pvd[i].setDouble(localList[i]) + * p1=PVDataHolderToStruct(pvd[i], dt) # <<<<<<<<<<<<<< + * + * if not isinstance(localList[i],(list)): + */ + __pyx_t_13.__pyx_n = 1; + __pyx_t_13.dt = __pyx_v_dt; + __pyx_t_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_13)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __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":2654 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __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":2655 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_ll, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2656 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_ll, __pyx_t_5); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2657 + * 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":2654 + * p1=PVDataHolderToStruct(pvd[i], dt) + * + * if not isinstance(localList[i],(list)): # <<<<<<<<<<<<<< + * ll=[] + * ll.append(localList[i]) + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":2659 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2659; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2659; __pyx_clineno = __LINE__; goto __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":2661 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->status = __pyx_t_15; + + /* "PyCafe.pyx":2663 + * 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":2664 + * + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_groupStatus = __pyx_t_15; + + /* "PyCafe.pyx":2663 + * p1.status=statusList[i] + * + * if groupStatus == ICAFE_NORMAL: # <<<<<<<<<<<<<< + * groupStatus=statusList[i] + * + */ + } + + /* "PyCafe.pyx":2666 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_aStatSev, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2667 + * + * aStatSev=[] + * aStatSev=self.getAlarmStatusSeverity(handleList[i]) # <<<<<<<<<<<<<< + * p1.alarmStatus=aStatSev[0] + * p1.alarmSeverity=aStatSev[1] + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getAlarmStatusSeverity); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + if (!__pyx_t_6) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else { + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF_SET(__pyx_v_aStatSev, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2668 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->alarmStatus = __pyx_t_15; + + /* "PyCafe.pyx":2669 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_p1->alarmSeverity = __pyx_t_15; + + /* "PyCafe.pyx":2671 + * p1.alarmSeverity=aStatSev[1] + * + * p1.ts=self.getTimeStamp(handleList[i]) # <<<<<<<<<<<<<< + * p1.tsDate=self.getTimeStampAsDate(handleList[i]) + * + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTimeStamp); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(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); + } + } + if (!__pyx_t_7) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else { + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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_filename = __pyx_f[1]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __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":2672 + * + * p1.ts=self.getTimeStamp(handleList[i]) + * p1.tsDate=self.getTimeStampAsDate(handleList[i]) # <<<<<<<<<<<<<< + * + * #p1.showMax(10) + */ + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTimeStampAsDate); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_8) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else { + __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __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; + 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_filename = __pyx_f[1]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __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":2675 + * + * #p1.showMax(10) + * localListToStruct.append(p1) # <<<<<<<<<<<<<< + * + * #for j in range (0, len(localListToStruct)): + */ + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_localListToStruct, ((PyObject *)__pyx_v_p1)); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2675; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":2684 + * cpdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata=localListToStruct + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_pvgroup), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2684; __pyx_clineno = __LINE__; goto __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":2686 + * 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":2689 + * #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":2690 + * + * 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":2691 + * 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":2692 + * 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":2696 + * #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":2605 + * + * ################################################################################## + * 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_9); + __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":2705 + * + * ################################################################################## + * def getStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV,'str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_213getStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_213getStrCache(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_212getStrCache(((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_212getStrCache(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStrCache", 0); + + /* "PyCafe.pyx":2706 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 2706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2706; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2706; __pyx_clineno = __LINE__; goto __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":2705 + * + * ################################################################################## + * 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":2710 + * + * ################################################################################## + * def getIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV,'int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_215getIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_215getIntCache(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_214getIntCache(((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_214getIntCache(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getIntCache", 0); + + /* "PyCafe.pyx":2711 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 2711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2711; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2711; __pyx_clineno = __LINE__; goto __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":2710 + * + * ################################################################################## + * 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":2715 + * + * ################################################################################## + * def getFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getCache(handlePV,'float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_217getFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_217getFloatCache(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_216getFloatCache(((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_216getFloatCache(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getFloatCache", 0); + + /* "PyCafe.pyx":2716 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2716; __pyx_clineno = __LINE__; goto __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":2715 + * + * ################################################################################## + * 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":2720 + * + * ################################################################################## + * def getCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getCache(handlePV, str dt='native')" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_219getCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_219getCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_218getCache(((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_218getCache(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_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getCache", 0); + + /* "PyCafe.pyx":2721 + * ################################################################################## + * 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":2723 + * cdef str _METHOD_="getCache(handlePV, str dt='native')" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":2725 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2726 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":2725 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2727 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2728 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2728; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2728; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":2727 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2730 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2730; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":2733 + * First input argument, should be if handle, else if PV") + * + * cdef long dtr=0 # <<<<<<<<<<<<<< + * status=self.hh.getDataTypeNative(handle, dtr) + * + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2734 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_status = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2736 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2736; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":2737 + * + * 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":2738 + * 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":2739 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_7); + + /* "PyCafe.pyx":2738 + * 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":2741 + * 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) + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_t_7); + } + __pyx_L8:; + + /* "PyCafe.pyx":2737 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2742 + * else: + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED in PyCafe def getCache. Status = %d" %status) + * return None + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2743 + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: + * raise Exception("EXCEPTION RAISED in PyCafe def getCache. Status = %d" %status) # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g_4, __pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2743; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2742 + * else: + * self._c_cafe.printStatus(handle, status) + * if self.haveExceptions: # <<<<<<<<<<<<<< + * raise Exception("EXCEPTION RAISED in PyCafe def getCache. Status = %d" %status) + * return None + */ + } + + /* "PyCafe.pyx":2744 + * if self.haveExceptions: + * 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_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "PyCafe.pyx":2736 + * 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":2746 + * 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":2747 + * + * 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":2748 + * 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() ) + */ + __pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":2749 + * 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: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2750 + * 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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2749 + * 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: + */ + } + + /* "PyCafe.pyx":2751 + * 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()),\ + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2752 + * 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())) + */ + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2753 + * 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) + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ec, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __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_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2754 + * _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] + */ + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_v_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2754; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2752 + * 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())) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2755 + * _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * return [None] + * + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2755; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2755; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2751 + * 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()),\ + */ + } + + /* "PyCafe.pyx":2756 + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) + * return [None] # <<<<<<<<<<<<<< + * + * #Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2756; __pyx_clineno = __LINE__; goto __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":2747 + * + * 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":2759 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2760 + * #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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2759 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + } + + /* "PyCafe.pyx":2761 + * 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)) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2762 + * 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) + */ + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2763 + * 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] + */ + __pyx_t_5 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ec, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2762 + * 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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2764 + * _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] + * + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2761 + * 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)) + */ + } + + /* "PyCafe.pyx":2765 + * _ec=ICAFE_TYPENOTCONN, _et=self.cs.code(ICAFE_TYPENOTCONN), _ei=self.cs.info(ICAFE_TYPENOTCONN)) + * raise Exception(_cyCafeException) + * return [None] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2765; __pyx_clineno = __LINE__; goto __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":2746 + * 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":2768 + * + * + * cdef unsigned int dtcheck = dtr # <<<<<<<<<<<<<< + * dtcheck=getMatchedDataType(dt, dtr) + * + */ + __pyx_v_dtcheck = __pyx_v_dtr; + + /* "PyCafe.pyx":2769 + * + * cdef unsigned int dtcheck = dtr + * dtcheck=getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * if dtcheck in [CAFE_STRING]: + */ + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2769; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":2771 + * 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":2772 + * + * if dtcheck in [CAFE_STRING]: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2773 + * if dtcheck in [CAFE_STRING]: + * status=self._c_cafe.getCacheString(handle, self.valStr) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":2774 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2773 + * if dtcheck in [CAFE_STRING]: + * status=self._c_cafe.getCacheString(handle, self.valStr) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * + */ + } + + /* "PyCafe.pyx":2771 + * dtcheck=getMatchedDataType(dt, dtr) + * + * if dtcheck in [CAFE_STRING]: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheString(handle, self.valStr) + * if status==ICAFE_NORMAL: + */ + break; + + /* "PyCafe.pyx":2776 + * 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_SHORT: + case CAFE_CHAR: + case CAFE_LONG: + + /* "PyCafe.pyx":2777 + * + * 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_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheLong(__pyx_v_handle, __pyx_v_self->valInt)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2778 + * 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_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":2779 + * 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_5 = __Pyx_PyInt_From_int(__pyx_v_self->valInt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2778 + * 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":2776 + * 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; + + /* "PyCafe.pyx":2781 + * return self.valInt + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status==ICAFE_NORMAL: + */ + case CAFE_FLOAT: + case CAFE_DOUBLE: + + /* "PyCafe.pyx":2782 + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status=self._c_cafe.getCacheDouble(handle, self.valFloat) # <<<<<<<<<<<<<< + * if status==ICAFE_NORMAL: + * return self.valFloat + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheDouble(__pyx_v_handle, __pyx_v_self->valFloat)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2783 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status=self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":2784 + * 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_6 = PyFloat_FromDouble(__pyx_v_self->valFloat); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2783 + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: + * status=self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valFloat + * + */ + } + + /* "PyCafe.pyx":2781 + * return self.valInt + * + * elif dtcheck in [CAFE_FLOAT, CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCacheDouble(handle, self.valFloat) + * if status==ICAFE_NORMAL: + */ + break; + + /* "PyCafe.pyx":2786 + * return self.valFloat + * + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * if self._c_cafe.isEnum(handle): + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":2788 + * 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":2789 + * #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_6 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->getCacheString(__pyx_v_handle, __pyx_v_self->valStr)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2790 + * if self._c_cafe.isEnum(handle): + * status=self._c_cafe.getCacheString(handle, self.valStr) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + __pyx_t_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2790; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2790; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":2791 + * 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_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->valStr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2790 + * if self._c_cafe.isEnum(handle): + * status=self._c_cafe.getCacheString(handle, self.valStr) + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valStr + * else: + */ + } + + /* "PyCafe.pyx":2788 + * 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":2793 + * return self.valStr + * else: + * status=self._c_cafe.getCacheLong(handle, self.valInt) # <<<<<<<<<<<<<< + * if status ==ICAFE_NORMAL: + * return self.valInt + */ + /*else*/ { + __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_filename = __pyx_f[1]; __pyx_lineno = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2794 + * else: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":2795 + * status=self._c_cafe.getCacheLong(handle, self.valInt) + * if status ==ICAFE_NORMAL: + * return self.valInt # <<<<<<<<<<<<<< + * + * else: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->valInt); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":2794 + * else: + * status=self._c_cafe.getCacheLong(handle, self.valInt) + * if status ==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * return self.valInt + * + */ + } + } + __pyx_L18:; + + /* "PyCafe.pyx":2786 + * return self.valFloat + * + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * if self._c_cafe.isEnum(handle): + */ + break; + default: + + /* "PyCafe.pyx":2798 + * + * else: + * status=self.hh.getStatus(handle) # <<<<<<<<<<<<<< + * if status == ICAFE_NORMAL: + * print ("This line in PyCafe def getCache should never appear!") + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->hh.getStatus(__pyx_v_handle)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_status, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2799 + * 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_6 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":2800 + * 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_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2801 + * if status == ICAFE_NORMAL: + * print ("This line in PyCafe def getCache should never appear!") + * print ("Datatype unknown, returning value 0") # <<<<<<<<<<<<<< + * return 0 + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2802 + * 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":2799 + * 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":2804 + * return 0 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2804; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":2805 + * + * 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":2806 + * 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":2807 + * 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_filename = __pyx_f[1]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_7); + + /* "PyCafe.pyx":2806 + * 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":2809 + * self._c_cafe.printStatusMessage(status) + * else: + * self._c_cafe.printStatus(handle, status) # <<<<<<<<<<<<<< + * _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)) + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_t_7); + } + __pyx_L24:; + + /* "PyCafe.pyx":2805 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2810 + * else: + * self._c_cafe.printStatus(handle, status) + * _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) + */ + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2811 + * self._c_cafe.printStatus(handle, status) + * _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) + * + */ + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ec, __pyx_v_status) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.code(__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_self->cs.info(__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2810 + * else: + * self._c_cafe.printStatus(handle, status) + * _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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2812 + * _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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2804 + * return 0 + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2720 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":2821 + * + * ################################################################################## + * def getStrArrayCache(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='str', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_221getStrArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_221getStrArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 2821; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 2821; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_220getStrArrayCache(((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_220getStrArrayCache(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getStrArrayCache", 0); + + /* "PyCafe.pyx":2822 + * ################################################################################## + * def getStrArrayCache(self, handlePV, str art='memoryview'): + * 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_filename = __pyx_f[1]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __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":2821 + * + * ################################################################################## + * def getStrArrayCache(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * 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":2826 + * + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='int', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_223getIntArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_223getIntArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 2826; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 2826; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_222getIntArrayCache(((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_222getIntArrayCache(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getIntArrayCache", 0); + + /* "PyCafe.pyx":2827 + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='memoryview'): + * 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_filename = __pyx_f[1]; __pyx_lineno = 2827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2827; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2827; __pyx_clineno = __LINE__; goto __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":2826 + * + * ################################################################################## + * def getIntArrayCache(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * 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":2831 + * + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * return self.getArrayCache(handlePV, dt='float', art=art) + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_225getFloatArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_225getFloatArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_art = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_224getFloatArrayCache(((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_224getFloatArrayCache(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getFloatArrayCache", 0); + + /* "PyCafe.pyx":2832 + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='memoryview'): + * 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_filename = __pyx_f[1]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_art, __pyx_v_art) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __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":2831 + * + * ################################################################################## + * def getFloatArrayCache(self, handlePV, str art='memoryview'): # <<<<<<<<<<<<<< + * 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":2837 + * + * ################################################################################## + * def getArrayCache(self, handlePV, str dt='native', str art='memoryview'): # <<<<<<<<<<<<<< + * ################################################################################## + * #Typed Memoryviews from K.W. Smith + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_227getArrayCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_227getArrayCache(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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_memoryview); + 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); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_art), (&PyUnicode_Type), 1, "art", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_226getArrayCache(((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_226getArrayCache(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_CyCafeException *__pyx_v__cyCafeException = 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } }; + size_t __pyx_t_15; + int __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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getArrayCache", 0); + + /* "PyCafe.pyx":2848 + * #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":2850 + * cdef str _METHOD_="getArrayCache" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":2852 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2853 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 2853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":2852 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2854 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2855 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception("{} {} {}".format(self.exString, _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_filename = __pyx_f[1]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":2854 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":2857 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception("{} {} {}".format(self.exString, _METHOD_, \ # <<<<<<<<<<<<<< + * "First input argument should be if handle, else if PV")) + * + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__120, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __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->exString); + __Pyx_GIVEREF(__pyx_v_self->exString); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->exString); + __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_t); + __Pyx_GIVEREF(__pyx_kp_u_First_input_argument_should_be_t); + PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_kp_u_First_input_argument_should_be_t); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":2872 + * #str [:,::1] mvStr + * cnp.ndarray arr + * long dtr=0 # <<<<<<<<<<<<<< + * int status + * unsigned int i + */ + __pyx_v_dtr = 0; + + /* "PyCafe.pyx":2878 + * + * + * 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":2880 + * 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":2881 + * + * 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":2882 + * 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":2883 + * 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":2882 + * 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":2885 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":2881 + * + * if status != ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":2886 + * 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)) + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2887 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2888 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2887 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2889 + * _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] + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2889; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2886 + * 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)) + */ + } + + /* "PyCafe.pyx":2891 + * raise Exception(_cyCafeException) + * + * return [None] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2891; __pyx_clineno = __LINE__; goto __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":2880 + * 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":2895 + * + * + * 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":2896 + * + * 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":2897 + * 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() ) + */ + __pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":2898 + * 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: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2899 + * 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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_self->channelInfo.getCafeConnectionState()); + + /* "PyCafe.pyx":2898 + * 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: + */ + } + + /* "PyCafe.pyx":2900 + * 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()),\ + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2901 + * 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())) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2902 + * 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) + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->channelInfo.getCafeConnectionState()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __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_self->channelInfo.getCafeConnectionState())); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2903 + * _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] + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2901 + * 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())) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2904 + * _ec=self.channelInfo.getCafeConnectionState(), _et=self.cs.code(self.channelInfo.getCafeConnectionState()),\ + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * return [None] + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2900 + * 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()),\ + */ + } + + /* "PyCafe.pyx":2905 + * _ei=self.cs.info(self.channelInfo.getCafeConnectionState())) + * raise Exception(_cyCafeException) + * return [None] # <<<<<<<<<<<<<< + * + * #Likely to be superfluous + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2905; __pyx_clineno = __LINE__; goto __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":2896 + * + * 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":2908 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + __pyx_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2909 + * #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), \ + */ + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, ICAFE_TYPENOTCONN); + + /* "PyCafe.pyx":2908 + * + * #Likely to be superfluous + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatus(handle,ICAFE_TYPENOTCONN) + * if self.haveExceptions: + */ + } + + /* "PyCafe.pyx":2910 + * 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)) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2911 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2912 + * 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] + */ + __pyx_t_6 = __Pyx_PyInt_From_CAFE_CFT_STATE(ICAFE_TYPENOTCONN); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __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(ICAFE_TYPENOTCONN)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2911 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2913 + * _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] + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":2910 + * 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)) + */ + } + + /* "PyCafe.pyx":2914 + * _ec=ICAFE_TYPENOTCONN, _et=self.cs.code(ICAFE_TYPENOTCONN), _ei=self.cs.info(ICAFE_TYPENOTCONN)) + * raise Exception(_cyCafeException) + * return [None] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2914; __pyx_clineno = __LINE__; goto __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":2895 + * + * + * 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":2917 + * + * + * 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":2919 + * 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":2920 + * + * cdef unsigned int dtcheck = dtr + * dtcheck=getMatchedDataType(dt, dtr) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_dtr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_4; + + /* "PyCafe.pyx":2926 + * #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":2927 + * + * 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":2929 + * 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":2931 + * status=self._c_cafe.getCacheDbrStringArray(handle, sval) + * + * locallist=[] # <<<<<<<<<<<<<< + * + * if status==ICAFE_NORMAL: + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_locallist = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":2933 + * 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":2935 + * if status==ICAFE_NORMAL: + * + * for i in range(0,nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * locallist.append(sval[i]) + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":2936 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_locallist, __pyx_t_6); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":2938 + * locallist.append(sval[i]) + * + * free(sval) # <<<<<<<<<<<<<< + * return locallist + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2939 + * + * 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":2933 + * locallist=[] + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * for i in range(0,nelemToRetrieveFromCache): + */ + } + + /* "PyCafe.pyx":2941 + * return locallist + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2943 + * 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): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __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_12, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __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_12, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __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_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":2944 + * + * 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]) + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __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; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_str_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_13); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_40); + __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __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":2945 + * 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) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":2946 + * mvStr = np.empty(nelemToRetrieveFromCache, 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_filename = __pyx_f[1]; __pyx_lineno = 2946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_i, __pyx_t_7, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":2947 + * for i in range(0, nelemToRetrieveFromCache): + * mvStr[i]=str(sval[i]) + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2949 + * 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":2943 + * 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): + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":2951 + * 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_12 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L25_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L25_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L25_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2952 + * + * elif art in ['memoryview','mv','memoryviewslice']: + * mvStr = np.empty(nelemToRetrieveFromCache, dtype=(np.str_,40), order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __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_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_str_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_40); + __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_mvStr = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2954 + * mvStr = np.empty(nelemToRetrieveFromCache, 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":2955 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvStr, __pyx_v_ij, __pyx_t_5, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":2956 + * for ij in range(0, nelemToRetrieveFromCache): + * mvStr[ij]=str(sval[ij]) + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2958 + * 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":2951 + * return mvStr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvStr = np.empty(nelemToRetrieveFromCache, dtype=(np.str_,40), order='C') + * + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":2960 + * 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; + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L30_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L30_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":2961 + * + * 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_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__169, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":2964 + * #RETURNING LIST - DOES NOT SUPPORT array of strings; + * + * arrayArray=[] # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(str(sval[ij])) + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":2965 + * + * arrayArray=[] + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(str(sval[ij])) + * free(sval) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":2966 + * arrayArray=[] + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(str(sval[ij])) # <<<<<<<<<<<<<< + * free(sval) + * return arrayArray + */ + __pyx_t_5 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":2967 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(str(sval[ij])) + * free(sval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2968 + * 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":2960 + * 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; + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":2970 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_char_p*nelemToRetrieveFromCache)() #c_wchar_p is unicode! + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L34_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L34_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":2971 + * + * 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') + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __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_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (__pyx_t_7) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2971; __pyx_clineno = __LINE__; goto __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":2972 + * 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) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":2973 + * 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 + */ + __pyx_t_5 = __Pyx_PyObject_FromString((__pyx_v_sval[__pyx_v_ij])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":2974 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=(sval[ij]).encode('utf-8') + * free(sval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2975 + * 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":2970 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_char_p*nelemToRetrieveFromCache)() #c_wchar_p is unicode! + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":2978 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2978; __pyx_clineno = __LINE__; goto __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); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2978; __pyx_clineno = __LINE__; goto __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":2979 + * 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') + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2980 + * 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): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__172, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":2981 + * 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] + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __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; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_13); + __Pyx_INCREF(__pyx_int_40); + __Pyx_GIVEREF(__pyx_int_40); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_40); + __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2981; __pyx_clineno = __LINE__; goto __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":2982 + * 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) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":2983 + * mvStr = np.empty(nelemToRetrieveFromCache, 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_filename = __pyx_f[1]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":2984 + * for ij in range(0, nelemToRetrieveFromCache): + * mvStr[ij]=sval[ij] + * free(sval) # <<<<<<<<<<<<<< + * + * return mvStr + */ + free(__pyx_v_sval); + + /* "PyCafe.pyx":2986 + * 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":2941 + * return locallist + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + } + + /* "PyCafe.pyx":2926 + * #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; + + /* "PyCafe.pyx":2988 + * return mvStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc( nelemToRetrieveFromCache * sizeof(np.int16)) + */ + case CAFE_SHORT: + case CAFE_CHAR: + + /* "PyCafe.pyx":2990 + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: + * + * i16val = malloc( nelemToRetrieveFromCache * sizeof(np.int16)) # <<<<<<<<<<<<<< + * + * status=self._c_cafe.getCacheShortArray(handle, i16val) + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2990; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2990; __pyx_clineno = __LINE__; goto __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":2992 + * 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":2994 + * 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":2997 + * #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') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L42_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L42_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L42_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":2999 + * if art in ['numpy','ndarray','numpy.ndarray']: + * + * mvShortNP = np.empty(nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __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_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __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; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_C) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __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_13; + __pyx_t_13 = 0; + + /* "PyCafe.pyx":3001 + * mvShortNP = np.empty(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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3002 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvShortNP[ij]=i16val[ij] # <<<<<<<<<<<<<< + * #arr=np.asarray(mvShort) + * + */ + __pyx_t_13 = __Pyx_PyInt_From_npy_int16(((__pyx_t_5numpy_int16_t)(__pyx_v_i16val[__pyx_v_ij]))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvShortNP, __pyx_v_ij, __pyx_t_13, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + + /* "PyCafe.pyx":3005 + * #arr=np.asarray(mvShort) + * + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShortNP #arr + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":3007 + * 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":2997 + * #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') + */ + goto __pyx_L41; + } + + /* "PyCafe.pyx":3009 + * 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_12 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L47_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L47_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L47_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3010 + * + * elif art in ['memoryview','mv','memoryviewslice']: + * mvShort = np.empty(nelemToRetrieveFromCache, dtype=np.int16, order='C') # <<<<<<<<<<<<<< + * + * for ij in range(0, nelemToRetrieveFromCache): + */ + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_13); + __pyx_t_13 = 0; + __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_order, __pyx_n_u_C) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __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_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(__pyx_t_5); + if (unlikely(!__pyx_t_14.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":3012 + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3013 + * + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij]=i16val[ij] # <<<<<<<<<<<<<< + * free(i16val) + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 3013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((__pyx_t_5numpy_int16_t *) ( /* dim=0 */ ((char *) (((__pyx_t_5numpy_int16_t *) __pyx_v_mvShort.data) + __pyx_t_15)) )) = ((short)(__pyx_v_i16val[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3014 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij]=i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":3016 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3009 + * return mvShortNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvShort = np.empty(nelemToRetrieveFromCache, dtype=np.int16, order='C') + * + */ + goto __pyx_L41; + } + + /* "PyCafe.pyx":3018 + * 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_12 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L52_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L52_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3019 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(i16val[ij]) + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__173, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3020 + * elif art in ['array','array.array']: + * arrayArray=array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(i16val[ij]) + * free(i16val) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3021 + * arrayArray=array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(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_filename = __pyx_f[1]; __pyx_lineno = 3021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3022 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(i16val[ij]) + * free(i16val) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":3023 + * arrayArray.append(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":3018 + * return mvShort + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L41; + } + + /* "PyCafe.pyx":3025 + * 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_12 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L56_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L56_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3026 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray=(ctypes.c_int16*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=i16val[ij] + */ + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_13)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + if (__pyx_t_13) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } else { + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __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":3027 + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3028 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3029 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":3030 + * 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":3025 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_int16*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L41; + } + + /* "PyCafe.pyx":3033 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __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); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3033; __pyx_clineno = __LINE__; goto __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":3034 + * 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') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__174, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3035 + * 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): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__175, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3036 + * 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] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 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_6); + if (unlikely(!__pyx_t_14.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_mvShort = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; + + /* "PyCafe.pyx":3037 + * print("Returning memoryview") + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3038 + * mvShort = np.empty(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_16 = -1; + if (unlikely(__pyx_t_17 >= (size_t)__pyx_v_mvShort.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3038; __pyx_clineno = __LINE__; goto __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":3039 + * for ij in range(0, nelemToRetrieveFromCache): + * mvShort[ij]=i16val[ij] + * free(i16val) # <<<<<<<<<<<<<< + * + * return mvShort + */ + free(__pyx_v_i16val); + + /* "PyCafe.pyx":3041 + * free(i16val) + * + * return mvShort # <<<<<<<<<<<<<< + * + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L41:; + + /* "PyCafe.pyx":2994 + * 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":2988 + * return mvStr + * + * elif dtcheck in [CAFE_SHORT, CAFE_CHAR]: # <<<<<<<<<<<<<< + * + * i16val = malloc( nelemToRetrieveFromCache * sizeof(np.int16)) + */ + break; + + /* "PyCafe.pyx":3044 + * + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc( nelemToRetrieveFromCache * sizeof(np.int32)) + */ + case CAFE_LONG: + + /* "PyCafe.pyx":3046 + * elif dtcheck in [CAFE_LONG]: + * + * ival = malloc( nelemToRetrieveFromCache * sizeof(np.int32)) # <<<<<<<<<<<<<< + * + * status=self._c_cafe.getCacheLongArray(handle, ival) + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __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":3048 + * 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":3050 + * status=self._c_cafe.getCacheLongArray(handle, ival) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + __pyx_t_3 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3052 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty(nelemToRetrieveFromCache, dtype=np.int32, order='C') + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L64_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L64_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L64_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3054 + * 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] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __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_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvIntNP = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":3055 + * + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3056 + * mvIntNP = np.empty(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_filename = __pyx_f[1]; __pyx_lineno = 3056; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":3057 + * for ij in range(0, nelemToRetrieveFromCache): + * mvIntNP[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvIntNP #arr + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3058 + * 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":3052 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvIntNP = np.empty(nelemToRetrieveFromCache, dtype=np.int32, order='C') + */ + goto __pyx_L63; + } + + /* "PyCafe.pyx":3060 + * return mvIntNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L69_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L69_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L69_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3061 + * + * 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_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_t_5); + if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3061; __pyx_clineno = __LINE__; goto __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":3062 + * 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) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3063 + * mvInt = np.empty(nelemToRetrieveFromCache, 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_16 = -1; + if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_19)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3064 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3065 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3060 + * return mvIntNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * mvInt = np.empty(nelemToRetrieveFromCache, dtype=np.int32, order='C') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L63; + } + + /* "PyCafe.pyx":3067 + * 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_12 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L74_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L74_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3068 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(ival[ij]) + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__176, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3069 + * elif art in ['array','array.array']: + * arrayArray=array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * arrayArray.append(ival[ij]) + * free(ival) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3070 + * arrayArray=array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(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_filename = __pyx_f[1]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3071 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(ival[ij]) + * free(ival) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3072 + * arrayArray.append(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":3067 + * return mvInt + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('h') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L63; + } + + /* "PyCafe.pyx":3074 + * 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_12 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L78_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L78_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3075 + * + * elif art in ['ctypes', 'ctype']: + * ctypesArray=(ctypes.c_int32*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=ival[ij] + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __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_filename = __pyx_f[1]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (__pyx_t_7) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3075; __pyx_clineno = __LINE__; goto __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":3076 + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3077 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3078 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3079 + * 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":3074 + * return arrayArray + * + * elif art in ['ctypes', 'ctype']: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_int32*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L63; + } + + /* "PyCafe.pyx":3082 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __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); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __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":3083 + * 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') + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__177, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3084 + * 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): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__178, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3085 + * 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] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __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; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __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); + if (unlikely(!__pyx_t_18.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3085; __pyx_clineno = __LINE__; goto __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":3086 + * print("Returning memoryview") + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3087 + * mvInt = np.empty(nelemToRetrieveFromCache, 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_16 = -1; + if (unlikely(__pyx_t_20 >= (size_t)__pyx_v_mvInt.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_mvInt.data) + __pyx_t_20)) )) = ((int)(__pyx_v_ival[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3088 + * for ij in range(0, nelemToRetrieveFromCache): + * mvInt[ij]=ival[ij] + * free(ival) # <<<<<<<<<<<<<< + * return mvInt + * + */ + free(__pyx_v_ival); + + /* "PyCafe.pyx":3089 + * mvInt[ij]=ival[ij] + * free(ival) + * return mvInt # <<<<<<<<<<<<<< + * + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 3089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L63:; + + /* "PyCafe.pyx":3050 + * status=self._c_cafe.getCacheLongArray(handle, ival) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + } + + /* "PyCafe.pyx":3044 + * + * + * elif dtcheck in [CAFE_LONG]: # <<<<<<<<<<<<<< + * + * ival = malloc( nelemToRetrieveFromCache * sizeof(np.int32)) + */ + break; + + /* "PyCafe.pyx":3092 + * + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc( nelemToRetrieveFromCache * sizeof(float)) + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":3094 + * 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":3096 + * 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":3098 + * status=self._c_cafe.getCacheFloatArray(handle, fval) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3100 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty(nelemToRetrieveFromCache, dtype=np.float32) + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L86_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L86_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L86_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3102 + * 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) + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __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; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __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_13; + __pyx_t_13 = 0; + + /* "PyCafe.pyx":3103 + * + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3104 + * mvFloatNP = np.empty(nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloatNP[ij]=fval[ij] # pvd.getAsFloat(ij) # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_13 = PyFloat_FromDouble(((float)(__pyx_v_fval[__pyx_v_ij]))); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + if (unlikely(__Pyx_SetItemInt(__pyx_v_mvFloatNP, __pyx_v_ij, __pyx_t_13, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } + + /* "PyCafe.pyx":3106 + * mvFloatNP[ij]=fval[ij] # pvd.getAsFloat(ij) + * + * free(fval) # <<<<<<<<<<<<<< + * + * return mvFloatNP #arr + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3108 + * 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":3100 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * mvFloatNP = np.empty(nelemToRetrieveFromCache, dtype=np.float32) + */ + goto __pyx_L85; + } + + /* "PyCafe.pyx":3110 + * return mvFloatNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L91_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L91_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L91_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3114 + * + * #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_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_13); + __pyx_t_13 = 0; + __pyx_t_13 = PyDict_New(); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __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_13); __pyx_t_13 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_5); + if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3114; __pyx_clineno = __LINE__; goto __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":3115 + * #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_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3116 + * mvFloat = np.empty(nelemToRetrieveFromCache, dtype=np.float32) + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij]=fval[ij] # <<<<<<<<<<<<<< + * + * free(fval) + */ + __pyx_t_22 = __pyx_v_ij; + __pyx_t_16 = -1; + if (unlikely(__pyx_t_22 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_22)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3118 + * mvFloat[ij]=fval[ij] + * + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3119 + * + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3110 + * return mvFloatNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L85; + } + + /* "PyCafe.pyx":3135 + * + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L96_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + __pyx_t_1 = __pyx_t_3; + __pyx_L96_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_1 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3136 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('f') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3137 + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3138 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3139 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) + * free(fval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3140 + * 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":3135 + * + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('f') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L85; + } + + /* "PyCafe.pyx":3142 + * 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_12 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L100_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + __pyx_t_3 = __pyx_t_1; + __pyx_L100_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_1 = (__pyx_t_3 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3143 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray=(ctypes.c_float*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=fval[ij] + */ + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_c_float); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_PyInt_From_unsigned_int(__pyx_v_nelemToRetrieveFromCache); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_6 = PyNumber_Multiply(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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); + } + } + if (__pyx_t_13) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + } else { + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3143; __pyx_clineno = __LINE__; goto __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":3144 + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3145 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3146 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3147 + * 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":3142 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_float*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L85; + } + + /* "PyCafe.pyx":3150 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __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); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __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":3151 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3152 + * 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): + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3153 + * 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] + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_t_9); + if (unlikely(!__pyx_t_21.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __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":3154 + * print("Returning memoryview") + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3155 + * mvFloat = np.empty(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_16 = -1; + if (unlikely(__pyx_t_23 >= (size_t)__pyx_v_mvFloat.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_mvFloat.data) + __pyx_t_23)) )) = ((float)(__pyx_v_fval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3156 + * for ij in range(0, nelemToRetrieveFromCache): + * mvFloat[ij]=fval[ij] + * free(fval) # <<<<<<<<<<<<<< + * return mvFloat + * + */ + free(__pyx_v_fval); + + /* "PyCafe.pyx":3157 + * mvFloat[ij]=fval[ij] + * free(fval) + * return mvFloat # <<<<<<<<<<<<<< + * + * + */ + __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_filename = __pyx_f[1]; __pyx_lineno = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + } + __pyx_L85:; + + /* "PyCafe.pyx":3098 + * status=self._c_cafe.getCacheFloatArray(handle, fval) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + } + + /* "PyCafe.pyx":3092 + * + * + * elif dtcheck in [CAFE_FLOAT]: # <<<<<<<<<<<<<< + * + * fval = malloc( nelemToRetrieveFromCache * sizeof(float)) + */ + break; + + /* "PyCafe.pyx":3161 + * + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * dval = malloc( nelemToRetrieveFromCache * sizeof(double)) + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3163 + * 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":3165 + * 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":3167 + * status=self._c_cafe.getDoubleArray(handle, dval) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3169 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_numpy, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L108_bool_binop_done; + } + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ndarray, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L108_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_numpy_ndarray, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L108_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3172 + * + * + * mvDoubleNP = np.empty(nelemToRetrieveFromCache, dtype=np.float64) # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * mvDoubleNP[ij]=dval[ij] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __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_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, __pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_mvDoubleNP = __pyx_t_7; + __pyx_t_7 = 0; + + /* "PyCafe.pyx":3173 + * + * mvDoubleNP = np.empty(nelemToRetrieveFromCache, dtype=np.float64) + * for ij in range(0, nelemToRetrieveFromCache): # <<<<<<<<<<<<<< + * mvDoubleNP[ij]=dval[ij] + * + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3174 + * mvDoubleNP = np.empty(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_filename = __pyx_f[1]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":3176 + * mvDoubleNP[ij]=dval[ij] + * + * free(dval) # <<<<<<<<<<<<<< + * return mvDoubleNP #arr + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3177 + * + * 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":3169 + * if status==ICAFE_NORMAL: + * + * if art in ['numpy','ndarray','numpy.ndarray']: # <<<<<<<<<<<<<< + * + * + */ + goto __pyx_L107; + } + + /* "PyCafe.pyx":3179 + * return mvDoubleNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * #Method A to return memory view + */ + __Pyx_INCREF(__pyx_v_art); + __pyx_t_12 = __pyx_v_art; + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryview, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L113_bool_binop_done; + } + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_mv, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L113_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_memoryviewslice, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L113_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3182 + * + * #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_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_5); + if (unlikely(!__pyx_t_24.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3182; __pyx_clineno = __LINE__; goto __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":3183 + * #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) + */ + __pyx_t_4 = __pyx_v_nelemToRetrieveFromCache; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3184 + * mvDouble = np.empty(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_16 = -1; + if (unlikely(__pyx_t_25 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_25)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3185 + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij]=dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3186 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3179 + * return mvDoubleNP #arr + * + * elif art in ['memoryview','mv','memoryviewslice']: # <<<<<<<<<<<<<< + * + * #Method A to return memory view + */ + goto __pyx_L107; + } + + /* "PyCafe.pyx":3188 + * 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_12 = __pyx_v_art; + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_array, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_3 = __pyx_t_1; + goto __pyx_L118_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_kp_u_array_array, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L118_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3189 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_arrayArray = __pyx_t_5; + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3190 + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3191 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_arrayArray, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3192 + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) + * free(dval) # <<<<<<<<<<<<<< + * return arrayArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3193 + * 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":3188 + * return mvDouble + * + * elif art in ['array','array.array']: # <<<<<<<<<<<<<< + * arrayArray=array.array('d') + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L107; + } + + /* "PyCafe.pyx":3195 + * 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_12 = __pyx_v_art; + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L122_bool_binop_done; + } + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_12, __pyx_n_u_ctype, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__pyx_t_1 != 0); + __pyx_t_2 = __pyx_t_3; + __pyx_L122_bool_binop_done:; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3196 + * + * elif art in ['ctypes', "ctype"]: + * ctypesArray=(ctypes.c_double*nelemToRetrieveFromCache)() # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=dval[ij] + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_c_double); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __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_filename = __pyx_f[1]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyNumber_Multiply(__pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (__pyx_t_7) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __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":3197 + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3198 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":3199 + * for ij in range(0, nelemToRetrieveFromCache): + * ctypesArray[ij]=dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return ctypesArray + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3200 + * 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":3195 + * return arrayArray + * + * elif art in ['ctypes', "ctype"]: # <<<<<<<<<<<<<< + * ctypesArray=(ctypes.c_double*nelemToRetrieveFromCache)() + * for ij in range(0, nelemToRetrieveFromCache): + */ + goto __pyx_L107; + } + + /* "PyCafe.pyx":3203 + * + * else: + * print("Unknow array type in user request for art='",art,"'. Possible types are:") # <<<<<<<<<<<<<< + * print("memoryview, numpy, array, ctypes") + * print("Returning memoryview") + */ + /*else*/ { + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __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); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __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":3204 + * 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) + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3205 + * 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): + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3206 + * 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] + */ + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __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; + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __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); + if (unlikely(!__pyx_t_24.memview)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __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":3207 + * print("Returning memoryview") + * 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; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_4; __pyx_t_10+=1) { + __pyx_v_ij = __pyx_t_10; + + /* "PyCafe.pyx":3208 + * mvDouble = np.empty(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_16 = -1; + if (unlikely(__pyx_t_26 >= (size_t)__pyx_v_mvDouble.shape[0])) __pyx_t_16 = 0; + if (unlikely(__pyx_t_16 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_16); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_mvDouble.data) + __pyx_t_26)) )) = ((double)(__pyx_v_dval[__pyx_v_ij])); + } + + /* "PyCafe.pyx":3209 + * for ij in range(0, nelemToRetrieveFromCache): + * mvDouble[ij]=dval[ij] + * free(dval) # <<<<<<<<<<<<<< + * return mvDouble + * + */ + free(__pyx_v_dval); + + /* "PyCafe.pyx":3210 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + } + __pyx_L107:; + + /* "PyCafe.pyx":3167 + * status=self._c_cafe.getDoubleArray(handle, dval) + * + * if status==ICAFE_NORMAL: # <<<<<<<<<<<<<< + * + * if art in ['numpy','ndarray','numpy.ndarray']: + */ + } + + /* "PyCafe.pyx":3161 + * + * + * elif dtcheck in [CAFE_DOUBLE]: # <<<<<<<<<<<<<< + * + * dval = malloc( nelemToRetrieveFromCache * sizeof(double)) + */ + break; + default: break; + } + + /* "PyCafe.pyx":3212 + * 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":3213 + * + * 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":3214 + * 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":3215 + * 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":3214 + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L130; + } + + /* "PyCafe.pyx":3217 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L130:; + + /* "PyCafe.pyx":3213 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3218 + * 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)) + */ + __pyx_t_3 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":3219 + * 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) + */ + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_handle, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_pv, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3220 + * 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] + */ + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ec, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __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_filename = __pyx_f[1]; __pyx_lineno = 3220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_et, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __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_filename = __pyx_f[1]; __pyx_lineno = 3220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ei, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":3219 + * 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) + */ + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_9); + __pyx_t_9 = 0; + + /* "PyCafe.pyx":3221 + * _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] + * + */ + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3218 + * 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)) + */ + } + + /* "PyCafe.pyx":3222 + * _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) + * raise Exception(_cyCafeException) + * return [None] # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __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":3212 + * return mvDouble + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":2837 + * + * ################################################################################## + * def getArrayCache(self, handlePV, str dt='native', str art='memoryview'): # <<<<<<<<<<<<<< + * ################################################################################## + * #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_12); + __Pyx_XDECREF(__pyx_t_13); + __PYX_XDEC_MEMVIEW(&__pyx_t_14, 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__cyCafeException); + __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":3231 + * + * ################################################################################## + * def getPVStrCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV,'str') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_229getPVStrCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_229getPVStrCache(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_228getPVStrCache(((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_228getPVStrCache(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVStrCache", 0); + + /* "PyCafe.pyx":3232 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __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":3231 + * + * ################################################################################## + * 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":3236 + * + * ################################################################################## + * def getPVIntCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV,'int') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_231getPVIntCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_231getPVIntCache(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_230getPVIntCache(((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_230getPVIntCache(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVIntCache", 0); + + /* "PyCafe.pyx":3237 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __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":3236 + * + * ################################################################################## + * 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":3241 + * + * ################################################################################## + * def getPVFloatCache(self, handlePV): # <<<<<<<<<<<<<< + * return self.getPVCache(handlePV,'float') + * ################################################################################## + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_233getPVFloatCache(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_233getPVFloatCache(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_232getPVFloatCache(((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_232getPVFloatCache(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVFloatCache", 0); + + /* "PyCafe.pyx":3242 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3242; __pyx_clineno = __LINE__; goto __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":3241 + * + * ################################################################################## + * 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":3246 + * + * ################################################################################## + * def getPVCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_235getPVCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_235getPVCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_234getPVCache(((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_234getPVCache(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_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVCache", 0); + + /* "PyCafe.pyx":3249 + * ################################################################################## + * + * 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":3251 + * cdef str _METHOD_="getPVCache(handlePV, str dt='native'" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":3253 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3254 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3253 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3255 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3256 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3255 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3258 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3258; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3263 + * cdef PVDataHolder pvd + * + * pvd.setNelem(self.hh.getNelemToRetrieveFromCache(handle)) # <<<<<<<<<<<<<< + * + * status=self._c_cafe.getCache(handle, pvd) + */ + __pyx_v_pvd.setNelem(__pyx_v_self->hh.getNelemToRetrieveFromCache(__pyx_v_handle)); + + /* "PyCafe.pyx":3265 + * 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":3267 + * 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":3268 + * + * 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":3269 + * 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":3270 + * 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":3269 + * 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":3272 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":3268 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3273 + * 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)) + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3274 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3275 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3274 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3276 + * _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) + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3273 + * 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)) + */ + } + + /* "PyCafe.pyx":3278 + * raise Exception(_cyCafeException) + * + * 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_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3278; __pyx_clineno = __LINE__; goto __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":3279 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3279; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3280 + * 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":3267 + * status=self._c_cafe.getCache(handle, pvd) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":3282 + * 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_5 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct(__pyx_v_pvd, &__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3246 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvd_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3291 + * + * ################################################################################## + * def getCtrl(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_237getCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_237getCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 3291; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3291; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_236getCtrl(((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_236getCtrl(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_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getCtrl", 0); + + /* "PyCafe.pyx":3294 + * ################################################################################## + * + * 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":3296 + * cdef str _METHOD_="getCtrl(handlePV, str dt='native')" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":3298 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3299 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3298 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3300 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3301 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3300 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3303 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__186, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3309 + * cdef PVCtrlHolder pvc + * + * pvc.setNelem(self.hh.getNelemClientCtrl(handle)) #do this dynamically # <<<<<<<<<<<<<< + * + * cdef int status + */ + __pyx_v_pvc.setNelem(__pyx_v_self->hh.getNelemClientCtrl(__pyx_v_handle)); + + /* "PyCafe.pyx":3312 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCtrl(handle, pvc) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3313 + * 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":3312 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.getCtrl(handle, pvc) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3315 + * 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":3316 + * + * 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":3317 + * 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":3318 + * 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":3317 + * 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":3320 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L11:; + + /* "PyCafe.pyx":3316 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3321 + * 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)) + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3322 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3323 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3322 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3324 + * _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) + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3321 + * 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)) + */ + } + + /* "PyCafe.pyx":3326 + * raise Exception(_cyCafeException) + * + * 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_5 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pvc_valnone = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3327 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3328 + * 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":3315 + * status=self._c_cafe.getCtrl(handle, pvc) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":3329 + * 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_5 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3291 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvc_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3338 + * + * ################################################################################## + * def getCtrlCache(self, handlePV, str dt='native'): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="getCtrlCache(handlePV, str dt='native')" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_239getCtrlCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_239getCtrlCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3338; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_238getCtrlCache(((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_238getCtrlCache(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_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getCtrlCache", 0); + + /* "PyCafe.pyx":3340 + * 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":3341 + * ################################################################################## + * cdef str _METHOD_="getCtrlCache(handlePV, str dt='native')" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)) == 1: + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":3343 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3344 + * + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3343 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3345 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3346 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3346; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3346; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3345 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3348 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__187, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3353 + * cdef PVCtrlHolder pvc + * + * pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) # <<<<<<<<<<<<<< + * + * status=self._c_cafe.getCtrlCache(handle, pvc) + */ + __pyx_v_pvc.setNelem(__pyx_v_self->hh.getNelemToRetrieveFromCtrlCache(__pyx_v_handle)); + + /* "PyCafe.pyx":3355 + * pvc.setNelem(self.hh.getNelemToRetrieveFromCtrlCache(handle)) + * + * 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":3357 + * 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":3358 + * + * 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":3359 + * 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":3360 + * 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":3359 + * 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":3362 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L8:; + + /* "PyCafe.pyx":3358 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3363 + * 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)) + */ + __pyx_t_1 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3364 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3365 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3364 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3366 + * _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) + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3363 + * 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)) + */ + } + + /* "PyCafe.pyx":3368 + * raise Exception(_cyCafeException) + * + * 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_5 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_pvc_valnone = ((struct __pyx_obj_6PyCafe_pvctrl *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3369 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3370 + * 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":3357 + * status=self._c_cafe.getCtrlCache(handle, pvc) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":3372 + * 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_5 = ((PyObject *)__pyx_f_6PyCafe_PVCtrlHolderToStruct(__pyx_v_pvc, &__pyx_t_7)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3338 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XDECREF((PyObject *)__pyx_v_pvc_valnone); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3381 + * + * ################################################################################## + * def groupMonitorStop(self, ghandleName): # <<<<<<<<<<<<<< + * ################################################################################## + * cdef str _METHOD_="groupMonitorStop(ghandleName)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_241groupMonitorStop(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_241groupMonitorStop(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_240groupMonitorStop(((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_240groupMonitorStop(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_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("groupMonitorStop", 0); + + /* "PyCafe.pyx":3383 + * 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":3385 + * cdef str _METHOD_="groupMonitorStop(ghandleName)" + * + * cdef unsigned int ghandle=0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":3386 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3387 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3387; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3386 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3388 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3389 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * ghandle=self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 3389; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3389; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3388 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3391 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3393 + * _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 + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3393; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3397 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3398 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef vector[int] vStatus + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3397 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3401 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":3403 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3404 + * + * 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":3403 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupMonitorStop(ghandle, vStatus) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":3406 + * 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":3407 + * + * 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":3408 + * 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":3407 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":3406 + * 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":3410 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3381 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3417 + * ################################################################################## + * + * def getMonitorPolicyVector(self, handlePV, _monid): # <<<<<<<<<<<<<< + * + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_243getMonitorPolicyVector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_243getMonitorPolicyVector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v__monid = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_monid_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("getMonitorPolicyVector", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3417; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getMonitorPolicyVector") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3417; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3417; __pyx_clineno = __LINE__; goto __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_242getMonitorPolicyVector(((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_242getMonitorPolicyVector(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; + size_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getMonitorPolicyVector", 0); + + /* "PyCafe.pyx":3420 + * + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)): + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":3421 + * + * 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":3422 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3421 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3423 + * 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":3424 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":3423 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV, force=True) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3426 + * 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") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3426; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3432 + * cdef vector[MonitorPolicy] mpV + * + * self.hh.getMonitorPolicyVector(handle, mpV) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_self->hh.getMonitorPolicyVector(__pyx_v_handle, __pyx_v_mpV); + + /* "PyCafe.pyx":3437 + * cdef monitorpolicy mp + * + * mp = monitorpolicy() # <<<<<<<<<<<<<< + * + * cdef unsigned int i + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_monitorpolicy), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3437; __pyx_clineno = __LINE__; goto __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":3443 + * + * + * for i in range (0, mpV.size()): # <<<<<<<<<<<<<< + * + * if mpV[i].getMonitorID()== _monid: + */ + __pyx_t_7 = __pyx_v_mpV.size(); + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_7; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":3445 + * for i in range (0, mpV.size()): + * + * if mpV[i].getMonitorID()== _monid: # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int((__pyx_v_mpV[__pyx_v_i]).getMonitorID()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_v__monid, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":3448 + * + * + * mp.monid=mpV[i].getMonitorID() # <<<<<<<<<<<<<< + * + * mp.nelem=mpV[i].getNelem() + */ + __pyx_v_mp->monid = (__pyx_v_mpV[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":3450 + * 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":3452 + * 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":3453 + * + * 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":3454 + * 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":3455 + * 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":3456 + * 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":3457 + * 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":3458 + * 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":3459 + * 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":3460 + * 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":3461 + * mp.maskHasDBE_LOG=mpV[i].maskHasDBE_LOG() + * mp.maskHasDBE_ALARM=mpV[i].maskHasDBE_ALARM() + * break # <<<<<<<<<<<<<< + * + * return mp + */ + goto __pyx_L7_break; + + /* "PyCafe.pyx":3445 + * for i in range (0, mpV.size()): + * + * if mpV[i].getMonitorID()== _monid: # <<<<<<<<<<<<<< + * + * + */ + } + } + __pyx_L7_break:; + + /* "PyCafe.pyx":3463 + * break + * + * return mp # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_mp)); + __pyx_r = ((PyObject *)__pyx_v_mp); + goto __pyx_L0; + + /* "PyCafe.pyx":3417 + * ################################################################################## + * + * def getMonitorPolicyVector(self, handlePV, _monid): # <<<<<<<<<<<<<< + * + * + */ + + /* 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_8); + __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":3467 + * + * ################################################################################## + * 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)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_245groupMonitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_245groupMonitorStart(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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,0}; + PyObject* values[4] = {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 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitorStart") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3467; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3467; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_dbr = __pyx_k__189; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3467; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_mask = __pyx_k__190; + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitorStart", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3467; __pyx_clineno = __LINE__; goto __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_244groupMonitorStart(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_244groupMonitorStart(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) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v__cyCafeException = NULL; + std::vector __pyx_v_mpV; + unsigned int __pyx_v_mpid; + PVGroup __pyx_v_pvg; + MonitorPolicy *__pyx_v_mp; + long __pyx_v_i; + PyObject *__pyx_v_a = 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; + long __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("groupMonitorStart", 0); + + /* "PyCafe.pyx":3469 + * 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 + */ + __Pyx_INCREF(__pyx_kp_u_groupMonitorStart_ghandleName_ob); + __pyx_v__METHOD_ = __pyx_kp_u_groupMonitorStart_ghandleName_ob; + + /* "PyCafe.pyx":3471 + * 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 + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":3472 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3473 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3472 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3474 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3475 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * ghandle=self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 3475; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3475; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3474 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3477 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3479 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if group handle, else if group name") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3479; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3484 + * 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) + */ + if (__pyx_v_dbr) { + + /* "PyCafe.pyx":3485 + * + * 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") + */ + 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":3486 + * 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") + */ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Warning_from_groupMonitorStart); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_groupMonitorStart); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Warning_from_groupMonitorStart); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ghandleName); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3486; __pyx_clineno = __LINE__; goto __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":3487 + * 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 + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__191, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3488 + * 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 + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__192, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3489 + * 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 + */ + __pyx_v_dbr = DBR_TIME; + + /* "PyCafe.pyx":3485 + * + * 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") + */ + } + + /* "PyCafe.pyx":3484 + * 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) + */ + } + + /* "PyCafe.pyx":3498 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3499 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef MonitorPolicy * mp + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3498 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L10; + } + __pyx_L10:; + } + } + + /* "PyCafe.pyx":3502 + * + * cdef MonitorPolicy * mp + * mp=self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_v_mp = __pyx_v_self->_c_cafe->createMonitorPolicyArray(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":3504 + * mp=self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * + * mp[i].setMask(mask) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":3506 + * for i in range(0, pvg.getNPV()): + * + * mp[i].setMask(mask) # <<<<<<<<<<<<<< + * mp[i].setCafeDbrType(dbr) + * + */ + (__pyx_v_mp[__pyx_v_i]).setMask(__pyx_v_mask); + + /* "PyCafe.pyx":3507 + * + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * + * mpid=mp[i].getMonitorID() + */ + (__pyx_v_mp[__pyx_v_i]).setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":3509 + * mp[i].setCafeDbrType(dbr) + * + * mpid=mp[i].getMonitorID() # <<<<<<<<<<<<<< + * + * if cb: + */ + __pyx_v_mpid = (__pyx_v_mp[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":3511 + * mpid=mp[i].getMonitorID() + * + * if cb: # <<<<<<<<<<<<<< + * a=inspect.getargspec(cb) + * monDictGlobal[mpid]=cb + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cb); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "PyCafe.pyx":3512 + * + * if cb: + * a=inspect.getargspec(cb) # <<<<<<<<<<<<<< + * monDictGlobal[mpid]=cb + * + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getargspec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + if (!__pyx_t_5) { + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_cb); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + } else { + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_cb); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3513 + * if cb: + * a=inspect.getargspec(cb) + * monDictGlobal[mpid]=cb # <<<<<<<<<<<<<< + * + * if (len(a[0])==1): + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_6, __pyx_v_cb) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3515 + * monDictGlobal[mpid]=cb + * + * if (len(a[0])==1): # <<<<<<<<<<<<<< + * mp[i].setUserArgs( mpid) + * mp[i].setPyHandler() + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = ((__pyx_t_10 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3516 + * + * if (len(a[0])==1): + * mp[i].setUserArgs( mpid) # <<<<<<<<<<<<<< + * mp[i].setPyHandler() + * else: + */ + (__pyx_v_mp[__pyx_v_i]).setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":3517 + * if (len(a[0])==1): + * mp[i].setUserArgs( mpid) + * mp[i].setPyHandler() # <<<<<<<<<<<<<< + * else: + * mp[i].setPyHandlerData() + */ + (__pyx_v_mp[__pyx_v_i]).setPyHandler(); + + /* "PyCafe.pyx":3515 + * monDictGlobal[mpid]=cb + * + * if (len(a[0])==1): # <<<<<<<<<<<<<< + * mp[i].setUserArgs( mpid) + * mp[i].setPyHandler() + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":3519 + * mp[i].setPyHandler() + * else: + * mp[i].setPyHandlerData() # <<<<<<<<<<<<<< + * + * mpV.push_back(mp[i]) + */ + /*else*/ { + (__pyx_v_mp[__pyx_v_i]).setPyHandlerData(); + } + __pyx_L14:; + + /* "PyCafe.pyx":3511 + * mpid=mp[i].getMonitorID() + * + * if cb: # <<<<<<<<<<<<<< + * a=inspect.getargspec(cb) + * monDictGlobal[mpid]=cb + */ + } + + /* "PyCafe.pyx":3521 + * mp[i].setPyHandlerData() + * + * mpV.push_back(mp[i]) # <<<<<<<<<<<<<< + * + * + */ + try { + __pyx_v_mpV.push_back((__pyx_v_mp[__pyx_v_i])); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":3525 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":3527 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3528 + * + * 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":3527 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":3530 + * 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":3531 + * + * 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":3532 + * 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":3531 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":3530 + * 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":3534 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3534; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3534; __pyx_clineno = __LINE__; goto __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_8); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8); + __pyx_t_6 = 0; + __pyx_t_8 = 0; + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3467 + * + * ################################################################################## + * 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)" + */ + + /* 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_9); + __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__cyCafeException); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3540 + * + * ################################################################################## + * 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)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_247groupMonitorStartWithCBList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_247groupMonitorStartWithCBList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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,0}; + PyObject* values[4] = {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 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupMonitorStartWithCBList") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_dbr = __pyx_k__193; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_mask = __pyx_k__194; + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("groupMonitorStartWithCBList", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_246groupMonitorStartWithCBList(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_ghandleName, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask); + + /* 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_246groupMonitorStartWithCBList(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) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_ghandle; + struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v__cyCafeException = NULL; + std::vector __pyx_v_mpV; + unsigned int __pyx_v_mpid; + PVGroup __pyx_v_pvg; + MonitorPolicy *__pyx_v_mp; + long __pyx_v_i; + PyObject *__pyx_v_a = 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; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + long __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("groupMonitorStartWithCBList", 0); + + /* "PyCafe.pyx":3542 + * 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 + */ + __Pyx_INCREF(__pyx_kp_u_groupMonitorStartWithCBList_ghan); + __pyx_v__METHOD_ = __pyx_kp_u_groupMonitorStartWithCBList_ghan; + + /* "PyCafe.pyx":3544 + * 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 + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":3545 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3546 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3545 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3547 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3548 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * ghandle=self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3547 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3550 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3552 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if group handle, else if group name") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3552; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3552; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3557 + * 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) + */ + if (__pyx_v_dbr) { + + /* "PyCafe.pyx":3558 + * + * 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") + */ + 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":3559 + * 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") + */ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_kp_u_Warning_from_groupMonitorStartW); + __Pyx_GIVEREF(__pyx_kp_u_Warning_from_groupMonitorStartW); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Warning_from_groupMonitorStartW); + __Pyx_INCREF(__pyx_v_ghandleName); + __Pyx_GIVEREF(__pyx_v_ghandleName); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ghandleName); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3559; __pyx_clineno = __LINE__; goto __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":3560 + * 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 + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3561 + * 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 + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__196, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3562 + * 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)): + */ + __pyx_v_dbr = DBR_TIME; + + /* "PyCafe.pyx":3558 + * + * 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") + */ + } + + /* "PyCafe.pyx":3557 + * 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) + */ + } + + /* "PyCafe.pyx":3564 + * 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_2 = PyList_Check(__pyx_v_cb); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3565 + * + * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__197, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3565; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3564 + * 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":3575 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3576 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * if (len(cb) != pvg.getNPV() ): + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3575 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":3578 + * 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\ + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_cb); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3578; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((__pyx_t_7 != __pyx_v_pvg.getNPV()) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3579 + * + * 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") + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_pvg.getNPV()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_cb); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3579; __pyx_clineno = __LINE__; goto __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_6); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6); + __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_5); + PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3579; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3580 + * 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") + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__198, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3580; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":3578 + * 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\ + */ + } + + /* "PyCafe.pyx":3584 + * + * cdef MonitorPolicy * mp + * mp=self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_v_mp = __pyx_v_self->_c_cafe->createMonitorPolicyArray(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":3586 + * mp=self._c_cafe.createMonitorPolicyArray(pvg.getNPV()) + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * + * mp[i].setMask(mask) + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_4; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; + + /* "PyCafe.pyx":3588 + * for i in range(0, pvg.getNPV()): + * + * mp[i].setMask(mask) # <<<<<<<<<<<<<< + * mp[i].setCafeDbrType(dbr) + * + */ + (__pyx_v_mp[__pyx_v_i]).setMask(__pyx_v_mask); + + /* "PyCafe.pyx":3589 + * + * mp[i].setMask(mask) + * mp[i].setCafeDbrType(dbr) # <<<<<<<<<<<<<< + * + * mpid=mp[i].getMonitorID() + */ + (__pyx_v_mp[__pyx_v_i]).setCafeDbrType(__pyx_v_dbr); + + /* "PyCafe.pyx":3591 + * mp[i].setCafeDbrType(dbr) + * + * mpid=mp[i].getMonitorID() # <<<<<<<<<<<<<< + * + * if cb[i]: + */ + __pyx_v_mpid = (__pyx_v_mp[__pyx_v_i]).getMonitorID(); + + /* "PyCafe.pyx":3593 + * mpid=mp[i].getMonitorID() + * + * if cb[i]: # <<<<<<<<<<<<<< + * a=inspect.getargspec(cb[i]) + * monDictGlobal[mpid]=cb[i] + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":3594 + * + * if cb[i]: + * a=inspect.getargspec(cb[i]) # <<<<<<<<<<<<<< + * monDictGlobal[mpid]=cb[i] + * + */ + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_inspect); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getargspec); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __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_filename = __pyx_f[1]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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); + } + } + if (!__pyx_t_10) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_5); + } else { + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3595 + * if cb[i]: + * a=inspect.getargspec(cb[i]) + * monDictGlobal[mpid]=cb[i] # <<<<<<<<<<<<<< + * + * if (len(a[0])==1): + */ + if (unlikely(__pyx_v_cb == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_cb, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_6, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3597 + * monDictGlobal[mpid]=cb[i] + * + * if (len(a[0])==1): # <<<<<<<<<<<<<< + * mp[i].setUserArgs( mpid) + * mp[i].setPyHandler() + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3597; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = ((__pyx_t_7 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3598 + * + * if (len(a[0])==1): + * mp[i].setUserArgs( mpid) # <<<<<<<<<<<<<< + * mp[i].setPyHandler() + * else: + */ + (__pyx_v_mp[__pyx_v_i]).setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":3599 + * if (len(a[0])==1): + * mp[i].setUserArgs( mpid) + * mp[i].setPyHandler() # <<<<<<<<<<<<<< + * else: + * mp[i].setPyHandlerData() + */ + (__pyx_v_mp[__pyx_v_i]).setPyHandler(); + + /* "PyCafe.pyx":3597 + * monDictGlobal[mpid]=cb[i] + * + * if (len(a[0])==1): # <<<<<<<<<<<<<< + * mp[i].setUserArgs( mpid) + * mp[i].setPyHandler() + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":3601 + * mp[i].setPyHandler() + * else: + * mp[i].setPyHandlerData() # <<<<<<<<<<<<<< + * + * mpV.push_back(mp[i]) + */ + /*else*/ { + (__pyx_v_mp[__pyx_v_i]).setPyHandlerData(); + } + __pyx_L16:; + + /* "PyCafe.pyx":3593 + * mpid=mp[i].getMonitorID() + * + * if cb[i]: # <<<<<<<<<<<<<< + * a=inspect.getargspec(cb[i]) + * monDictGlobal[mpid]=cb[i] + */ + } + + /* "PyCafe.pyx":3603 + * mp[i].setPyHandlerData() + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3603; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":3606 + * + * cdef vector[int] vStatus + * vStatus.reserve(pvg.getNPV()) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_v_vStatus.reserve(__pyx_v_pvg.getNPV()); + + /* "PyCafe.pyx":3608 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3609 + * + * 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":3608 + * vStatus.reserve(pvg.getNPV()) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupMonitorStart(ghandle, vStatus, mpV) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L19; + } + __pyx_L19:; + } + } + + /* "PyCafe.pyx":3611 + * 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_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3612 + * + * 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":3613 + * 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":3612 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":3611 + * 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":3615 + * self._c_cafe.printStatusMessage(status) + * + * return status, vStatus # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_convert_vector_to_py_int(__pyx_v_vStatus); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3615; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_r = __pyx_t_11; + __pyx_t_11 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3540 + * + * ################################################################################## + * 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)" + */ + + /* 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_10); + __Pyx_XDECREF(__pyx_t_11); + __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__cyCafeException); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3619 + * ################################################################################## + * + * def getGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_249getGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_249getGroupStr(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_248getGroupStr(((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_248getGroupStr(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getGroupStr", 0); + + /* "PyCafe.pyx":3620 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __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":3619 + * ################################################################################## + * + * 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":3622 + * return self.getGroup(ghandleName, 'str') + * + * def getGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_251getGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_251getGroupInt(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_250getGroupInt(((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_250getGroupInt(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getGroupInt", 0); + + /* "PyCafe.pyx":3623 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3623; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3623; __pyx_clineno = __LINE__; goto __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":3622 + * 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":3625 + * return self.getGroup(ghandleName, 'int') + * + * def getGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getGroup(ghandleName, 'float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_253getGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_253getGroupFloat(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_252getGroupFloat(((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_252getGroupFloat(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; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getGroupFloat", 0); + + /* "PyCafe.pyx":3626 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3626; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3626; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3626; __pyx_clineno = __LINE__; goto __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":3625 + * 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":3629 + * + * ################################################################################## + * 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_255getGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_255getGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 3629; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3629; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_254getGroup(((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_254getGroup(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_CyCafeException *__pyx_v__cyCafeException = 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; + long __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + unsigned int __pyx_t_12; + int __pyx_t_13; + long __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getGroup", 0); + + /* "PyCafe.pyx":3630 + * ################################################################################## + * 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: + */ + __Pyx_INCREF(__pyx_kp_u_getGroup_ghandleName_str_dt_nati); + __pyx_v__METHOD_ = __pyx_kp_u_getGroup_ghandleName_str_dt_nati; + + /* "PyCafe.pyx":3631 + * 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 + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":3632 + * 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: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3633 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3632 + * 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: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3634 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3635 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * ghandle=self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3635; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3634 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3637 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3639 + * _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 + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3639; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3639; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3643 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3644 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3643 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3647 + * + * 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":3648 + * 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(); + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":3649 + * 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":3650 + * 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":3653 + * #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":3660 + * ## + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupGet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3661 + * + * 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":3660 + * ## + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupGet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L13; + } + __pyx_L13:; + } + } + + /* "PyCafe.pyx":3663 + * 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":3664 + * + * if status == ECA_TIMEOUT : + * print ("======================================================") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print ("TIMEOUT in getGroup; swithing to getCompoundList") + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__200, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3665 + * if status == ECA_TIMEOUT : + * print ("======================================================") + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * print ("TIMEOUT in getGroup; swithing to getCompoundList") + * print ("======================================================") + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":3666 + * print ("======================================================") + * self._c_cafe.printStatusMessage(status) + * print ("TIMEOUT in getGroup; swithing to getCompoundList") # <<<<<<<<<<<<<< + * print ("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__201, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3667 + * self._c_cafe.printStatusMessage(status) + * print ("TIMEOUT in getGroup; swithing to getCompoundList") + * print ("======================================================") # <<<<<<<<<<<<<< + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__202, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3668 + * print ("TIMEOUT in getGroup; swithing to getCompoundList") + * print ("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCompoundList); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __pyx_convert_PyStr_string_to_py_std__in_string(__pyx_v_pvg.getNameAsString()); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = NULL; + __pyx_t_10 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3668; __pyx_clineno = __LINE__; goto __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_8); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_8); + __Pyx_INCREF(__pyx_v_dt); + __Pyx_GIVEREF(__pyx_v_dt); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_dt); + __pyx_t_8 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3663 + * status=self._c_cafe.groupGet(ghandle, pvg) + * + * if status == ECA_TIMEOUT : # <<<<<<<<<<<<<< + * print ("======================================================") + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3670 + * 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":3671 + * + * 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":3672 + * 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":3671 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":3670 + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":3678 + * #pvg.showMaxMax(5,10) + * + * pvd=pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList=[] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":3680 + * pvd=pvg.getPVData() + * + * localList=[] # <<<<<<<<<<<<<< + * statusList=[] + * cdef unsigned int dtn, dtcheck + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3681 + * + * localList=[] + * statusList=[] # <<<<<<<<<<<<<< + * cdef unsigned int dtn, dtcheck + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3684 + * cdef unsigned int dtn, dtcheck + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType(); + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":3685 + * + * 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":3687 + * dtn = pvd[i].getDataType(); + * + * dtcheck=getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3687; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_12; + + /* "PyCafe.pyx":3689 + * dtcheck=getMatchedDataType(dt, dtn) + * + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3691 + * 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":3692 + * + * 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":3693 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3693; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3692 + * + * if pvd[i].getNelem() == 1: + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: + */ + break; + + /* "PyCafe.pyx":3694 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":3695 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3695; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3694 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + break; + + /* "PyCafe.pyx":3696 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":3697 + * 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_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3696 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + break; + + /* "PyCafe.pyx":3698 + * elif dtcheck==CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":3701 + * #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: + */ + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3702 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(),ghandle))==1: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3701 + * #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: + */ + goto __pyx_L20; + } + + /* "PyCafe.pyx":3704 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck==CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L20:; + + /* "PyCafe.pyx":3698 + * elif dtcheck==CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * + */ + break; + + /* "PyCafe.pyx":3706 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":3707 + * + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3706 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + break; + + /* "PyCafe.pyx":3708 + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + */ + case CAFE_LONG: + + /* "PyCafe.pyx":3709 + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3708 + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + */ + break; + + /* "PyCafe.pyx":3710 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3711 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) #no data + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3710 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":3713 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) #no data # <<<<<<<<<<<<<< + * else: + * localListInner=[] + */ + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3713; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "PyCafe.pyx":3691 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":3715 + * localList.append(0) #no data + * else: + * localListInner=[] # <<<<<<<<<<<<<< + * if dtcheck==CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3716 + * 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":3717 + * 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_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3718 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3716 + * else: + * localListInner=[] + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + + /* "PyCafe.pyx":3719 + * 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)) + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":3720 + * 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_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3721 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3719 + * 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; + + /* "PyCafe.pyx":3722 + * 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)) + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":3723 + * 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_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3724 + * elif dtcheck==CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_ENUM: + * + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3722 + * 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; + + /* "PyCafe.pyx":3725 + * 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()): + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":3727 + * 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))==1: + */ + __pyx_t_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3729 + * 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: + */ + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3730 + * #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)) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3729 + * 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: + */ + goto __pyx_L29; + } + + /* "PyCafe.pyx":3732 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck==CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L29:; + } + + /* "PyCafe.pyx":3725 + * 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; + + /* "PyCafe.pyx":3734 + * 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)) + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":3735 + * + * 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: + */ + __pyx_t_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3736 + * 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()): + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3734 + * 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)) + */ + break; + + /* "PyCafe.pyx":3737 + * 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)) + */ + case CAFE_LONG: + + /* "PyCafe.pyx":3738 + * 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: + */ + __pyx_t_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3739 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3737 + * 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)) + */ + break; + + /* "PyCafe.pyx":3740 + * 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)) + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3741 + * 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_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3742 + * 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_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3740 + * 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":3744 + * 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_12 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) { + __pyx_v_j = __pyx_t_14; + + /* "PyCafe.pyx":3745 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) #no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_int_0); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + + /* "PyCafe.pyx":3746 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) #no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L19:; + } + + /* "PyCafe.pyx":3749 + * + * + * return localList, status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3749; __pyx_clineno = __LINE__; goto __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_6); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_statusList); + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3629 + * + * ################################################################################## + * 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_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_11); + __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__cyCafeException); + __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":3758 + * + * ################################################################################## + * 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_257getGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_257getGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 3758; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3758; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3758; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_256getGroupCache(((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_256getGroupCache(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_CyCafeException *__pyx_v__cyCafeException = 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; + long __pyx_t_7; + unsigned int __pyx_t_8; + int __pyx_t_9; + long __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getGroupCache", 0); + + /* "PyCafe.pyx":3759 + * ################################################################################## + * 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: + */ + __Pyx_INCREF(__pyx_kp_u_getGroupCache_self_ghandleName_s); + __pyx_v__METHOD_ = __pyx_kp_u_getGroupCache_self_ghandleName_s; + + /* "PyCafe.pyx":3760 + * 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 + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":3761 + * 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: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3762 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3761 + * 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: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3763 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3764 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * ghandle=self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 3764; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3764; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3764; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3763 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3766 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3768 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if group handle, else if group name") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3768; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3773 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3774 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * cdef PVDataHolder * pvd + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3773 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3778 + * cdef PVDataHolder * pvd + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupGetCache(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3779 + * + * 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":3778 + * cdef PVDataHolder * pvd + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupGetCache(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":3781 + * 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":3782 + * + * 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":3783 + * 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":3782 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":3781 + * 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":3788 + * #raise Exception("EXCEPTION RAISED in PyCafe def getGroup. Status = %d" %status) + * + * pvd=pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList=[] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":3790 + * pvd=pvg.getPVData() + * + * localList=[] # <<<<<<<<<<<<<< + * statusList=[] + * cdef unsigned int dtn, dtcheck + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_localList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3791 + * + * localList=[] + * statusList=[] # <<<<<<<<<<<<<< + * cdef unsigned int dtn, dtcheck + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":3794 + * cdef unsigned int dtn, dtcheck + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * dtn = pvd[i].getDataType(); + * + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":3795 + * + * 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":3797 + * dtn = pvd[i].getDataType(); + * + * dtcheck=getMatchedDataType(dt, dtn) # <<<<<<<<<<<<<< + * + * statusList.append(pvd[i].getStatus()) + */ + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_dtn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3797; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3797; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_dtcheck = __pyx_t_8; + + /* "PyCafe.pyx":3799 + * dtcheck=getMatchedDataType(dt, dtn) + * + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * + * if pvd[i].getNelem() == 1: + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3801 + * 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":3802 + * + * 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":3803 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3802 + * + * if pvd[i].getNelem() == 1: + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: + */ + break; + + /* "PyCafe.pyx":3804 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":3805 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3805; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3804 + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + * elif dtcheck==CAFE_SHORT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: + */ + break; + + /* "PyCafe.pyx":3806 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":3807 + * 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_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3806 + * elif dtcheck==CAFE_SHORT: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_FLOAT: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: + */ + break; + + /* "PyCafe.pyx":3808 + * elif dtcheck==CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":3811 + * #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: + */ + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3812 + * + * if self._c_cafe.isEnum(self.hh.getHandleFromPVWithinGroup(pvd[i].getPVName(),ghandle))==1: + * localList.append(pvd[i].getAsString()) # <<<<<<<<<<<<<< + * else: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3812; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3811 + * #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: + */ + goto __pyx_L17; + } + + /* "PyCafe.pyx":3814 + * localList.append(pvd[i].getAsString()) + * else: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * + * elif dtcheck==CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L17:; + + /* "PyCafe.pyx":3808 + * elif dtcheck==CAFE_FLOAT: + * localList.append(pvd[i].getAsDouble()) + * elif dtcheck==CAFE_ENUM: # <<<<<<<<<<<<<< + * #if enum, string taken as native + * + */ + break; + + /* "PyCafe.pyx":3816 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":3817 + * + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + */ + __pyx_t_6 = __Pyx_PyInt_From_unsigned_char(((unsigned char)(__pyx_v_pvd[__pyx_v_i]).getAsChar())); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3816 + * localList.append(pvd[i].getAsLong()) + * + * elif dtcheck==CAFE_CHAR: # <<<<<<<<<<<<<< + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + */ + break; + + /* "PyCafe.pyx":3818 + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + */ + case CAFE_LONG: + + /* "PyCafe.pyx":3819 + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3818 + * elif dtcheck==CAFE_CHAR: + * localList.append( pvd[i].getAsChar()) + * elif dtcheck==CAFE_LONG: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + */ + break; + + /* "PyCafe.pyx":3820 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3821 + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: + * localList.append(pvd[i].getAsDouble()) # <<<<<<<<<<<<<< + * else: + * localList.append(0) #no data + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3820 + * elif dtcheck==CAFE_LONG: + * localList.append(pvd[i].getAsLong()) + * elif dtcheck==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * localList.append(pvd[i].getAsDouble()) + * else: + */ + break; + default: + + /* "PyCafe.pyx":3823 + * localList.append(pvd[i].getAsDouble()) + * else: + * localList.append(0) #no data # <<<<<<<<<<<<<< + * else: + * localListInner=[] + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_int_0); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "PyCafe.pyx":3801 + * statusList.append(pvd[i].getStatus()) + * + * if pvd[i].getNelem() == 1: # <<<<<<<<<<<<<< + * if dtcheck==CAFE_STRING: + * localList.append(pvd[i].getAsString()) + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":3825 + * localList.append(0) #no data + * else: + * localListInner=[] # <<<<<<<<<<<<<< + * if dtcheck==CAFE_STRING: + * for j in range(0, pvd[i].getNelem()): + */ + /*else*/ { + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_localListInner, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3826 + * 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":3827 + * 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_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3828 + * 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_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3826 + * else: + * localListInner=[] + * if dtcheck==CAFE_STRING: # <<<<<<<<<<<<<< + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsString(j)) + */ + break; + + /* "PyCafe.pyx":3829 + * 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)) + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":3830 + * 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_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3831 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3829 + * 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; + + /* "PyCafe.pyx":3832 + * 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)) + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":3833 + * 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_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3834 + * elif dtcheck==CAFE_FLOAT: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(pvd[i].getAsDouble(j)) # <<<<<<<<<<<<<< + * elif dtcheck==CAFE_ENUM: + * + */ + __pyx_t_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3832 + * 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; + + /* "PyCafe.pyx":3835 + * 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()): + */ + case CAFE_ENUM: + + /* "PyCafe.pyx":3837 + * 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))==1: + */ + __pyx_t_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3839 + * 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: + */ + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isEnum(__pyx_v_self->hh.getHandleFromPVWithinGroup((__pyx_v_pvd[__pyx_v_i]).getPVName(), __pyx_v_ghandle)) == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3840 + * #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)) + */ + __pyx_t_6 = __pyx_convert_PyStr_string_to_py_std__in_string((__pyx_v_pvd[__pyx_v_i]).getAsString(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3839 + * 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: + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":3842 + * localListInner.append(pvd[i].getAsString(j)) + * else: + * localListInner.append(pvd[i].getAsLong(j)) # <<<<<<<<<<<<<< + * + * elif dtcheck==CAFE_CHAR: + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __pyx_L26:; + } + + /* "PyCafe.pyx":3835 + * 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; + + /* "PyCafe.pyx":3844 + * 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)) + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":3845 + * + * 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: + */ + __pyx_t_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3846 + * 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()): + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3846; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3844 + * 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)) + */ + break; + + /* "PyCafe.pyx":3847 + * 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)) + */ + case CAFE_LONG: + + /* "PyCafe.pyx":3848 + * 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: + */ + __pyx_t_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3849 + * 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_6 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getAsLong(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3847 + * 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)) + */ + break; + + /* "PyCafe.pyx":3850 + * 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)) + */ + case CAFE_DOUBLE: + + /* "PyCafe.pyx":3851 + * 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_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3852 + * 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_6 = PyFloat_FromDouble((__pyx_v_pvd[__pyx_v_i]).getAsDouble(__pyx_v_j)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3850 + * 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":3854 + * 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_8 = (__pyx_v_pvd[__pyx_v_i]).getNelem(); + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_8; __pyx_t_10+=1) { + __pyx_v_j = __pyx_t_10; + + /* "PyCafe.pyx":3855 + * else: + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) #no data # <<<<<<<<<<<<<< + * localList.append(localListInner) + * + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localListInner, __pyx_int_0); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + + /* "PyCafe.pyx":3856 + * for j in range(0, pvd[i].getNelem()): + * localListInner.append(0) #no data + * localList.append(localListInner) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_v_localListInner); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3856; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L16:; + } + + /* "PyCafe.pyx":3859 + * + * + * return localList, status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3859; __pyx_clineno = __LINE__; goto __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_6); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_statusList); + __pyx_t_6 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":3758 + * + * ################################################################################## + * 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__cyCafeException); + __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":3868 + * ################################################################################## + * + * def getPVGroupStr(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='str') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_259getPVGroupStr(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_259getPVGroupStr(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_258getPVGroupStr(((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_258getPVGroupStr(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVGroupStr", 0); + + /* "PyCafe.pyx":3869 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3869; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_str) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3869; __pyx_clineno = __LINE__; goto __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":3868 + * ################################################################################## + * + * 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":3871 + * return self.getPVGroup(ghandleName, dt='str') + * + * def getPVGroupInt(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='int') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_261getPVGroupInt(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_261getPVGroupInt(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_260getPVGroupInt(((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_260getPVGroupInt(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVGroupInt", 0); + + /* "PyCafe.pyx":3872 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_int) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __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":3871 + * 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":3874 + * return self.getPVGroup(ghandleName, dt='int') + * + * def getPVGroupFloat(self, ghandleName): # <<<<<<<<<<<<<< + * return self.getPVGroup(ghandleName, dt='float') + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_263getPVGroupFloat(PyObject *__pyx_v_self, PyObject *__pyx_v_ghandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_263getPVGroupFloat(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_262getPVGroupFloat(((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_262getPVGroupFloat(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVGroupFloat", 0); + + /* "PyCafe.pyx":3875 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __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 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dt, __pyx_n_u_float) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __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":3874 + * 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":3878 + * + * ################################################################################## + * def getPVGroup(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getPVGroup(ghandleName, str dt='native')" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_265getPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_265getPVGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_264getPVGroup(((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_264getPVGroup(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_CyCafeException *__pyx_v__cyCafeException = 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; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + long __pyx_t_11; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_12; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVGroup", 0); + + /* "PyCafe.pyx":3879 + * ################################################################################## + * 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":3881 + * cdef str _METHOD_="getPVGroup(ghandleName, str dt='native')" + * + * cdef unsigned int ghandle=0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":3882 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3883 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3882 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3884 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * #elif isinstance(ghandleName, (pvgroup)) == 1: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3885 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3885; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3885; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3884 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * #elif isinstance(ghandleName, (pvgroup)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3889 + * # 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3891 + * _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 + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3891; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3897 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3898 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * + * pvd=pvg.getPVData() + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3897 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3900 + * self._c_cafe.groupAttach(ghandle, pvg) + * + * pvd=pvg.getPVData() # <<<<<<<<<<<<<< + * + * ''' + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":3912 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupGet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3913 + * + * with nogil: + * status=self._c_cafe.groupGet(ghandle, pvg) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->groupGet(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3912 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupGet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":3916 + * + * + * 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":3917 + * + * 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":3918 + * 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_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_Error_in_PyCafe_def_getPVGroup_S, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3918; __pyx_clineno = __LINE__; goto __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":3919 + * 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":3917 + * + * 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":3916 + * + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * print("Error in PyCafe def getPVGroup. Status = %d" %status) + */ + } + + /* "PyCafe.pyx":3924 + * + * + * 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":3925 + * + * if status == ECA_TIMEOUT: + * print ("======================================================") # <<<<<<<<<<<<<< + * print ("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print ("======================================================") + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__203, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3926 + * 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__204, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3927 + * 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__205, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3928 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3928; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3928; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3928; __pyx_clineno = __LINE__; goto __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":3924 + * + * + * if status == ECA_TIMEOUT: # <<<<<<<<<<<<<< + * print ("======================================================") + * print ("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + */ + } + + /* "PyCafe.pyx":3930 + * return self.getCompoundPVGroup(ghandle,dt) + * + * pvd=pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList=[] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":3932 + * pvd=pvg.getPVData() + * + * localList=[] # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_localList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3934 + * 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(); + for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_4; __pyx_t_11+=1) { + __pyx_v_i = __pyx_t_11; + + /* "PyCafe.pyx":3937 + * #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_12.__pyx_n = 1; + __pyx_t_12.dt = __pyx_v_dt; + __pyx_t_6 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_12)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + + /* "PyCafe.pyx":3940 + * cpdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata=localList + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_pvgroup), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3940; __pyx_clineno = __LINE__; goto __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":3942 + * 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":3944 + * 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":3945 + * + * 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":3946 + * 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":3947 + * 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":3952 + * + * + * 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":3878 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":3960 + * + * ################################################################################## + * def getPVGroupCache(self, ghandleName, str dt='native'): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getPVGroupCache" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_267getPVGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_267getPVGroupCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_dt = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 3960; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 3960; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_266getPVGroupCache(((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_266getPVGroupCache(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_CyCafeException *__pyx_v__cyCafeException = 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; + long __pyx_t_8; + struct __pyx_opt_args_6PyCafe_PVDataHolderToStruct __pyx_t_9; + int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPVGroupCache", 0); + + /* "PyCafe.pyx":3961 + * ################################################################################## + * 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":3963 + * cdef str _METHOD_="getPVGroupCache" + * + * cdef unsigned int ghandle=0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":3964 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":3965 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3964 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3966 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * #elif isinstance(ghandleName, (pvgroup)) == 1: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":3967 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 3967; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3967; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":3966 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * #elif isinstance(ghandleName, (pvgroup)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":3971 + * # 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":3973 + * _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 + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3973; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":3980 + * + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * print ("==============" ) + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":3981 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * print ("==============" ) + * print (_METHOD_) + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":3980 + * + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * print ("==============" ) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":3982 + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) + * print ("==============" ) # <<<<<<<<<<<<<< + * print (_METHOD_) + * pvg.showMax(1) + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__207, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3983 + * self._c_cafe.groupAttach(ghandle, pvg) + * print ("==============" ) + * print (_METHOD_) # <<<<<<<<<<<<<< + * pvg.showMax(1) + * + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v__METHOD_); + __Pyx_GIVEREF(__pyx_v__METHOD_); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__METHOD_); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3983; __pyx_clineno = __LINE__; goto __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":3984 + * print ("==============" ) + * print (_METHOD_) + * pvg.showMax(1) # <<<<<<<<<<<<<< + * + * pvd=pvg.getPVData() + */ + __pyx_v_pvg.showMax(1); + + /* "PyCafe.pyx":3986 + * pvg.showMax(1) + * + * pvd=pvg.getPVData() # <<<<<<<<<<<<<< + * + * status=self._c_cafe.groupGetCache(ghandle, pvg) + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":3988 + * 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":3989 + * + * status=self._c_cafe.groupGetCache(ghandle, pvg) + * pvg.showMax(1) # <<<<<<<<<<<<<< + * print ("==============" ) + * print(status, pvg.getStatusGroup() ) + */ + __pyx_v_pvg.showMax(1); + + /* "PyCafe.pyx":3990 + * 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__208, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":3991 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3991; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3991; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3991; __pyx_clineno = __LINE__; goto __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":3992 + * 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__209, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":3993 + * 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":3994 + * 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":3995 + * 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_filename = __pyx_f[1]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __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":3996 + * 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":3994 + * 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":3993 + * 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":4001 + * + * + * pvd=pvg.getPVData() # <<<<<<<<<<<<<< + * + * localList=[] + */ + __pyx_v_pvd = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":4003 + * pvd=pvg.getPVData() + * + * localList=[] # <<<<<<<<<<<<<< + * + * for i in range(0, pvg.getNPV()): + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_localList = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4005 + * 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(); + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":4008 + * #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_9.__pyx_n = 1; + __pyx_t_9.dt = __pyx_v_dt; + __pyx_t_7 = ((PyObject *)__pyx_f_6PyCafe_PVDataHolderToStruct((__pyx_v_pvd[__pyx_v_i]), &__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_localList, __pyx_t_7); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":4011 + * cpdef pvgroup pg + * + * pg = pvgroup() # <<<<<<<<<<<<<< + * + * pg.pvdata=localList + */ + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_pvgroup), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_pg = ((struct __pyx_obj_6PyCafe_pvgroup *)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4013 + * 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":4015 + * 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":4016 + * + * 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":4017 + * 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":4018 + * pg.name=pvg.getNameAsString() + * pg.groupStatus= pvg.getStatusGroup() + * pg.groupHandle=pvg.getGroupHandle() # <<<<<<<<<<<<<< + * + * return pg + */ + __pyx_v_pg->groupHandle = __pyx_v_pvg.getGroupHandle(); + + /* "PyCafe.pyx":4020 + * 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":3960 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF((PyObject *)__pyx_v_pg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4035 + * + * ################################################################################## + * def PVGroupValuesToList(self, pvgroup pg): # <<<<<<<<<<<<<< + * glist=[] + * for i in range(0,pg.npv): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_269PVGroupValuesToList(PyObject *__pyx_v_self, PyObject *__pyx_v_pg); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_269PVGroupValuesToList(PyObject *__pyx_v_self, PyObject *__pyx_v_pg) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 4035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_268PVGroupValuesToList(((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_268PVGroupValuesToList(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; + long __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PVGroupValuesToList", 0); + + /* "PyCafe.pyx":4036 + * ################################################################################## + * 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_filename = __pyx_f[1]; __pyx_lineno = 4036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_glist = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "PyCafe.pyx":4037 + * 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; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "PyCafe.pyx":4038 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = ((__pyx_t_5 == 1) != 0); + if (__pyx_t_6) { + + /* "PyCafe.pyx":4039 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_value_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_glist, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4038 + * 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":4041 + * 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_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_iL, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":4042 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_pg->pvdata, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_value_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_5; __pyx_t_8+=1) { + __pyx_v_j = __pyx_t_8; + + /* "PyCafe.pyx":4043 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4043; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_iL, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + + /* "PyCafe.pyx":4044 + * for j in range(0, len(pg.pvdata[i].value)): + * iL.append(pg.pvdata[i].value[j]) + * glist.append(iL) # <<<<<<<<<<<<<< + * return glist + * ################################################################################## + */ + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_glist, __pyx_v_iL); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L5:; + } + + /* "PyCafe.pyx":4045 + * 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":4035 + * + * ################################################################################## + * 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_4); + __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":4050 + * + * ################################################################################## + * def groupMemberList(self, str gname): # <<<<<<<<<<<<<< + * cdef str _METHOD_="groupMemberList(self, str gname)" + * cdef vector[string] pvlist + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_271groupMemberList(PyObject *__pyx_v_self, PyObject *__pyx_v_gname); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_271groupMemberList(PyObject *__pyx_v_self, PyObject *__pyx_v_gname) { + CYTHON_UNUSED int __pyx_lineno = 0; + CYTHON_UNUSED const char *__pyx_filename = NULL; + CYTHON_UNUSED int __pyx_clineno = 0; + 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_filename = __pyx_f[1]; __pyx_lineno = 4050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_270groupMemberList(((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_270groupMemberList(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("groupMemberList", 0); + + /* "PyCafe.pyx":4051 + * ################################################################################## + * 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":4053 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_status = __pyx_v_self->_c_cafe->groupMemberList(__pyx_t_1, __pyx_v_pvlist); + + /* "PyCafe.pyx":4054 + * 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":4055 + * 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":4056 + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) # <<<<<<<<<<<<<< + * + * #for i in range(0, len(pvlist)): + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":4055 + * 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":4054 + * 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":4060 + * #for i in range(0, len(pvlist)): + * # memberList.append(pvlist[i]) + * 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_filename = __pyx_f[1]; __pyx_lineno = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4050 + * + * ################################################################################## + * 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":4065 + * ################################################################################## + * + * def grouping(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * cdef str _METHOD_="grouping(char * gname, list _pvlist)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_273grouping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_273grouping(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("grouping", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "grouping") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __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_AsString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_272grouping(((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_272grouping(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_CyCafeException *__pyx_v__cyCafeException = NULL; + CYTHON_UNUSED PyObject *__pyx_v_localList = 0; + PyObject *__pyx_v_statusList = 0; + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("grouping", 0); + + /* "PyCafe.pyx":4066 + * + * def grouping(self, char * gname, list _pvlist): + * cdef str _METHOD_="grouping(char * gname, list _pvlist)" # <<<<<<<<<<<<<< + * + * cdef int status + */ + __Pyx_INCREF(__pyx_kp_u_grouping_char_gname_list__pvlist); + __pyx_v__METHOD_ = __pyx_kp_u_grouping_char_gname_list__pvlist; + + /* "PyCafe.pyx":4069 + * + * cdef int status + * 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_filename = __pyx_f[1]; __pyx_lineno = 4069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":4070 + * 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) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4071 + * 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_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4072 + * 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":4071 + * 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":4070 + * 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) + */ + } + + /* "PyCafe.pyx":4074 + * self._c_cafe.printStatusMessage(status) + * + * cdef unsigned int ghandle=0 # <<<<<<<<<<<<<< + * cdef char * _gname=gname + * + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":4075 + * + * cdef unsigned int ghandle=0 + * cdef char * _gname=gname # <<<<<<<<<<<<<< + * + * #try: + */ + __pyx_v__gname = __pyx_v_gname; + + /* "PyCafe.pyx":4083 + * + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupOpen(_gname, ghandle) + * except: + */ + { + __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":4084 + * + * try: + * status=self._c_cafe.groupOpen(_gname, ghandle) # <<<<<<<<<<<<<< + * except: + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=ghandle, _pv=_gname, \ + */ + try { + __pyx_t_6 = __pyx_v_self->_c_cafe->groupOpen(__pyx_v__gname, __pyx_v_ghandle); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4084; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + } + __pyx_v_status = __pyx_t_6; + + /* "PyCafe.pyx":4083 + * + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupOpen(_gname, ghandle) + * except: + */ + } + __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_L12_try_end; + __pyx_L5_error:; + + /* "PyCafe.pyx":4085 + * 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)) + */ + /*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_filename = __pyx_f[1]; __pyx_lineno = 4085; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":4086 + * 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) + */ + __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_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_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4087 + * 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) + * + */ + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4087; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_ec, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4087; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_et, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __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.info(ECA_ALLOCMEM)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4087; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_ei, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4086 + * 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) + */ + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":4088 + * _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: + */ + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4088; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4088; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4088; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L6_exception_handled; + } + __pyx_L7_except_error:; + + /* "PyCafe.pyx":4083 + * + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupOpen(_gname, ghandle) + * except: + */ + __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_L12_try_end:; + } + + /* "PyCafe.pyx":4090 + * 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)) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4091 + * + * 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) + */ + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_handle, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pv, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":4092 + * 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) + * + */ + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ec, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_et, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __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.info(__pyx_v_status)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ei, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "PyCafe.pyx":4091 + * + * 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) + */ + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":4093 + * _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 + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4090 + * 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)) + */ + } + + /* "PyCafe.pyx":4103 + * + * + * if self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer()==FLUSH_NOW: # <<<<<<<<<<<<<< + * + * localList,status,statusList= self.getGroup(ghandle) + */ + __pyx_t_2 = ((__pyx_v_self->_c_cafe->channelOpenGroupPolicy.getWhenToFlushSendBuffer() == FLUSH_NOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4105 + * if self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer()==FLUSH_NOW: + * + * localList,status,statusList= self.getGroup(ghandle) # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(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); + } + } + if (!__pyx_t_10) { + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GOTREF(__pyx_t_9); + } else { + __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { + PyObject* sequence = __pyx_t_9; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_8 = PyList_GET_ITEM(sequence, 0); + __pyx_t_11 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext; + index = 0; __pyx_t_8 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_11 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_11)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_11); + index = 2; __pyx_t_7 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L18_unpacking_done; + __pyx_L17_unpacking_failed:; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_12 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_L18_unpacking_done:; + } + if (!(likely(PyList_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_8)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_localList = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_status = __pyx_t_6; + __pyx_v_statusList = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4107 + * 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":4108 + * + * 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":4109 + * 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_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4110 + * 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_9 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __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_7, 0, __pyx_kp_u_Error_in_def_grouping_for_group); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4111 + * 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":4112 + * 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_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__211, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "PyCafe.pyx":4113 + * 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: ") + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_13 = PyList_GET_SIZE(__pyx_v_statusList); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { + __pyx_v_i = __pyx_t_14; + + /* "PyCafe.pyx":4114 + * 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]) + */ + if (unlikely(__pyx_v_statusList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyInt_From_int(ICAFE_NORMAL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PyObject_RichCompare(__pyx_t_9, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_2) { + + /* "PyCafe.pyx":4115 + * 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 ("") + */ + if (unlikely(__pyx_v__pvlist == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v__pvlist, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_n_u_PV_3); + __Pyx_GIVEREF(__pyx_n_u_PV_3); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_u_PV_3); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_11); + __Pyx_INCREF(__pyx_kp_u__212); + __Pyx_GIVEREF(__pyx_kp_u__212); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u__212); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_7); + __Pyx_INCREF(__pyx_kp_u__213); + __Pyx_GIVEREF(__pyx_kp_u__213); + PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_kp_u__213); + __Pyx_INCREF(__pyx_kp_u_has_error); + __Pyx_GIVEREF(__pyx_kp_u_has_error); + PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_kp_u_has_error); + __pyx_t_11 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4116 + * if statusList[i] !=ICAFE_NORMAL: + * 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_filename = __pyx_f[1]; __pyx_lineno = 4116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_statusList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_t_6); + + /* "PyCafe.pyx":4117 + * print ("PV", _pvlist[i], "[",i,"]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + * print ("") # <<<<<<<<<<<<<< + * return ghandle + * + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__214, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4114 + * 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]) + */ + } + } + + /* "PyCafe.pyx":4108 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * print ("") + * print ("Error in def grouping for group named", _gname) + */ + } + + /* "PyCafe.pyx":4107 + * localList,status,statusList= self.getGroup(ghandle) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * print ("") + */ + } + + /* "PyCafe.pyx":4103 + * + * + * if self._c_cafe.channelOpenGroupPolicy.getWhenToFlushSendBuffer()==FLUSH_NOW: # <<<<<<<<<<<<<< + * + * localList,status,statusList= self.getGroup(ghandle) + */ + } + + /* "PyCafe.pyx":4118 + * self._c_cafe.printStatusMessage(statusList[i]) + * print ("") + * return ghandle # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4065 + * ################################################################################## + * + * 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__cyCafeException); + __Pyx_XDECREF(__pyx_v_localList); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4121 + * + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * #cdef vector[const char *] pvlist + * #for i in range(0, len(_pvlist)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_275defineGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_275defineGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_gname; + PyObject *__pyx_v__pvlist = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gname)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pvlist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("defineGroup", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "defineGroup") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4121; __pyx_clineno = __LINE__; goto __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_AsString(values[0]); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_274defineGroup(((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_274defineGroup(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("defineGroup", 0); + + /* "PyCafe.pyx":4125 + * #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: + */ + __pyx_t_1 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v__pvlist); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_status = __pyx_v_self->_c_cafe->groupDefine(__pyx_v_gname, __pyx_t_1); + + /* "PyCafe.pyx":4126 + * # 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) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4127 + * 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":4128 + * 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":4127 + * 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":4126 + * # 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) + */ + } + + /* "PyCafe.pyx":4129 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4121 + * + * ################################################################################## + * def defineGroup(self, char * gname, list _pvlist): # <<<<<<<<<<<<<< + * #cdef vector[const char *] pvlist + * #for i in range(0, len(_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.defineGroup", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4133 + * + * ################################################################################## + * def groupOpen(self, char * gname): # <<<<<<<<<<<<<< + * cdef str _METHOD_="groupOpen(char * gname)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_277groupOpen(PyObject *__pyx_v_self, PyObject *__pyx_arg_gname); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_277groupOpen(PyObject *__pyx_v_self, PyObject *__pyx_arg_gname) { + char *__pyx_v_gname; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupOpen (wrapper)", 0); + assert(__pyx_arg_gname); { + __pyx_v_gname = __Pyx_PyObject_AsString(__pyx_arg_gname); if (unlikely((!__pyx_v_gname) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4133; __pyx_clineno = __LINE__; goto __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_276groupOpen(((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_276groupOpen(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, char *__pyx_v_gname) { + PyObject *__pyx_v__METHOD_ = 0; + struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("groupOpen", 0); + + /* "PyCafe.pyx":4134 + * ################################################################################## + * def groupOpen(self, char * gname): + * cdef str _METHOD_="groupOpen(char * gname)" # <<<<<<<<<<<<<< + * + * if isinstance(gname, (str)) == 0: + */ + __Pyx_INCREF(__pyx_kp_u_groupOpen_char_gname); + __pyx_v__METHOD_ = __pyx_kp_u_groupOpen_char_gname; + + /* "PyCafe.pyx":4136 + * 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") + */ + __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v_gname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4136; __pyx_clineno = __LINE__; goto __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":4137 + * + * if isinstance(gname, (str)) == 0: + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ # <<<<<<<<<<<<<< + * _ei="First input argument should be for group name") + * raise Exception(_cyCafeException) + */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":4139 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument should be for group name") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * cdef unsigned int ghandle=0 + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4136 + * 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") + */ + } + + /* "PyCafe.pyx":4141 + * raise Exception(_cyCafeException) + * + * cdef unsigned int ghandle=0 # <<<<<<<<<<<<<< + * cdef char * _gname=gname + * + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":4142 + * + * cdef unsigned int ghandle=0 + * cdef char * _gname=gname # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_v__gname = __pyx_v_gname; + + /* "PyCafe.pyx":4144 + * cdef char * _gname=gname + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupOpen(_gname, ghandle) + * except: + */ + { + __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":4145 + * + * try: + * status=self._c_cafe.groupOpen(_gname, ghandle) # <<<<<<<<<<<<<< + * except: + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=ghandle, _pv=_gname, \ + */ + try { + __pyx_t_8 = __pyx_v_self->_c_cafe->groupOpen(__pyx_v__gname, __pyx_v_ghandle); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4145; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + } + __pyx_v_status = __pyx_t_8; + + /* "PyCafe.pyx":4144 + * cdef char * _gname=gname + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupOpen(_gname, ghandle) + * except: + */ + } + __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_L11_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":4146 + * 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)) + */ + /*except:*/ { + __Pyx_AddTraceback("PyCafe.CyCafe.groupOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4146; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_t_9); + + /* "PyCafe.pyx":4147 + * 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) + */ + __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_handle, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_pv, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4148 + * 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) + * + */ + __pyx_t_11 = __Pyx_PyInt_From_unsigned_int(ECA_ALLOCMEM); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4148; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_ec, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4148; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_et, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4148; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_ei, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4147 + * 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) + */ + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_11); + __pyx_t_11 = 0; + + /* "PyCafe.pyx":4149 + * _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: + */ + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4149; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4149; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_Raise(__pyx_t_10, 0, 0, 0); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4149; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L5_exception_handled; + } + __pyx_L6_except_error:; + + /* "PyCafe.pyx":4144 + * cdef char * _gname=gname + * + * try: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupOpen(_gname, ghandle) + * except: + */ + __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_L11_try_end:; + } + + /* "PyCafe.pyx":4151 + * 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)) + */ + __pyx_t_3 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_3) { + + /* "PyCafe.pyx":4152 + * + * 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) + */ + __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_handle, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyStr_FromString(__pyx_v__gname); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pv, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4153 + * 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) + * + */ + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ec, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_et, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ei, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4152 + * + * 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) + */ + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "PyCafe.pyx":4154 + * _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 + */ + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4154; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4151 + * 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)) + */ + } + + /* "PyCafe.pyx":4156 + * raise Exception(_cyCafeException) + * + * return ghandle # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_ghandle); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4133 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4161 + * + * ################################################################################## + * def groupClose(self, gHandleName): # <<<<<<<<<<<<<< + * cdef str _METHOD_="groupClose(gHandleName)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_279groupClose(PyObject *__pyx_v_self, PyObject *__pyx_v_gHandleName); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_279groupClose(PyObject *__pyx_v_self, PyObject *__pyx_v_gHandleName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("groupClose (wrapper)", 0); + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_278groupClose(((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_278groupClose(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_gHandleName) { + PyObject *__pyx_v__METHOD_ = 0; + unsigned int __pyx_v_gHandle; + PyObject *__pyx_v__gname = 0; + int __pyx_v_status; + struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("groupClose", 0); + + /* "PyCafe.pyx":4162 + * ################################################################################## + * def groupClose(self, gHandleName): + * 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":4164 + * cdef str _METHOD_="groupClose(gHandleName)" + * + * cdef unsigned int gHandle=0 # <<<<<<<<<<<<<< + * cdef str _gname=None + * status=ICAFE_NORMAL + */ + __pyx_v_gHandle = 0; + + /* "PyCafe.pyx":4165 + * + * cdef unsigned int gHandle=0 + * cdef str _gname=None # <<<<<<<<<<<<<< + * status=ICAFE_NORMAL + * + */ + __Pyx_INCREF(Py_None); + __pyx_v__gname = ((PyObject*)Py_None); + + /* "PyCafe.pyx":4166 + * cdef unsigned int gHandle=0 + * cdef str _gname=None + * status=ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * if isinstance(gHandleName, (int,long)): + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":4168 + * 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":4169 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_gHandle = __pyx_t_4; + + /* "PyCafe.pyx":4168 + * status=ICAFE_NORMAL + * + * if isinstance(gHandleName, (int,long)): # <<<<<<<<<<<<<< + * gHandle=gHandleName + * elif isinstance(gHandleName, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4170 + * 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":4171 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4171; __pyx_clineno = __LINE__; goto __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":4172 + * elif isinstance(gHandleName, (str)): + * _gname=gHandleName + * gHandle=self.checkForGroupHandle(gHandleName) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 4172; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4172; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_gHandle = __pyx_t_4; + + /* "PyCafe.pyx":4170 + * if isinstance(gHandleName, (int,long)): + * gHandle=gHandleName + * elif isinstance(gHandleName, (str)): # <<<<<<<<<<<<<< + * _gname=gHandleName + * gHandle=self.checkForGroupHandle(gHandleName) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4174 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4176 + * _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: + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4176; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":4178 + * raise Exception(_cyCafeException) + * + * if gHandle == 0: # <<<<<<<<<<<<<< + * status=ECAFE_INVALID_GROUP_HANDLE + * + */ + __pyx_t_1 = ((__pyx_v_gHandle == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4179 + * + * if gHandle == 0: + * status=ECAFE_INVALID_GROUP_HANDLE # <<<<<<<<<<<<<< + * + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + */ + __pyx_v_status = ECAFE_INVALID_GROUP_HANDLE; + + /* "PyCafe.pyx":4181 + * 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, \ + */ + __pyx_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4182 + * + * 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)) + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":4181 + * 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, \ + */ + } + + /* "PyCafe.pyx":4183 + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_gHandle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_v__gname) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4184 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4183 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4185 + * _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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4178 + * raise Exception(_cyCafeException) + * + * if gHandle == 0: # <<<<<<<<<<<<<< + * status=ECAFE_INVALID_GROUP_HANDLE + * + */ + } + + /* "PyCafe.pyx":4188 + * + * + * status=self._c_cafe.groupClose(gHandle) # <<<<<<<<<<<<<< + * + * + */ + try { + __pyx_t_7 = __pyx_v_self->_c_cafe->groupClose(__pyx_v_gHandle); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_status = __pyx_t_7; + + /* "PyCafe.pyx":4191 + * + * + * 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)) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4192 + * + * 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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_gHandle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_v__gname) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4193 + * 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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4192 + * + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4194 + * _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 + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4194; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4191 + * + * + * 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)) + */ + } + + /* "PyCafe.pyx":4196 + * raise Exception(_cyCafeException) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4161 + * + * ################################################################################## + * def groupClose(self, gHandleName): # <<<<<<<<<<<<<< + * 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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4199 + * ################################################################################## + * + * def getNoMonitors(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getNoMonitors(handlePV)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_281getNoMonitors(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_281getNoMonitors(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_280getNoMonitors(((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_280getNoMonitors(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_CyCafeException *__pyx_v__cyCafeException = 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getNoMonitors", 0); + + /* "PyCafe.pyx":4200 + * + * 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":4202 + * cdef str _METHOD_="getNoMonitors(handlePV)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4203 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4204 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 4204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4203 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4205 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4206 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 4206; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4206; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4205 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4208 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4210 + * _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) + * ################################################################################## + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":4211 + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) + * return self.hh.getNmonitor(handle) # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->hh.getNmonitor(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4199 + * ################################################################################## + * + * 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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4215 + * + * ################################################################################## + * def getMonitorIDs(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="getMonitorIDs(handlePV)" + * cdef unsigned int handle=0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_283getMonitorIDs(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_283getMonitorIDs(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_282getMonitorIDs(((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_282getMonitorIDs(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_CyCafeException *__pyx_v__cyCafeException = 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getMonitorIDs", 0); + + /* "PyCafe.pyx":4216 + * ################################################################################## + * def getMonitorIDs(self, handlePV): + * cdef str _METHOD_="getMonitorIDs(handlePV)" # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + */ + __Pyx_INCREF(__pyx_kp_u_getMonitorIDs_handlePV); + __pyx_v__METHOD_ = __pyx_kp_u_getMonitorIDs_handlePV; + + /* "PyCafe.pyx":4217 + * def getMonitorIDs(self, handlePV): + * cdef str _METHOD_="getMonitorIDs(handlePV)" + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4218 + * cdef str _METHOD_="getMonitorIDs(handlePV)" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4219 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 4219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4218 + * cdef str _METHOD_="getMonitorIDs(handlePV)" + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4220 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4221 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 4221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4221; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4220 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4223 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4225 + * _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); + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4225; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":4227 + * raise Exception(_cyCafeException) + * + * return self.hh.getMonitorIDs(handle); # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __pyx_convert_vector_to_py_unsigned_int(__pyx_v_self->hh.getMonitorIDs(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4215 + * + * ################################################################################## + * 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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4231 + * + * ########################################################################################## + * 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)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_285monitorStart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_285monitorStart(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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,0}; + PyObject* values[4] = {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 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cb); + if (value) { values[1] = value; kw_args--; } + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dbr); + if (value) { values[2] = value; kw_args--; } + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask_2); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "monitorStart") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4231; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 4231; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_dbr = __pyx_k__215; + } + if (values[3]) { + __pyx_v_mask = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_mask == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4231; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + __pyx_v_mask = __pyx_k__216; + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("monitorStart", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4231; __pyx_clineno = __LINE__; goto __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_284monitorStart(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self), __pyx_v_handlePV, __pyx_v_cb, __pyx_v_dbr, __pyx_v_mask); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_284monitorStart(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) { + PyObject *__pyx_v__METHOD_ = 0; + PyObject *__pyx_v_pv = NULL; + int __pyx_v_status; + unsigned int __pyx_v_handle; + struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v__cyCafeException = NULL; + MonitorPolicy __pyx_v_mp; + unsigned int __pyx_v_mpid; + PyObject *__pyx_v_a = 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; + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("monitorStart", 0); + + /* "PyCafe.pyx":4232 + * ########################################################################################## + * 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 + */ + __Pyx_INCREF(__pyx_kp_u_monitorStart_handlePV_object_cb); + __pyx_v__METHOD_ = __pyx_kp_u_monitorStart_handlePV_object_cb; + + /* "PyCafe.pyx":4234 + * 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 + * + */ + __Pyx_INCREF(Py_None); + __pyx_v_pv = Py_None; + + /* "PyCafe.pyx":4235 + * + * pv=None + * cdef int status=ICAFE_NORMAL # <<<<<<<<<<<<<< + * + * #cdef pCallback my_callback + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":4240 + * #my_callback=callbackHandlerMonitor + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4241 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4242 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * pv=handlePV + */ + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_handlePV); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4241 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4243 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * pv=handlePV + * handle=self.checkForHandle(handlePV) + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4244 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * pv=handlePV # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __Pyx_INCREF(__pyx_v_handlePV); + __Pyx_DECREF_SET(__pyx_v_pv, __pyx_v_handlePV); + + /* "PyCafe.pyx":4245 + * elif isinstance(handlePV, (str)) == 1: + * pv=handlePV + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 4245; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4245; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4243 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * pv=handlePV + * handle=self.checkForHandle(handlePV) + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4247 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4249 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4249; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":4260 + * + * #Does channel Exist? + * if self._c_cafe.isValid(handle) == 0: # <<<<<<<<<<<<<< + * status=ECAFE_INVALID_HANDLE + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=pv, \ + */ + __pyx_t_1 = ((__pyx_v_self->_c_cafe->isValid(__pyx_v_handle) == 0) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4261 + * #Does channel Exist? + * if self._c_cafe.isValid(handle) == 0: + * status=ECAFE_INVALID_HANDLE # <<<<<<<<<<<<<< + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=pv, \ + * _ec=status, _et=self.cs.code(status), _ei=self.cs.info(status)) + */ + __pyx_v_status = ECAFE_INVALID_HANDLE; + + /* "PyCafe.pyx":4262 + * if self._c_cafe.isValid(handle) == 0: + * status=ECAFE_INVALID_HANDLE + * _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) + */ + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_handle, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_pv, __pyx_v_pv) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4263 + * status=ECAFE_INVALID_HANDLE + * _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) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ec, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_et, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4262 + * if self._c_cafe.isValid(handle) == 0: + * status=ECAFE_INVALID_HANDLE + * _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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4264 + * _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) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4264; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4260 + * + * #Does channel Exist? + * if self._c_cafe.isValid(handle) == 0: # <<<<<<<<<<<<<< + * status=ECAFE_INVALID_HANDLE + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_,_handle=handle, _pv=pv, \ + */ + } + + /* "PyCafe.pyx":4268 + * + * cdef MonitorPolicy mp + * cdef unsigned int mpid=mp.getMonitorID() # <<<<<<<<<<<<<< + * + * mp.setMask(mask) + */ + __pyx_v_mpid = __pyx_v_mp.getMonitorID(); + + /* "PyCafe.pyx":4270 + * cdef unsigned int mpid=mp.getMonitorID() + * + * mp.setMask(mask) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_mp.setMask(__pyx_v_mask); + + /* "PyCafe.pyx":4274 + * + * #print ("dbr=", dbr) + * self._c_cafe.getChannelInfo(handle,self.channelInfo) # <<<<<<<<<<<<<< + * #print ("nativeDataType=", self.channelInfo.getDataType()) + * + */ + __pyx_v_self->_c_cafe->getChannelInfo(__pyx_v_handle, __pyx_v_self->channelInfo); + + /* "PyCafe.pyx":4278 + * + * + * 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":4280 + * 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":4281 + * #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":4278 + * + * + * 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":4285 + * #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") + */ + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4285; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4285; __pyx_clineno = __LINE__; goto __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":4286 + * 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()); + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__217, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4287 + * 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) + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__218, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4288 + * 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_v_mp.setDataType(__pyx_v_self->channelInfo.getDataType()); + + /* "PyCafe.pyx":4289 + * print ("Assuming DBR_TIME") + * mp.setDataType(self.channelInfo.getDataType()); + * mp.setCafeDbrType(DBR_TIME) # <<<<<<<<<<<<<< + * + * #if cb: + */ + __pyx_v_mp.setCafeDbrType(DBR_TIME); + break; + } + + /* "PyCafe.pyx":4299 + * #print (monDictGlobal) + * + * if cb: # <<<<<<<<<<<<<< + * a=inspect.getargspec(cb) + * #print (a) + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_cb); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4299; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + + /* "PyCafe.pyx":4300 + * + * if cb: + * a=inspect.getargspec(cb) # <<<<<<<<<<<<<< + * #print (a) + * if(len(a[0])==1): + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_inspect); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getargspec); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_5) { + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_cb); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + } else { + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_cb); + __Pyx_GIVEREF(__pyx_v_cb); + PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_cb); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4300; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_a = __pyx_t_6; + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4302 + * a=inspect.getargspec(cb) + * #print (a) + * if(len(a[0])==1): # <<<<<<<<<<<<<< + * ##py_cb_handle=cb + * #self.monidList.append(mpid) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4302; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = ((__pyx_t_9 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4308 + * ##self.monDict[mpid]=cb + * + * monDictGlobal[mpid]=cb # <<<<<<<<<<<<<< + * #print (monDictGlobal) + * #print self.monidList + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(PyDict_SetItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_6, __pyx_v_cb) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4315 + * # + * #print "mpid = ", mpid + * mp.setUserArgs( mpid) # <<<<<<<<<<<<<< + * mp.setPyHandler() + * #print (mp.getUserArgs()) + */ + __pyx_v_mp.setUserArgs(((void *)__pyx_v_mpid)); + + /* "PyCafe.pyx":4316 + * #print "mpid = ", mpid + * mp.setUserArgs( mpid) + * mp.setPyHandler() # <<<<<<<<<<<<<< + * #print (mp.getUserArgs()) + * else: + */ + __pyx_v_mp.setPyHandler(); + + /* "PyCafe.pyx":4302 + * a=inspect.getargspec(cb) + * #print (a) + * if(len(a[0])==1): # <<<<<<<<<<<<<< + * ##py_cb_handle=cb + * #self.monidList.append(mpid) + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":4319 + * #print (mp.getUserArgs()) + * else: + * py_cb=cb # <<<<<<<<<<<<<< + * mp.setPyHandlerData() + * #else: + */ + /*else*/ { + __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":4320 + * else: + * py_cb=cb + * mp.setPyHandlerData() # <<<<<<<<<<<<<< + * #else: + * # mp.setHandler(callbackHandlerMonitor_wrapper) + */ + __pyx_v_mp.setPyHandlerData(); + } + __pyx_L8:; + + /* "PyCafe.pyx":4299 + * #print (monDictGlobal) + * + * if cb: # <<<<<<<<<<<<<< + * a=inspect.getargspec(cb) + * #print (a) + */ + } + + /* "PyCafe.pyx":4325 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.monitorStart(handle,mp) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4326 + * + * with nogil: + * status=self._c_cafe.monitorStart(handle,mp) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_status = __pyx_v_self->_c_cafe->monitorStart(__pyx_v_handle, __pyx_v_mp); + } + + /* "PyCafe.pyx":4325 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.monitorStart(handle,mp) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":4331 + * #Need this to allow a fraction of a second for the callback fn to be called + * #if setPyHandler is used + * time.sleep(0.01); # <<<<<<<<<<<<<< + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + */ + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4331; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__219, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4331; __pyx_clineno = __LINE__; goto __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":4332 + * #if setPyHandler is used + * time.sleep(0.01); + * 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":4333 + * 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_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4334 + * 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":4335 + * 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":4334 + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L14; + } + + /* "PyCafe.pyx":4337 + * 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) + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L14:; + + /* "PyCafe.pyx":4333 + * 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":4332 + * #if setPyHandler is used + * time.sleep(0.01); + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4341 + * #raise Exception("EXCEPTION RAISED in PyCafe def monitorStart. Status = %d" %status) + * + * return mpid # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4231 + * + * ########################################################################################## + * 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)" + * + */ + + /* 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.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__cyCafeException); + __Pyx_XDECREF(__pyx_v_a); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4346 + * + * ################################################################################## + * def monitorStop(self, handlePV, mpid=None): # <<<<<<<<<<<<<< + * cdef str _METHOD_="monitorStop(handlePV, mpid=None)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_287monitorStop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_287monitorStop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_mpid = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[1]; __pyx_lineno = 4346; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + 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_filename = __pyx_f[1]; __pyx_lineno = 4346; __pyx_clineno = __LINE__; goto __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_286monitorStop(((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_286monitorStop(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_CyCafeException *__pyx_v__cyCafeException = NULL; + int __pyx_v_status; + unsigned int __pyx_v_mpidUI; + std::vector __pyx_v_mpidUIV; + size_t __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; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("monitorStop", 0); + + /* "PyCafe.pyx":4347 + * ################################################################################## + * 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":4349 + * cdef str _METHOD_="monitorStop(handlePV, mpid=None)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4350 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4351 + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV # <<<<<<<<<<<<<< + * elif isinstance(handlePV, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 4351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4350 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)) == 1: # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4352 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePV); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4353 + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 4353; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4353; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4352 + * if isinstance(handlePV, (int,long)) == 1: + * handle=handlePV + * elif isinstance(handlePV, (str)) == 1: # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4355 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4357 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * cdef int status + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4357; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4357; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":4364 + * global monDictGlobal + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4364; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + + /* "PyCafe.pyx":4365 + * + * 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":4366 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_mpidUI = __pyx_t_4; + + /* "PyCafe.pyx":4367 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4368 + * 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":4367 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L12; + } + __pyx_L12:; + } + } + + /* "PyCafe.pyx":4369 + * with nogil: + * status=self._c_cafe.monitorStopWithID(handle, mpidUI) + * time.sleep(0.01) # <<<<<<<<<<<<<< + * + * if (status==ICAFE_NORMAL): + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4369; __pyx_clineno = __LINE__; goto __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":4371 + * time.sleep(0.01) + * + * if (status==ICAFE_NORMAL): # <<<<<<<<<<<<<< + * #index=self.monidList.index(mpidUI) + * #self.monidList.remove(mpidUI) + */ + __pyx_t_2 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4379 + * #print (monDictGlobal) + * #DELETE ENTRY ONLY IF IT EXISTS! + * if monDictGlobal.has_key(mpidUI): # <<<<<<<<<<<<<< + * del monDictGlobal[mpidUI] + * + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "has_key"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpidUI); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyDict_Contains(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4380 + * #DELETE ENTRY ONLY IF IT EXISTS! + * if monDictGlobal.has_key(mpidUI): + * del monDictGlobal[mpidUI] # <<<<<<<<<<<<<< + * + * else: + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_mpidUI); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_DelItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4380; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4379 + * #print (monDictGlobal) + * #DELETE ENTRY ONLY IF IT EXISTS! + * if monDictGlobal.has_key(mpidUI): # <<<<<<<<<<<<<< + * del monDictGlobal[mpidUI] + * + */ + } + + /* "PyCafe.pyx":4371 + * time.sleep(0.01) + * + * if (status==ICAFE_NORMAL): # <<<<<<<<<<<<<< + * #index=self.monidList.index(mpidUI) + * #self.monidList.remove(mpidUI) + */ + } + + /* "PyCafe.pyx":4365 + * + * if mpid: + * if isinstance(mpid, (int,long)): # <<<<<<<<<<<<<< + * mpidUI=mpid + * with nogil: + */ + goto __pyx_L7; + } + + /* "PyCafe.pyx":4383 + * + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def monitorStop. \n\ # <<<<<<<<<<<<<< + * monitorPolicy ID (mpid) should be ") + * else: + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__221, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4383; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L7:; + + /* "PyCafe.pyx":4364 + * global monDictGlobal + * + * if mpid: # <<<<<<<<<<<<<< + * if isinstance(mpid, (int,long)): + * mpidUI=mpid + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4386 + * monitorPolicy ID (mpid) should be ") + * else: + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.monitorStop(handle) + * time.sleep(0.01) + */ + /*else*/ { + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4387 + * 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":4386 + * monitorPolicy ID (mpid) should be ") + * else: + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.monitorStop(handle) + * time.sleep(0.01) + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L17; + } + __pyx_L17:; + } + } + + /* "PyCafe.pyx":4388 + * with nogil: + * status=self._c_cafe.monitorStop(handle) + * time.sleep(0.01) # <<<<<<<<<<<<<< + * + * if (status==ICAFE_NORMAL): + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sleep); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__222, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4388; __pyx_clineno = __LINE__; goto __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":4390 + * time.sleep(0.01) + * + * if (status==ICAFE_NORMAL): # <<<<<<<<<<<<<< + * + * #print "size", self.hh.getNmonitor(handle) + */ + __pyx_t_1 = ((__pyx_v_status == ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4393 + * + * #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":4396 + * #print "size", mpidUIV.size() + * + * for i in range(0, mpidUIV.size()): # <<<<<<<<<<<<<< + * #index=self.monidList.index(mpidUIV[i]) + * #self.monidList.remove(mpidUIV[i]) + */ + __pyx_t_7 = __pyx_v_mpidUIV.size(); + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":4401 + * #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 (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "has_key"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int((__pyx_v_mpidUIV[__pyx_v_i])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyDict_Contains(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_5); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4401; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4402 + * #del self.monDict[mpidUIV[i]] + * if monDictGlobal.has_key(mpidUIV[i]): + * del monDictGlobal[mpidUIV[i]] # <<<<<<<<<<<<<< + * #monDictGlobal.remove(mpidUIV[i]) + * + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int((__pyx_v_mpidUIV[__pyx_v_i])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_DelItem(__pyx_v_6PyCafe_monDictGlobal, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4401 + * #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]) + */ + } + } + + /* "PyCafe.pyx":4390 + * time.sleep(0.01) + * + * if (status==ICAFE_NORMAL): # <<<<<<<<<<<<<< + * + * #print "size", self.hh.getNmonitor(handle) + */ + } + } + __pyx_L6:; + + /* "PyCafe.pyx":4405 + * #monDictGlobal.remove(mpidUIV[i]) + * + * 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":4406 + * + * 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":4407 + * 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":4408 + * 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":4407 + * 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":4410 + * 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) + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L24:; + + /* "PyCafe.pyx":4406 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4405 + * #monDictGlobal.remove(mpidUIV[i]) + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4414 + * #raise Exception("EXCEPTION RAISED in PyCafe def monitorStop. 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_filename = __pyx_f[1]; __pyx_lineno = 4414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4346 + * + * ################################################################################## + * 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_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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4419 + * + * ################################################################################## + * def monitorStopAll(self): # <<<<<<<<<<<<<< + * + * cdef str _METHOD_="monitorStopAll()" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_289monitorStopAll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_289monitorStopAll(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_288monitorStopAll(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_288monitorStopAll(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; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("monitorStopAll", 0); + + /* "PyCafe.pyx":4421 + * def monitorStopAll(self): + * + * cdef str _METHOD_="monitorStopAll()" # <<<<<<<<<<<<<< + * + * global monDictGlobal + */ + __Pyx_INCREF(__pyx_kp_u_monitorStopAll); + __pyx_v__METHOD_ = __pyx_kp_u_monitorStopAll; + + /* "PyCafe.pyx":4426 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.monitorStopAll() + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4427 + * 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":4426 + * + * cdef int status + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.monitorStopAll() + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":4440 + * #del self.moncbList[:] + * #self.monDict.clear() + * time.sleep(0.5) # <<<<<<<<<<<<<< + * monDictGlobal.clear() + * + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sleep); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4440; __pyx_clineno = __LINE__; goto __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__223, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4440; __pyx_clineno = __LINE__; goto __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":4441 + * #self.monDict.clear() + * time.sleep(0.5) + * monDictGlobal.clear() # <<<<<<<<<<<<<< + * + * #print self.monDict + */ + if (unlikely(__pyx_v_6PyCafe_monDictGlobal == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "clear"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_PyDict_Clear(__pyx_v_6PyCafe_monDictGlobal); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4446 + * #print monDictGlobal + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + __pyx_t_4 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":4447 + * + * 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) + */ + __pyx_t_4 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_4) { + + /* "PyCafe.pyx":4448 + * 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) + * + */ + __pyx_v_self->_c_cafe->printStatusMessage(__pyx_v_status); + + /* "PyCafe.pyx":4447 + * + * 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) + */ + } + + /* "PyCafe.pyx":4449 + * 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 + */ + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4449; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4446 + * #print monDictGlobal + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4451 + * raise Exception("EXCEPTION RAISED in PyCafe def monitorStopAll. Status = %d" %status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4419 + * + * ################################################################################## + * 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_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":4456 + * + * ################################################################################## + * def set(self, handlePV, valSet): # <<<<<<<<<<<<<< + * cdef str _METHOD_="set(handlePV, valSet)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_291set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_291set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_valSet = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4456; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4456; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4456; __pyx_clineno = __LINE__; goto __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_290set(((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_290set(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_CyCafeException *__pyx_v__cyCafeException = 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; + Py_ssize_t __pyx_v_i; + 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; + Py_ssize_t __pyx_t_17; + Py_ssize_t __pyx_t_18; + double __pyx_t_19; + float __pyx_t_20; + dbr_long_t __pyx_t_21; + short __pyx_t_22; + unsigned short __pyx_t_23; + dbr_char_t __pyx_t_24; + std::string __pyx_t_25; + int __pyx_t_26; + PY_LONG_LONG __pyx_t_27; + unsigned char __pyx_t_28; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set", 0); + + /* "PyCafe.pyx":4457 + * ################################################################################## + * 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":4459 + * cdef str _METHOD_="set(handlePV, valSet)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * + * if isinstance(handlePV, (int,long)): + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":4461 + * 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":4462 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4461 + * cdef unsigned int handle=0 + * + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4463 + * 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":4464 + * handle=handlePV + * elif isinstance(handlePV, (str)): + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 4464; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4464; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":4463 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4466 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4468 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4468; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":4473 + * #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":4474 + * + * cdef unsigned short valType=CAFE_STRING + * cdef int status=ICAFE_NORMAL # <<<<<<<<<<<<<< + * cdef float valSetF + * cdef double valSetD + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":4491 + * 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":4493 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_wchar); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_char_p); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_wchar_p); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4493; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4493; __pyx_clineno = __LINE__; goto __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_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_8); + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_ctypesString = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4494 + * + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_char); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_ubyte); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_bool); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_uint8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_9); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_6 = 0; + __pyx_t_9 = 0; + __pyx_v_ctypesUChar = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4495 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_int16); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_int8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_short); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_byte); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_8); + __pyx_t_9 = 0; + __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_ctypesShort = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4496 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_uint16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_ushort); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_v_ctypesUShort = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4497 + * 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_int); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_int32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4498 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_long); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_size_t); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4497 + * 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_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_9); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_6 = 0; + __pyx_t_9 = 0; + __pyx_v_ctypesInt = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4499 + * 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_uint); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_uint32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_int64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_uint64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4500 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_ulong); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_ulonglong); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_longdouble); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4501 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_longlong); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_ssize_t); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4502 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_void_p); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_voidp); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4499 + * 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_5 = PyTuple_New(11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_5, 9, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 10, __pyx_t_16); + __pyx_t_9 = 0; + __pyx_t_6 = 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_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4507 + * + * + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_str_2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_15); + __pyx_t_16 = 0; + __pyx_t_15 = 0; + __pyx_v_dtypesString = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4508 + * + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ubyte); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bool8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bool); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4508; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_5, 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_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4509 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_byte); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_short); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4509; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_5, 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_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4510 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ushort); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_16); + __pyx_t_15 = 0; + __pyx_t_16 = 0; + __pyx_v_dtypesUShort = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4511 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int_2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_intc); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uintp); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_5, 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_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4512 + * 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uintc); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint32); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4513 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ulonglong); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_longlong); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_intp); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uintp); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4512 + * 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_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_15); + __Pyx_GIVEREF(__pyx_t_16); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_16); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 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_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4515 + * 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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_single); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_10); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_10 = 0; + __pyx_v_dtypesFloat = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4516 + * + * cdef tuple dtypesFloat = (np.single, np.float16, np.float32) + * cdef tuple dtypesDouble = (np.double, np.float_, np.float64) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_8); + __pyx_t_10 = 0; + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_v_dtypesDouble = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4522 + * #print "type= // ", type(valSet) + * + * cdef bint isGoodType=False # <<<<<<<<<<<<<< + * cdef bint isBytesType=False + * + */ + __pyx_v_isGoodType = 0; + + /* "PyCafe.pyx":4523 + * + * cdef bint isGoodType=False + * cdef bint isBytesType=False # <<<<<<<<<<<<<< + * + * # print('set method', type(valSet)) + */ + __pyx_v_isBytesType = 0; + + /* "PyCafe.pyx":4545 + * # print(type(valSet)) + * # print (valSet.__class__) + * cdef str classType = (valSet.__class__).__name__ # <<<<<<<<<<<<<< + * cdef str substringmv = "_memoryviewslice" + * + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_class); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_filename = __pyx_f[1]; __pyx_lineno = 4545; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_classType = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":4546 + * # 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":4555 + * # 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)): + */ + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + if (unlikely(__pyx_v_self->pythonVersion == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_self->pythonVersion, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_8, __pyx_int_6, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4557 + * 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: + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_INCREF(__pyx_builtin_memoryview); + __pyx_t_5 = __pyx_builtin_memoryview; + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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_L11_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_8); + __pyx_t_2 = (__pyx_t_3 != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_7); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L11_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_L11_bool_binop_done; + } + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_5); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_11); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4558 + * + * 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":4557 + * 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: + */ + } + + /* "PyCafe.pyx":4555 + * # 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)): + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":4560 + * isGoodType=True + * else: + * if isinstance(valSet,(list, array.array, np.ndarray, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType=True + * + */ + /*else*/ { + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_Array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __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_L18_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_7); + __pyx_t_1 = (__pyx_t_3 != 0); + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L18_bool_binop_done; + } + __pyx_t_1 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_5); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L18_bool_binop_done; + } + __pyx_t_3 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_11); + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L18_bool_binop_done:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4561 + * else: + * if isinstance(valSet,(list, array.array, np.ndarray, ctypes.Array)): + * isGoodType=True # <<<<<<<<<<<<<< + * + * if (isGoodType==False): + */ + __pyx_v_isGoodType = 1; + + /* "PyCafe.pyx":4560 + * isGoodType=True + * else: + * if isinstance(valSet,(list, array.array, np.ndarray, ctypes.Array)): # <<<<<<<<<<<<<< + * isGoodType=True + * + */ + } + } + __pyx_L6:; + + /* "PyCafe.pyx":4563 + * 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":4564 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_substringmv, __pyx_v_classType, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4565 + * 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":4564 + * + * if (isGoodType==False): + * if (substringmv in classType): # <<<<<<<<<<<<<< + * isGoodType=True + * + */ + } + + /* "PyCafe.pyx":4563 + * isGoodType=True + * + * if (isGoodType==False): # <<<<<<<<<<<<<< + * if (substringmv in classType): + * isGoodType=True + */ + } + + /* "PyCafe.pyx":4569 + * #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_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4569; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4570 + * #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_5 = __Pyx_GetItemInt(__pyx_v_valSet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyBytes_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":4571 + * if isinstance(valSet,ctypes.Array): + * if isinstance(valSet[0],bytes): + * isGoodType=False # <<<<<<<<<<<<<< + * isBytesType=True + * + */ + __pyx_v_isGoodType = 0; + + /* "PyCafe.pyx":4572 + * 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":4570 + * #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":4569 + * #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":4586 + * #print("isBytesType ", isBytesType) + * + * if isGoodType: # <<<<<<<<<<<<<< + * + * #print('set method', type(valSet[0])) + */ + __pyx_t_2 = (__pyx_v_isGoodType != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4590 + * #print('set method', type(valSet[0])) + * + * nLA=len(valSet) # <<<<<<<<<<<<<< + * + * #Just check on first element if array.array etc.. + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4590; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_nLA = __pyx_t_17; + + /* "PyCafe.pyx":4593 + * + * #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_2 = PyList_Check(__pyx_v_valSet); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4595 + * 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":4593 + * + * #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":4597 + * nLA=1 + * + * for i in range(0, nLA): # <<<<<<<<<<<<<< + * if isinstance(valSet[i],(str, bytes)): + * valType=CAFE_STRING + */ + __pyx_t_4 = __pyx_v_nLA; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_4; __pyx_t_17+=1) { + __pyx_v_i = __pyx_t_17; + + /* "PyCafe.pyx":4598 + * + * for i in range(0, nLA): + * if isinstance(valSet[i],(str, bytes)): # <<<<<<<<<<<<<< + * valType=CAFE_STRING + * break + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyUnicode_Check(__pyx_t_5); + __pyx_t_3 = (__pyx_t_2 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L31_bool_binop_done; + } + __pyx_t_3 = PyBytes_Check(__pyx_t_5); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L31_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":4599 + * for i in range(0, nLA): + * if isinstance(valSet[i],(str, bytes)): + * valType=CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(valSet[i],dtypesString): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":4600 + * if isinstance(valSet[i],(str, bytes)): + * valType=CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(valSet[i],dtypesString): + * valType=CAFE_STRING + */ + goto __pyx_L29_break; + + /* "PyCafe.pyx":4598 + * + * for i in range(0, nLA): + * if isinstance(valSet[i],(str, bytes)): # <<<<<<<<<<<<<< + * valType=CAFE_STRING + * break + */ + goto __pyx_L30; + } + + /* "PyCafe.pyx":4601 + * valType=CAFE_STRING + * break + * elif isinstance(valSet[i],dtypesString): # <<<<<<<<<<<<<< + * valType=CAFE_STRING + * break + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_5, __pyx_v_dtypesString); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4602 + * break + * elif isinstance(valSet[i],dtypesString): + * valType=CAFE_STRING # <<<<<<<<<<<<<< + * break + * elif isinstance(valSet[i],(float)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":4603 + * elif isinstance(valSet[i],dtypesString): + * valType=CAFE_STRING + * break # <<<<<<<<<<<<<< + * elif isinstance(valSet[i],(float)): + * valType=CAFE_DOUBLE + */ + goto __pyx_L29_break; + + /* "PyCafe.pyx":4601 + * valType=CAFE_STRING + * break + * elif isinstance(valSet[i],dtypesString): # <<<<<<<<<<<<<< + * valType=CAFE_STRING + * break + */ + goto __pyx_L30; + } + + /* "PyCafe.pyx":4604 + * valType=CAFE_STRING + * break + * elif isinstance(valSet[i],(float)): # <<<<<<<<<<<<<< + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesDouble)): + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyFloat_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":4605 + * break + * elif isinstance(valSet[i],(float)): + * valType=CAFE_DOUBLE # <<<<<<<<<<<<<< + * elif isinstance(valSet[i],(dtypesDouble)): + * valType=CAFE_DOUBLE + */ + __pyx_v_valType = CAFE_DOUBLE; + + /* "PyCafe.pyx":4604 + * valType=CAFE_STRING + * break + * elif isinstance(valSet[i],(float)): # <<<<<<<<<<<<<< + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesDouble)): + */ + goto __pyx_L30; + } + + /* "PyCafe.pyx":4606 + * elif isinstance(valSet[i],(float)): + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesDouble)): # <<<<<<<<<<<<<< + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesFloat)): + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_5, __pyx_v_dtypesDouble); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4607 + * 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":4606 + * elif isinstance(valSet[i],(float)): + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesDouble)): # <<<<<<<<<<<<<< + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesFloat)): + */ + goto __pyx_L30; + } + + /* "PyCafe.pyx":4608 + * elif isinstance(valSet[i],(dtypesDouble)): + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesFloat)): # <<<<<<<<<<<<<< + * valType=CAFE_FLOAT + * elif isinstance(valSet[i],(long, int)): + */ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyObject_IsInstance(__pyx_t_5, __pyx_v_dtypesFloat); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4608; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4609 + * 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":4608 + * elif isinstance(valSet[i],(dtypesDouble)): + * valType=CAFE_DOUBLE + * elif isinstance(valSet[i],(dtypesFloat)): # <<<<<<<<<<<<<< + * valType=CAFE_FLOAT + * elif isinstance(valSet[i],(long, int)): + */ + goto __pyx_L30; + } + + /* "PyCafe.pyx":4610 + * 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_5 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyLong_Check(__pyx_t_5); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L33_bool_binop_done; + } + __pyx_t_3 = PyInt_Check(__pyx_t_5); + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L33_bool_binop_done:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4611 + * 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":4610 + * 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_L30; + } + + /* "PyCafe.pyx":4612 + * 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_5 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = PyNumber_Add(__pyx_v_dtypesInt, __pyx_v_dtypesLongLong); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PyNumber_Add(__pyx_t_7, __pyx_v_dtypesUChar); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = PyObject_IsInstance(__pyx_t_5, __pyx_t_11); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4613 + * 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":4612 + * 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_L30; + } + + /* "PyCafe.pyx":4614 + * 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_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_11, __pyx_v_dtypesShort); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4614; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4615 + * 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":4614 + * 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_L30; + } + + /* "PyCafe.pyx":4616 + * elif isinstance(valSet[i], dtypesShort): + * valType=CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): # <<<<<<<<<<<<<< + * valType=CAFE_USHORT + * else: + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_1 = PyObject_IsInstance(__pyx_t_11, __pyx_v_dtypesUShort); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4617 + * valType=CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): + * valType=CAFE_USHORT # <<<<<<<<<<<<<< + * else: + * + */ + __pyx_v_valType = CAFE_USHORT; + + /* "PyCafe.pyx":4616 + * elif isinstance(valSet[i], dtypesShort): + * valType=CAFE_SHORT + * elif isinstance(valSet[i], dtypesUShort): # <<<<<<<<<<<<<< + * valType=CAFE_USHORT + * else: + */ + goto __pyx_L30; + } + + /* "PyCafe.pyx":4620 + * else: + * + * print("PyCafe.pyx: We do not cater for type ", type(valSet[i]), " and thus assume a string" ) # <<<<<<<<<<<<<< + * valType=CAFE_STRING + * break + */ + /*else*/ { + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __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_5, 0, __pyx_kp_u_PyCafe_pyx_We_do_not_cater_for_t); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_11))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_11))); + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)Py_TYPE(__pyx_t_11))); + __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_5, 2, __pyx_kp_u_and_thus_assume_a_string); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_5, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4620; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "PyCafe.pyx":4621 + * + * 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":4622 + * print("PyCafe.pyx: We do not cater for type ", type(valSet[i]), " and thus assume a string" ) + * valType=CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * # valSet to vector since + */ + goto __pyx_L29_break; + } + __pyx_L30:; + } + __pyx_L29_break:; + + /* "PyCafe.pyx":4626 + * # 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":4628 + * if valType==CAFE_DOUBLE: + * + * vecD.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecD.push_back(valSet[i]) + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4628; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vecD.reserve(__pyx_t_17); + + /* "PyCafe.pyx":4629 + * + * vecD.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecD.push_back(valSet[i]) + * with nogil: + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4629; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":4630 + * 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_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + try { + __pyx_v_vecD.push_back(__pyx_t_19); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4630; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4631 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4632 + * 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":4631 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L39; + } + __pyx_L39:; + } + } + + /* "PyCafe.pyx":4626 + * # valSet to vector since + * # coercion from Python not allowed without the GIL + * if valType==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * + * vecD.reserve(len(valSet)) + */ + break; + + /* "PyCafe.pyx":4634 + * status=self._c_cafe.setVDouble(handle, vecD) + * + * elif valType==CAFE_FLOAT: # <<<<<<<<<<<<<< + * + * vecF.reserve(len(valSet)) + */ + case CAFE_FLOAT: + + /* "PyCafe.pyx":4636 + * elif valType==CAFE_FLOAT: + * + * vecF.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecF.push_back(valSet[i]) + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4636; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vecF.reserve(__pyx_t_17); + + /* "PyCafe.pyx":4637 + * + * vecF.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecF.push_back(valSet[i]) + * with nogil: + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":4638 + * 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_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_20 = __pyx_PyFloat_AsFloat(__pyx_t_11); if (unlikely((__pyx_t_20 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + try { + __pyx_v_vecF.push_back(__pyx_t_20); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4638; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4639 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4640 + * 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":4639 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L44; + } + __pyx_L44:; + } + } + + /* "PyCafe.pyx":4634 + * status=self._c_cafe.setVDouble(handle, vecD) + * + * elif valType==CAFE_FLOAT: # <<<<<<<<<<<<<< + * + * vecF.reserve(len(valSet)) + */ + break; + + /* "PyCafe.pyx":4642 + * status=self._c_cafe.setVFloat(handle, vecF) + * + * elif valType==CAFE_LONG: # <<<<<<<<<<<<<< + * + * vecI.reserve(len(valSet)) + */ + case CAFE_LONG: + + /* "PyCafe.pyx":4644 + * elif valType==CAFE_LONG: + * + * vecI.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecI.push_back(valSet[i]) + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4644; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vecI.reserve(__pyx_t_17); + + /* "PyCafe.pyx":4645 + * + * vecI.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecI.push_back(valSet[i]) + * + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4645; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":4646 + * vecI.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecI.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_21 = __Pyx_PyInt_As_dbr_long_t(__pyx_t_11); if (unlikely((__pyx_t_21 == (dbr_long_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + try { + __pyx_v_vecI.push_back(__pyx_t_21); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4646; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4648 + * vecI.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVLong(handle, vecI) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4649 + * + * 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":4648 + * vecI.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVLong(handle, vecI) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L49; + } + __pyx_L49:; + } + } + + /* "PyCafe.pyx":4642 + * status=self._c_cafe.setVFloat(handle, vecF) + * + * elif valType==CAFE_LONG: # <<<<<<<<<<<<<< + * + * vecI.reserve(len(valSet)) + */ + break; + + /* "PyCafe.pyx":4651 + * status=self._c_cafe.setVLong(handle, vecI) + * + * elif valType==CAFE_SHORT: # <<<<<<<<<<<<<< + * + * vecShort.reserve(len(valSet)) + */ + case CAFE_SHORT: + + /* "PyCafe.pyx":4653 + * elif valType==CAFE_SHORT: + * + * vecShort.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecShort.push_back(valSet[i]) + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4653; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vecShort.reserve(__pyx_t_17); + + /* "PyCafe.pyx":4654 + * + * vecShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecShort.push_back(valSet[i]) + * + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":4655 + * vecShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecShort.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_22 = __Pyx_PyInt_As_short(__pyx_t_11); if (unlikely((__pyx_t_22 == (short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + try { + __pyx_v_vecShort.push_back(__pyx_t_22); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4655; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4657 + * vecShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVShort(handle, vecShort) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4658 + * + * 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":4657 + * vecShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVShort(handle, vecShort) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L54; + } + __pyx_L54:; + } + } + + /* "PyCafe.pyx":4651 + * status=self._c_cafe.setVLong(handle, vecI) + * + * elif valType==CAFE_SHORT: # <<<<<<<<<<<<<< + * + * vecShort.reserve(len(valSet)) + */ + break; + + /* "PyCafe.pyx":4660 + * status=self._c_cafe.setVShort(handle, vecShort) + * + * elif valType==CAFE_USHORT: # <<<<<<<<<<<<<< + * + * vecUShort.reserve(len(valSet)) + */ + case CAFE_USHORT: + + /* "PyCafe.pyx":4662 + * elif valType==CAFE_USHORT: + * + * vecUShort.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecUShort.push_back(valSet[i]) + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4662; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vecUShort.reserve(__pyx_t_17); + + /* "PyCafe.pyx":4663 + * + * vecUShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecUShort.push_back(valSet[i]) + * + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4663; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":4664 + * vecUShort.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecUShort.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_23 = __Pyx_PyInt_As_unsigned_short(__pyx_t_11); if (unlikely((__pyx_t_23 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + try { + __pyx_v_vecUShort.push_back(__pyx_t_23); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4666 + * vecUShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVUShort(handle, vecUShort) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4667 + * + * 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":4666 + * vecUShort.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVUShort(handle, vecUShort) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L59; + } + __pyx_L59:; + } + } + + /* "PyCafe.pyx":4660 + * status=self._c_cafe.setVShort(handle, vecShort) + * + * elif valType==CAFE_USHORT: # <<<<<<<<<<<<<< + * + * vecUShort.reserve(len(valSet)) + */ + break; + + /* "PyCafe.pyx":4669 + * status=self._c_cafe.setVUShort(handle, vecUShort) + * + * elif valType==CAFE_CHAR: # <<<<<<<<<<<<<< + * + * vecChar.reserve(len(valSet)) + */ + case CAFE_CHAR: + + /* "PyCafe.pyx":4671 + * elif valType==CAFE_CHAR: + * + * vecChar.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecChar.push_back(valSet[i]) + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4671; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vecChar.reserve(__pyx_t_17); + + /* "PyCafe.pyx":4672 + * + * vecChar.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecChar.push_back(valSet[i]) + * + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":4673 + * vecChar.reserve(len(valSet)) + * for i in range(0, len(valSet)): + * vecChar.push_back(valSet[i]) # <<<<<<<<<<<<<< + * + * with nogil: + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_24 = __Pyx_PyInt_As_dbr_char_t(__pyx_t_11); if (unlikely((__pyx_t_24 == (dbr_char_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + try { + __pyx_v_vecChar.push_back(__pyx_t_24); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4675 + * vecChar.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVChar(handle, vecChar) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4676 + * + * 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":4675 + * vecChar.push_back(valSet[i]) + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVChar(handle, vecChar) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L64; + } + __pyx_L64:; + } + } + + /* "PyCafe.pyx":4669 + * status=self._c_cafe.setVUShort(handle, vecUShort) + * + * elif valType==CAFE_CHAR: # <<<<<<<<<<<<<< + * + * vecChar.reserve(len(valSet)) + */ + break; + + /* "PyCafe.pyx":4678 + * status=self._c_cafe.setVChar(handle, vecChar) + * + * elif valType==CAFE_STRING: # <<<<<<<<<<<<<< + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): + */ + case CAFE_STRING: + + /* "PyCafe.pyx":4679 + * + * elif valType==CAFE_STRING: + * vecS.reserve(len(valSet)) # <<<<<<<<<<<<<< + * for i in range(0, len(valSet)): + * vecS.push_back(str(valSet[i])) + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4679; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_vecS.reserve(__pyx_t_17); + + /* "PyCafe.pyx":4680 + * elif valType==CAFE_STRING: + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): # <<<<<<<<<<<<<< + * vecS.push_back(str(valSet[i])) + * with nogil: + */ + __pyx_t_17 = PyObject_Length(__pyx_v_valSet); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) { + __pyx_v_i = __pyx_t_18; + + /* "PyCafe.pyx":4681 + * 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) + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); + __pyx_t_11 = 0; + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_25 = __pyx_convert_string_from_py_std__in_string(__pyx_t_11); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + try { + __pyx_v_vecS.push_back(__pyx_t_25); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4682 + * for i in range(0, len(valSet)): + * vecS.push_back(str(valSet[i])) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVString(handle, vecS) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4683 + * vecS.push_back(str(valSet[i])) + * 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":4682 + * for i in range(0, len(valSet)): + * vecS.push_back(str(valSet[i])) + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setVString(handle, vecS) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L69; + } + __pyx_L69:; + } + } + + /* "PyCafe.pyx":4678 + * status=self._c_cafe.setVChar(handle, vecChar) + * + * elif valType==CAFE_STRING: # <<<<<<<<<<<<<< + * vecS.reserve(len(valSet)) + * for i in range(0, len(valSet)): + */ + break; + default: break; + } + + /* "PyCafe.pyx":4586 + * #print("isBytesType ", isBytesType) + * + * if isGoodType: # <<<<<<<<<<<<<< + * + * #print('set method', type(valSet[0])) + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4685 + * 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":4687 + * elif isBytesType: + * #print("isBytesType") + * valSetS=valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_25 = __pyx_convert_string_from_py_std__in_string(__pyx_t_11); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_v_valSetS = ((std::string)__pyx_t_25); + + /* "PyCafe.pyx":4688 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4689 + * 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":4688 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L72; + } + __pyx_L72:; + } + } + + /* "PyCafe.pyx":4685 + * status=self._c_cafe.setVString(handle, vecS) + * + * elif isBytesType: # <<<<<<<<<<<<<< + * #print("isBytesType") + * valSetS=valSet.value + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4690 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_char)): # <<<<<<<<<<<<<< + * #print("is ctypes.c_char") + * #print(valSet.value) + */ + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_c_char); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4694 + * #print(valSet.value) + * #print(valSet.value.decode()) + * valSetS=valSet.value.decode() # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + if (__pyx_t_11) { + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } else { + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_25 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4694; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetS = __pyx_t_25; + + /* "PyCafe.pyx":4695 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4696 + * 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":4695 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L75; + } + __pyx_L75:; + } + } + + /* "PyCafe.pyx":4690 + * 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_L26; + } + + /* "PyCafe.pyx":4697 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): # <<<<<<<<<<<<<< + * valSetF=valSet.value + * with nogil: + */ + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_c_float); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_7); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4698 + * 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_20 = __pyx_PyFloat_AsFloat(__pyx_t_7); if (unlikely((__pyx_t_20 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_valSetF = ((float)__pyx_t_20); + + /* "PyCafe.pyx":4699 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4700 + * 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":4699 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L78; + } + __pyx_L78:; + } + } + + /* "PyCafe.pyx":4697 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (ctypes.c_float)): # <<<<<<<<<<<<<< + * valSetF=valSet.value + * with nogil: + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4701 + * with nogil: + * status=self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): # <<<<<<<<<<<<<< + * valSetD=valSet.value + * with nogil: + */ + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ctypes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_c_double); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = PyObject_IsInstance(__pyx_v_valSet, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4701; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4702 + * 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4702; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetD = ((double)__pyx_t_19); + + /* "PyCafe.pyx":4703 + * 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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4704 + * 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":4703 + * 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 + Py_BLOCK_THREADS + #endif + goto __pyx_L81; + } + __pyx_L81:; + } + } + + /* "PyCafe.pyx":4701 + * with nogil: + * status=self._c_cafe.setFloat(handle, valSetF) + * elif isinstance(valSet, (ctypes.c_double)): # <<<<<<<<<<<<<< + * valSetD=valSet.value + * with nogil: + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4705 + * with nogil: + * status=self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): # <<<<<<<<<<<<<< + * #print("ctypesInt") + * valSetI= valSet.value + */ + __pyx_t_1 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesInt); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4705; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4707 + * elif isinstance(valSet, ctypesInt): + * #print("ctypesInt") + * valSetI= valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setLong(handle, valSetI) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_26 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_26 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetI = ((int)__pyx_t_26); + + /* "PyCafe.pyx":4708 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4709 + * 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":4708 + * #print("ctypesInt") + * valSetI= valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L84; + } + __pyx_L84:; + } + } + + /* "PyCafe.pyx":4705 + * with nogil: + * status=self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, ctypesInt): # <<<<<<<<<<<<<< + * #print("ctypesInt") + * valSetI= valSet.value + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4710 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4712 + * elif isinstance(valSet, ctypesLongLong): + * #print("ctypesLongLong") + * valSetLL=valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setLong(handle, valSetLL) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_27 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_27 == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetLL = ((PY_LONG_LONG)__pyx_t_27); + + /* "PyCafe.pyx":4713 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4714 + * 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":4713 + * #print("ctypesLongLong") + * valSetLL=valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L87; + } + __pyx_L87:; + } + } + + /* "PyCafe.pyx":4710 + * with nogil: + * status=self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, ctypesLongLong): # <<<<<<<<<<<<<< + * #print("ctypesLongLong") + * valSetLL=valSet.value + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4715 + * with nogil: + * status=self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): # <<<<<<<<<<<<<< + * #print("ctypesShort") + * valSetShort=valSet.value + */ + __pyx_t_1 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesShort); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4717 + * elif isinstance(valSet, ctypesShort): + * #print("ctypesShort") + * valSetShort=valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setShort(handle, valSetShort) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_22 = __Pyx_PyInt_As_short(__pyx_t_5); if (unlikely((__pyx_t_22 == (short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetShort = ((short)__pyx_t_22); + + /* "PyCafe.pyx":4718 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4719 + * 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":4718 + * #print("ctypesShort") + * valSetShort=valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L90; + } + __pyx_L90:; + } + } + + /* "PyCafe.pyx":4715 + * with nogil: + * status=self._c_cafe.setLong(handle, valSetLL) + * elif isinstance(valSet, ctypesShort): # <<<<<<<<<<<<<< + * #print("ctypesShort") + * valSetShort=valSet.value + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4720 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4722 + * elif isinstance(valSet, ctypesUShort): + * #print("ctypesUShort") + * valSetUShort=valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setUShort(handle, valSetUShort) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_23 = __Pyx_PyInt_As_unsigned_short(__pyx_t_5); if (unlikely((__pyx_t_23 == (unsigned short)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4722; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetUShort = ((unsigned short)__pyx_t_23); + + /* "PyCafe.pyx":4723 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4724 + * 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":4723 + * #print("ctypesUShort") + * valSetUShort=valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString) ): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L93; + } + __pyx_L93:; + } + } + + /* "PyCafe.pyx":4720 + * with nogil: + * status=self._c_cafe.setShort(handle, valSetShort) + * elif isinstance(valSet, ctypesUShort): # <<<<<<<<<<<<<< + * #print("ctypesUShort") + * valSetUShort=valSet.value + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4725 + * with nogil: + * status=self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString) ): # <<<<<<<<<<<<<< + * #print("ctypesString") + * valSetS=valSet.value + */ + __pyx_t_1 = PyObject_IsInstance(__pyx_v_valSet, __pyx_v_ctypesString); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4725; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4727 + * elif isinstance(valSet, (ctypesString) ): + * #print("ctypesString") + * valSetS=valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_25 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetS = ((std::string)__pyx_t_25); + + /* "PyCafe.pyx":4728 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4729 + * 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":4728 + * #print("ctypesString") + * valSetS=valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L96; + } + __pyx_L96:; + } + } + + /* "PyCafe.pyx":4725 + * with nogil: + * status=self._c_cafe.setUShort(handle, valSetUShort) + * elif isinstance(valSet, (ctypesString) ): # <<<<<<<<<<<<<< + * #print("ctypesString") + * valSetS=valSet.value + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4730 + * 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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4732 + * elif isinstance(valSet, ctypesUChar): + * #print("ctypesUChar") + * valSetUChar=valSet.value # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setChar(handle, valSetUChar) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_value_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_28 = __Pyx_PyInt_As_unsigned_char(__pyx_t_5); if (unlikely((__pyx_t_28 == (unsigned char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4732; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_valSetUChar = ((unsigned char)__pyx_t_28); + + /* "PyCafe.pyx":4733 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4734 + * 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":4733 + * #print("ctypesUChar") + * valSetUChar=valSet.value + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L99; + } + __pyx_L99:; + } + } + + /* "PyCafe.pyx":4730 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, ctypesUChar): # <<<<<<<<<<<<<< + * #print("ctypesUChar") + * valSetUChar=valSet.value + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4735 + * with nogil: + * status=self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): # <<<<<<<<<<<<<< + * #print("float type") + * valSetD= valSet + */ + __pyx_t_1 = PyFloat_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4737 + * elif isinstance(valSet, (float)): + * #print("float type") + * valSetD= valSet # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setDouble(handle, valSetD) + */ + __pyx_t_20 = __pyx_PyFloat_AsFloat(__pyx_v_valSet); if (unlikely((__pyx_t_20 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_valSetD = ((float)__pyx_t_20); + + /* "PyCafe.pyx":4738 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4739 + * 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":4738 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L102; + } + __pyx_L102:; + } + } + + /* "PyCafe.pyx":4735 + * with nogil: + * status=self._c_cafe.setChar(handle, valSetUChar) + * elif isinstance(valSet, (float)): # <<<<<<<<<<<<<< + * #print("float type") + * valSetD= valSet + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4740 + * with nogil: + * status=self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): # <<<<<<<<<<<<<< + * #print("int/long type") + * valSetI= valSet + */ + __pyx_t_1 = PyInt_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L103_bool_binop_done; + } + __pyx_t_3 = PyLong_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L103_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4742 + * elif isinstance(valSet, (int, long)): + * #print("int/long type") + * valSetI= valSet # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setLong(handle, valSetI) + */ + __pyx_t_26 = __Pyx_PyInt_As_int(__pyx_v_valSet); if (unlikely((__pyx_t_26 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_valSetI = ((int)__pyx_t_26); + + /* "PyCafe.pyx":4743 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4744 + * valSetI= valSet + * with nogil: + * status=self._c_cafe.setLong(handle, valSetI) # <<<<<<<<<<<<<< + * elif isinstance(valSet, (str)): + * # print("str type") + */ + __pyx_v_status = __pyx_v_self->_c_cafe->setLong(__pyx_v_handle, __pyx_v_valSetI); + } + + /* "PyCafe.pyx":4743 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L107; + } + __pyx_L107:; + } + } + + /* "PyCafe.pyx":4740 + * with nogil: + * status=self._c_cafe.setDouble(handle, valSetD) + * elif isinstance(valSet, (int, long)): # <<<<<<<<<<<<<< + * #print("int/long type") + * valSetI= valSet + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4745 + * with nogil: + * status=self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): # <<<<<<<<<<<<<< + * # print("str type") + * valSetS=valSet + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4747 + * elif isinstance(valSet, (str)): + * # print("str type") + * valSetS=valSet # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_25 = __pyx_convert_string_from_py_std__in_string(__pyx_v_valSet); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_valSetS = __pyx_t_25; + + /* "PyCafe.pyx":4748 + * # print("str type") + * valSetS=valSet + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes,bytearray)): + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4749 + * 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":4748 + * # print("str type") + * valSetS=valSet + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes,bytearray)): + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L110; + } + __pyx_L110:; + } + } + + /* "PyCafe.pyx":4745 + * with nogil: + * status=self._c_cafe.setLong(handle, valSetI) + * elif isinstance(valSet, (str)): # <<<<<<<<<<<<<< + * # print("str type") + * valSetS=valSet + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4750 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes,bytearray)): # <<<<<<<<<<<<<< + * #print("bytes,bytearray") + * valSetS=valSet.decode('utf8') + */ + __pyx_t_1 = PyBytes_Check(__pyx_v_valSet); + __pyx_t_3 = (__pyx_t_1 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L111_bool_binop_done; + } + __pyx_t_3 = PyByteArray_Check(__pyx_v_valSet); + __pyx_t_1 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L111_bool_binop_done:; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4752 + * elif isinstance(valSet, (bytes,bytearray)): + * #print("bytes,bytearray") + * valSetS=valSet.decode('utf8') # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_valSet, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__224, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_25 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_valSetS = __pyx_t_25; + + /* "PyCafe.pyx":4753 + * #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 + #endif + /*try:*/ { + + /* "PyCafe.pyx":4754 + * 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":4753 + * #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 + Py_BLOCK_THREADS + #endif + goto __pyx_L115; + } + __pyx_L115:; + } + } + + /* "PyCafe.pyx":4750 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (bytes,bytearray)): # <<<<<<<<<<<<<< + * #print("bytes,bytearray") + * valSetS=valSet.decode('utf8') + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4755 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): # <<<<<<<<<<<<<< + * #print("unicode") + * valSetS=valSet + */ + __pyx_t_1 = PyUnicode_Check(__pyx_v_valSet); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4757 + * elif isinstance(valSet, (unicode)): + * #print("unicode") + * valSetS=valSet # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + */ + __pyx_t_25 = __pyx_convert_string_from_py_std__in_string(__pyx_v_valSet); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_valSetS = __pyx_t_25; + + /* "PyCafe.pyx":4758 + * #print("unicode") + * valSetS=valSet + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setString(handle, valSetS) + * else: + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4759 + * 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":4758 + * #print("unicode") + * valSetS=valSet + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setString(handle, valSetS) + * else: + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L118; + } + __pyx_L118:; + } + } + + /* "PyCafe.pyx":4755 + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + * elif isinstance(valSet, (unicode)): # <<<<<<<<<<<<<< + * #print("unicode") + * valSetS=valSet + */ + goto __pyx_L26; + } + + /* "PyCafe.pyx":4761 + * 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 ") + */ + /*else*/ { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__225, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4762 + * 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) + */ + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__226, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4764 + * print("Input data (whether within a 'list','array.array','cython.view.memoryview','memoryview' \n\ + * or not) should be of , or ") + * type(valSet) # <<<<<<<<<<<<<< + * + * + */ + ((PyObject *)Py_TYPE(__pyx_v_valSet)); + } + __pyx_L26:; + + /* "PyCafe.pyx":4767 + * + * + * 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":4768 + * + * 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":4769 + * 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":4770 + * 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":4769 + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * else: + */ + goto __pyx_L121; + } + + /* "PyCafe.pyx":4772 + * 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), \ + */ + /*else*/ { + __pyx_v_self->_c_cafe->printStatus(__pyx_v_handle, __pyx_v_status); + } + __pyx_L121:; + + /* "PyCafe.pyx":4768 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * if handle == 0: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4773 + * 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)) + */ + __pyx_t_2 = (__pyx_v_self->haveExceptions != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4774 + * 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) + */ + __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_handle); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_handle, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyStr_FromString(__pyx_v_self->_c_cafe->getPVFromHandle(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_pv, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4775 + * 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) + * + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ec, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_et, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4775; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ei, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":4774 + * 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) + */ + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":4776 + * _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 + */ + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4776; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4776; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4773 + * 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)) + */ + } + + /* "PyCafe.pyx":4767 + * + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * if handle == 0: + */ + } + + /* "PyCafe.pyx":4778 + * raise Exception(_cyCafeException) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * #END def set(self, handlePV, valSet): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4456 + * + * ################################################################################## + * 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__cyCafeException); + __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_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":4786 + * + * ################################################################################## + * def setScalarList(self, handleList, list valList): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setScalarList(handleList, list valList)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_293setScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_293setScalarList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_valList = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_valList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setScalarList", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4786; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setScalarList") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4786; __pyx_clineno = __LINE__; goto __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_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_filename = __pyx_f[1]; __pyx_lineno = 4786; __pyx_clineno = __LINE__; goto __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_valList), (&PyList_Type), 1, "valList", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_292setScalarList(((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_292setScalarList(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; + CYTHON_UNUSED unsigned short __pyx_v_valType; + 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; + 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; + unsigned int __pyx_t_9; + int __pyx_t_10; + std::string __pyx_t_11; + double __pyx_t_12; + int __pyx_t_13; + unsigned int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setScalarList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":4787 + * ################################################################################## + * def setScalarList(self, handleList, list valList): + * cdef str _METHOD_="setScalarList(handleList, list valList)" # <<<<<<<<<<<<<< + * + * if not isinstance(handleList, (list)): + */ + __Pyx_INCREF(__pyx_kp_u_setScalarList_handleList_list_va); + __pyx_v__METHOD_ = __pyx_kp_u_setScalarList_handleList_list_va; + + /* "PyCafe.pyx":4789 + * 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") + */ + __pyx_t_1 = PyList_Check(__pyx_v_handleList); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4790 + * + * if not isinstance(handleList, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__227, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4790; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4789 + * 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") + */ + } + + /* "PyCafe.pyx":4793 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4793; __pyx_clineno = __LINE__; goto __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":4794 + * + * 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\ + */ + 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_filename = __pyx_f[1]; __pyx_lineno = 4794; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4793 + * 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":4795 + * 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") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4795; __pyx_clineno = __LINE__; goto __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":4796 + * 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") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__228, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4796; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4795 + * 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") + */ + } + __pyx_L4:; + + /* "PyCafe.pyx":4799 + * 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)) + */ + __pyx_t_5 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_valList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((__pyx_t_5 != __pyx_t_6) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4801 + * 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)) # <<<<<<<<<<<<<< + * + * nelemPrevious = [] + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_valList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + + /* "PyCafe.pyx":4800 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3); + __Pyx_GIVEREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_3); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3); + __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_3 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4800; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4799 + * 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)) + */ + } + + /* "PyCafe.pyx":4803 + * Length of handle list ", len(handleList), " does not match the length of data list ", len(valList)) + * + * nelemPrevious = [] # <<<<<<<<<<<<<< + * + * #Better with PVDataHolder + */ + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_v_nelemPrevious = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + + /* "PyCafe.pyx":4806 + * + * #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":4807 + * #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])) + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_6; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":4809 + * 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) + */ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4809; __pyx_clineno = __LINE__; goto __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_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_nelemPrevious, __pyx_t_7); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":4816 + * #do this to avoid compiler warning messages + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_6; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":4817 + * cdef vector[unsigned int] v + * for i in range(0, len(handleList)): + * v.push_back(handleList[i]) # <<<<<<<<<<<<<< + * + * #Create temporary group from handleList + */ + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + try { + __pyx_v_v.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4821 + * #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":4827 + * + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * #pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) + * #pvd[i]= PVDataHolder(1); + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_6; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":4830 + * #pvd[i].val =malloc(sizeof(CAFE_DATATYPE_UNION)) + * #pvd[i]= PVDataHolder(1); + * pvd[i].setNelem(1) # <<<<<<<<<<<<<< + * + * cdef unsigned short valType=CAFE_STRING + */ + (__pyx_v_pvd[__pyx_v_i]).setNelem(1); + } + + /* "PyCafe.pyx":4832 + * pvd[i].setNelem(1) + * + * cdef unsigned short valType=CAFE_STRING # <<<<<<<<<<<<<< + * + * for i in range(0, len(handleList)): + */ + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":4834 + * cdef unsigned short valType=CAFE_STRING + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if isinstance(valList[i],(str)): + * pvd[i].setString(valList[i]) + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_6; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":4835 + * + * for i in range(0, 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_filename = __pyx_f[1]; __pyx_lineno = 4835; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4835; __pyx_clineno = __LINE__; goto __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_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4836 + * 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]) + */ + if (unlikely(__pyx_v_valList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4836; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = __pyx_convert_string_from_py_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + (__pyx_v_pvd[__pyx_v_i]).setString(__pyx_t_11); + + /* "PyCafe.pyx":4835 + * + * for i in range(0, len(handleList)): + * if isinstance(valList[i],(str)): # <<<<<<<<<<<<<< + * pvd[i].setString(valList[i]) + * elif isinstance(valList[i],(float)): + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":4837 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4837; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyFloat_Check(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4838 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4838; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4838; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + (__pyx_v_pvd[__pyx_v_i]).setDouble(__pyx_t_12); + + /* "PyCafe.pyx":4837 + * 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_L16; + } + + /* "PyCafe.pyx":4839 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4839; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = PyLong_Check(__pyx_t_7); + __pyx_t_4 = (__pyx_t_1 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_4 = PyInt_Check(__pyx_t_7); + __pyx_t_1 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_1; + __pyx_L17_bool_binop_done:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4840 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4840; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + (__pyx_v_pvd[__pyx_v_i]).setInt(__pyx_t_13); + + /* "PyCafe.pyx":4839 + * elif isinstance(valList[i],(float)): + * pvd[i].setDouble(valList[i]) + * elif isinstance(valList[i],(long, int)): # <<<<<<<<<<<<<< + * pvd[i].setInt(valList[i]) + * else: + */ + goto __pyx_L16; + } + + /* "PyCafe.pyx":4842 + * 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__229, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __pyx_L16:; + } + + /* "PyCafe.pyx":4844 + * 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":4845 + * + * cdef int status=ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setPVArray(v, pvd) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4846 + * 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":4845 + * + * cdef int status=ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setPVArray(v, pvd) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L21; + } + __pyx_L21:; + } + } + + /* "PyCafe.pyx":4848 + * status=self._c_cafe.setPVArray(v, pvd) + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_6; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":4849 + * + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_int_1, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_1) { + + /* "PyCafe.pyx":4850 + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): + * self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) # <<<<<<<<<<<<<< + * + * #return status for individual channels + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4850; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_14 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_14 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_self->_c_cafe->setNelemToPrevious(__pyx_t_9, __pyx_t_14); + + /* "PyCafe.pyx":4849 + * + * for i in range(0, len(handleList)): + * if (nelemPrevious[i] != 1): # <<<<<<<<<<<<<< + * self._c_cafe.setNelemToPrevious(handleList[i],nelemPrevious[i]) + * + */ + } + } + + /* "PyCafe.pyx":4853 + * + * #return status for individual channels + * statusList=[] # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_statusList = ((PyObject*)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":4855 + * statusList=[] + * + * 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":4856 + * + * 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":4857 + * 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":4856 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":4855 + * statusList=[] + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4859 + * 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]) ) + */ + __pyx_t_6 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_6; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":4860 + * + * 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 = (((__pyx_v_pvd[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4861 + * 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()) + */ + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_14 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4861; __pyx_clineno = __LINE__; goto __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_14)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4861; __pyx_clineno = __LINE__; goto __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_8); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8); + __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_7); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7); + __pyx_t_8 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4862 + * 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 ("") + */ + __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4862; __pyx_clineno = __LINE__; goto __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_7); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4863 + * 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()) + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvd[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":4864 + * 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__230, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "PyCafe.pyx":4860 + * + * 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()) + */ + } + + /* "PyCafe.pyx":4865 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_7); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4865; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + + /* "PyCafe.pyx":4869 + * #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_filename = __pyx_f[1]; __pyx_lineno = 4869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_statusList); + __pyx_t_7 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4786 + * + * ################################################################################## + * def setScalarList(self, handleList, list valList): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setScalarList(handleList, list valList)" + * + */ + + /* 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_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":4877 + * + * ################################################################################## + * def setCompoundList(self, handleList, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD_="setCompoundList(handleList, list vectorList)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_295setCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_295setCompoundList(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handleList = 0; + PyObject *__pyx_v_vectorList = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handleList)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vectorList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setCompoundList", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4877; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCompoundList") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4877; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4877; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4877; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_294setCompoundList(((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_294setCompoundList(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; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + unsigned int __pyx_t_11; + std::string __pyx_t_12; + double __pyx_t_13; + int __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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setCompoundList", 0); + __Pyx_INCREF(__pyx_v_handleList); + + /* "PyCafe.pyx":4879 + * 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":4881 + * 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":4882 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_5) { + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handleList); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + } else { + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_handleList); + __Pyx_GIVEREF(__pyx_v_handleList); + PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_handleList); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4881 + * cdef str _METHOD_="setCompoundList(handleList, list vectorList)" + * + * if isinstance(handleList, (str)): # <<<<<<<<<<<<<< + * handleList=self.getHandlesFromWithinGroup(handleList) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4884 + * 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":4885 + * 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(__pyx_builtin_Exception, __pyx_tuple__231, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4885; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4884 + * 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":4888 + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4888; __pyx_clineno = __LINE__; goto __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":4889 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4889; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_handleList, __pyx_t_3); + __pyx_t_3 = 0; + + /* "PyCafe.pyx":4888 + * 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":4890 + * 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") + */ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_handleList, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyInt_Check(__pyx_t_3); + __pyx_t_7 = (__pyx_t_1 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_2 = __pyx_t_7; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_7 = PyLong_Check(__pyx_t_3); + __pyx_t_1 = (__pyx_t_7 != 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":4891 + * 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") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4891; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4890 + * 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") + */ + } + __pyx_L5:; + + /* "PyCafe.pyx":4894 + * First input argument, should be a 'list' of 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_8 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_9 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((__pyx_t_8 != __pyx_t_9) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4896 + * 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_9 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_9 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + + /* "PyCafe.pyx":4895 + * + * 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_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6); + __Pyx_GIVEREF(__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_6); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); + __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_6, 2, __pyx_kp_u_does_not_match_the_length_of_da); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4895; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":4894 + * First input argument, should be a 'list' of 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":4903 + * cdef int i + * + * for i in range(0, len(handleList)): # <<<<<<<<<<<<<< + * v.push_back(handleList[i]) + * + */ + __pyx_t_9 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":4904 + * + * 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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + try { + __pyx_v_v.push_back(__pyx_t_11); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":4908 + * #Create temporary group from handleList + * #Does group exist? + * cdef PVDataHolder * pvdata = self._c_cafe.getPVData(v) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_pvdata = __pyx_v_self->_c_cafe->getPVData(__pyx_v_v); + + /* "PyCafe.pyx":4911 + * + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_9 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":4914 + * + * #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_filename = __pyx_f[1]; __pyx_lineno = 4914; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4914; __pyx_clineno = __LINE__; goto __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":4915 + * #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_filename = __pyx_f[1]; __pyx_lineno = 4915; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setString(__pyx_t_12); + + /* "PyCafe.pyx":4914 + * + * #if not list + * if isinstance(vectorList[i],(str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":4917 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4917; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4917; __pyx_clineno = __LINE__; goto __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":4918 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4918; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setDouble(__pyx_t_13); + + /* "PyCafe.pyx":4917 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i],(float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":4920 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4920; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyLong_Check(__pyx_t_4); + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_7 = PyInt_Check(__pyx_t_4); + __pyx_t_2 = (__pyx_t_7 != 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":4921 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 4921; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setInt(__pyx_t_14); + + /* "PyCafe.pyx":4920 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i],(long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":4923 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4923; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4923; __pyx_clineno = __LINE__; goto __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":4926 + * + * #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":4927 + * #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_filename = __pyx_f[1]; __pyx_lineno = 4927; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setNelem(__pyx_t_8); + + /* "PyCafe.pyx":4930 + * #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":4931 + * #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_filename = __pyx_f[1]; __pyx_lineno = 4931; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __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":4932 + * 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":4933 + * 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":4931 + * #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":4934 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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":4935 + * 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":4934 + * 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":4936 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4936; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_k, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = PyLong_Check(__pyx_t_6); + __pyx_t_7 = (__pyx_t_2 != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_1 = __pyx_t_7; + goto __pyx_L19_bool_binop_done; + } + __pyx_t_7 = PyInt_Check(__pyx_t_6); + __pyx_t_2 = (__pyx_t_7 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L19_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":4937 + * 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":4938 + * 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":4937 + * valType=CAFE_DOUBLE + * elif isinstance(vectorList[i][k],(long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType=CAFE_LONG + * else: + */ + goto __pyx_L21; + } + + /* "PyCafe.pyx":4940 + * valType=CAFE_LONG + * else: + * valType=CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + /*else*/ { + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":4941 + * else: + * valType=CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * #check dt of first element + */ + goto __pyx_L17_break; + } + __pyx_L21:; + + /* "PyCafe.pyx":4936 + * 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":4944 + * + * #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":4945 + * #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_filename = __pyx_f[1]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __pyx_convert_vector_from_py_double(__pyx_t_6); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setVDouble(__pyx_t_16); + + /* "PyCafe.pyx":4944 + * + * #check dt of first element + * if valType==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType==CAFE_LONG: + */ + break; + + /* "PyCafe.pyx":4946 + * if valType==CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType==CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: + */ + case CAFE_LONG: + + /* "PyCafe.pyx":4947 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_17 = __pyx_convert_vector_from_py_int(__pyx_t_6); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setVInt(__pyx_t_17); + + /* "PyCafe.pyx":4946 + * if valType==CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType==CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: + */ + break; + + /* "PyCafe.pyx":4948 + * elif valType==CAFE_LONG: + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + case CAFE_STRING: + + /* "PyCafe.pyx":4949 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_vectorList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_18 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setVString(__pyx_t_18); + + /* "PyCafe.pyx":4948 + * elif valType==CAFE_LONG: + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + break; + default: break; + } + + /* "PyCafe.pyx":4923 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * #if list + */ + goto __pyx_L13; + } + + /* "PyCafe.pyx":4952 + * + * 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 , , , ") + */ + /*else*/ { + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "PyCafe.pyx":4953 + * 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 , , , ") + * + */ + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__234, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4953; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L13:; + } + + /* "PyCafe.pyx":4958 + * #endForLoop + * + * cdef int status=ICAFE_NORMAL # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setPVArray(v, pvdata) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":4959 + * + * cdef int status=ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setPVArray(v, pvdata) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":4960 + * 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":4959 + * + * cdef int status=ICAFE_NORMAL + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setPVArray(v, pvdata) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L24; + } + __pyx_L24:; + } + } + + /* "PyCafe.pyx":4963 + * + * #return status for individual channels + * statusList=[] # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_v_statusList = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4965 + * 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":4966 + * + * 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":4967 + * 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":4966 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + } + + /* "PyCafe.pyx":4965 + * statusList=[] + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + } + + /* "PyCafe.pyx":4969 + * 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]) ) + */ + __pyx_t_9 = PyObject_Length(__pyx_v_handleList); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; + + /* "PyCafe.pyx":4970 + * + * 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_2 = (((__pyx_v_pvdata[__pyx_v_i]).getStatus() != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4971 + * 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()) + */ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_handleList, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4971; __pyx_clineno = __LINE__; goto __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_11)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4971; __pyx_clineno = __LINE__; goto __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_6); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6); + __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_6 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4971; __pyx_clineno = __LINE__; goto __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":4972 + * 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 ("") + */ + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_pvdata[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4972; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4972; __pyx_clineno = __LINE__; goto __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":4973 + * 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) + */ + __pyx_v_self->_c_cafe->printStatusMessage((__pyx_v_pvdata[__pyx_v_i]).getStatus()); + + /* "PyCafe.pyx":4974 + * 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__235, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "PyCafe.pyx":4970 + * + * 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()) + */ + } + + /* "PyCafe.pyx":4976 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4976; __pyx_clineno = __LINE__; goto __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 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + + /* "PyCafe.pyx":4978 + * 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_filename = __pyx_f[1]; __pyx_lineno = 4978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4978; __pyx_clineno = __LINE__; goto __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":4877 + * + * ################################################################################## + * 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_XDECREF(__pyx_t_6); + __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":4986 + * + * ################################################################################## + * def setGroup(self, ghandleName, list vectorList): # <<<<<<<<<<<<<< + * + * cdef str _METHOD_="setGroup(self, ghandleName, list vectorList)" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_297setGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_297setGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ghandleName = 0; + PyObject *__pyx_v_vectorList = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ghandleName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vectorList)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setGroup", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4986; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setGroup") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4986; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4986; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_296setGroup(((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_296setGroup(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_CyCafeException *__pyx_v__cyCafeException = 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; + std::string __pyx_t_9; + double __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; + long __pyx_t_13; + std::vector __pyx_t_14; + std::vector __pyx_t_15; + std::vector __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + int __pyx_t_18; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setGroup", 0); + + /* "PyCafe.pyx":4988 + * 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":4990 + * cdef str _METHOD_="setGroup(self, ghandleName, list vectorList)" + * + * cdef unsigned int ghandle=0 # <<<<<<<<<<<<<< + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + */ + __pyx_v_ghandle = 0; + + /* "PyCafe.pyx":4991 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":4992 + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName # <<<<<<<<<<<<<< + * elif isinstance(ghandleName, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 4992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":4991 + * + * cdef unsigned int ghandle=0 + * if isinstance(ghandleName, (int,long)) == 1: # <<<<<<<<<<<<<< + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4993 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_ghandleName); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":4994 + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: + * ghandle=self.checkForGroupHandle(ghandleName) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 4994; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4994; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_ghandle = __pyx_t_4; + + /* "PyCafe.pyx":4993 + * if isinstance(ghandleName, (int,long)) == 1: + * ghandle=ghandleName + * elif isinstance(ghandleName, (str)) == 1: # <<<<<<<<<<<<<< + * ghandle=self.checkForGroupHandle(ghandleName) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":4996 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":4998 + * _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 + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4998; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 4998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5002 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * ### + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":5003 + * + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) # <<<<<<<<<<<<<< + * ### + * #print ("len V", len(vectorList), " npv=", pvg.getNPV()) + */ + __pyx_v_self->_c_cafe->groupAttach(__pyx_v_ghandle, __pyx_v_pvg); + } + + /* "PyCafe.pyx":5002 + * cdef PVGroup pvg + * + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.groupAttach(ghandle, pvg) + * ### + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5007 + * #print ("len V", len(vectorList), " npv=", pvg.getNPV()) + * + * cdef PVDataHolder * pvdata = pvg.getPVData(); # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_pvdata = __pyx_v_pvg.getPVData(); + + /* "PyCafe.pyx":5010 + * + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_vectorList); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "PyCafe.pyx":5013 + * + * #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_filename = __pyx_f[1]; __pyx_lineno = 5013; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __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":5014 + * #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_filename = __pyx_f[1]; __pyx_lineno = 5014; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setString(__pyx_t_9); + + /* "PyCafe.pyx":5013 + * + * #if not list + * if isinstance(vectorList[i],(str)): # <<<<<<<<<<<<<< + * pvdata[i].setString(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":5016 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5016; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyFloat_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5017 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5017; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setDouble(__pyx_t_10); + + /* "PyCafe.pyx":5016 + * pvdata[i].setString(vectorList[i]) + * + * elif isinstance(vectorList[i],(float)): # <<<<<<<<<<<<<< + * pvdata[i].setDouble(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":5019 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5019; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __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_L12_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_L12_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":5020 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5020; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setInt(__pyx_t_11); + + /* "PyCafe.pyx":5019 + * pvdata[i].setDouble(vectorList[i]) + * + * elif isinstance(vectorList[i],(long, int)): # <<<<<<<<<<<<<< + * pvdata[i].setInt(vectorList[i]) + * + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":5022 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5022; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyList_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5025 + * + * #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":5026 + * #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_filename = __pyx_f[1]; __pyx_lineno = 5026; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setNelem(__pyx_t_12); + + /* "PyCafe.pyx":5029 + * #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_13 = 0; __pyx_t_13 < 1; __pyx_t_13+=1) { + __pyx_v_k = __pyx_t_13; + + /* "PyCafe.pyx":5030 + * #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_filename = __pyx_f[1]; __pyx_lineno = 5030; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5030; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __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":5031 + * 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":5032 + * 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":5030 + * #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":5033 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5033; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5033; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_2 = PyFloat_Check(__pyx_t_5); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5034 + * 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":5033 + * 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":5035 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5035; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5035; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __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_L17_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_L17_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":5036 + * 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":5037 + * 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":5036 + * valType=CAFE_DOUBLE + * elif isinstance(vectorList[i][k],(long, int)): + * if valType != CAFE_DOUBLE: # <<<<<<<<<<<<<< + * valType=CAFE_LONG + * else: + */ + goto __pyx_L19; + } + + /* "PyCafe.pyx":5039 + * valType=CAFE_LONG + * else: + * valType=CAFE_STRING # <<<<<<<<<<<<<< + * break + * + */ + /*else*/ { + __pyx_v_valType = CAFE_STRING; + + /* "PyCafe.pyx":5040 + * else: + * valType=CAFE_STRING + * break # <<<<<<<<<<<<<< + * + * #check dt of first element + */ + goto __pyx_L15_break; + } + __pyx_L19:; + + /* "PyCafe.pyx":5035 + * 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":5043 + * + * #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":5044 + * #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_filename = __pyx_f[1]; __pyx_lineno = 5044; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = __pyx_convert_vector_from_py_double(__pyx_t_6); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setVDouble(__pyx_t_14); + + /* "PyCafe.pyx":5043 + * + * #check dt of first element + * if valType==CAFE_DOUBLE: # <<<<<<<<<<<<<< + * pvdata[i].setVDouble(vectorList[i]) + * elif valType==CAFE_LONG: + */ + break; + + /* "PyCafe.pyx":5045 + * if valType==CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType==CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: + */ + case CAFE_LONG: + + /* "PyCafe.pyx":5046 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5046; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_15 = __pyx_convert_vector_from_py_int(__pyx_t_6); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setVInt(__pyx_t_15); + + /* "PyCafe.pyx":5045 + * if valType==CAFE_DOUBLE: + * pvdata[i].setVDouble(vectorList[i]) + * elif valType==CAFE_LONG: # <<<<<<<<<<<<<< + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: + */ + break; + + /* "PyCafe.pyx":5047 + * elif valType==CAFE_LONG: + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + case CAFE_STRING: + + /* "PyCafe.pyx":5048 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5048; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_16 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + (__pyx_v_pvdata[__pyx_v_i]).setVString(__pyx_t_16); + + /* "PyCafe.pyx":5047 + * elif valType==CAFE_LONG: + * pvdata[i].setVInt (vectorList[i]) + * elif valType==CAFE_STRING: # <<<<<<<<<<<<<< + * pvdata[i].setVString(vectorList[i]) + * + */ + break; + default: break; + } + + /* "PyCafe.pyx":5022 + * pvdata[i].setInt(vectorList[i]) + * + * elif isinstance(vectorList[i], (list)): # <<<<<<<<<<<<<< + * + * #if list + */ + goto __pyx_L11; + } + + /* "PyCafe.pyx":5052 + * 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 , , , ") + */ + /*else*/ { + __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__pyx_v_vectorList == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5052; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = PyTuple_New(4); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_17); + __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_17, 0, __pyx_kp_u_PyCafe_def_setGroup_Unusual_data); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_6); + __Pyx_INCREF(__pyx_kp_u__236); + __Pyx_GIVEREF(__pyx_kp_u__236); + PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_kp_u__236); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_5))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_t_5))); + PyTuple_SET_ITEM(__pyx_t_17, 3, ((PyObject *)Py_TYPE(__pyx_t_5))); + __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_17, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "PyCafe.pyx":5053 + * + * 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 , , , ") + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__237, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5053; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L11:; + } + + /* "PyCafe.pyx":5058 + * #endForLoop + * + * cdef int status=ICAFE_NORMAL # <<<<<<<<<<<<<< + * statusList=[] + * pvg.setPVData(pvdata) + */ + __pyx_v_status = ICAFE_NORMAL; + + /* "PyCafe.pyx":5059 + * + * cdef int status=ICAFE_NORMAL + * statusList=[] # <<<<<<<<<<<<<< + * pvg.setPVData(pvdata) + * + */ + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_statusList = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "PyCafe.pyx":5060 + * cdef int status=ICAFE_NORMAL + * statusList=[] + * pvg.setPVData(pvdata) # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_pvg.setPVData(__pyx_v_pvdata); + + /* "PyCafe.pyx":5063 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupSet(ghandle, pvg) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":5064 + * + * 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":5063 + * + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.groupSet(ghandle, pvg) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L22; + } + __pyx_L22:; + } + } + + /* "PyCafe.pyx":5068 + * 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":5069 + * + * 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":5070 + * 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":5069 + * + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * #do not raise exception + */ + } + + /* "PyCafe.pyx":5074 + * #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":5076 + * pvd=pvg.getPVData() + * + * for i in range(0, pvg.getNPV()): # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * else: + */ + __pyx_t_4 = __pyx_v_pvg.getNPV(); + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_4; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "PyCafe.pyx":5077 + * + * for i in range(0, pvg.getNPV()): + * statusList.append(pvd[i].getStatus()) # <<<<<<<<<<<<<< + * else: + * statusList.append(status) + */ + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_pvd[__pyx_v_i]).getStatus()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_5); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + + /* "PyCafe.pyx":5068 + * cdef PVDataHolder * pvd + * + * if status !=ICAFE_NORMAL: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(status) + */ + goto __pyx_L23; + } + + /* "PyCafe.pyx":5079 + * statusList.append(pvd[i].getStatus()) + * else: + * statusList.append(status) # <<<<<<<<<<<<<< + * + * return status, statusList + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_statusList, __pyx_t_5); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __pyx_L23:; + + /* "PyCafe.pyx":5081 + * statusList.append(status) + * + * return status, statusList # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_17); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5); + __Pyx_INCREF(__pyx_v_statusList); + __Pyx_GIVEREF(__pyx_v_statusList); + PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_v_statusList); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_17; + __pyx_t_17 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":4986 + * + * ################################################################################## + * 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_17); + __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__cyCafeException); + __Pyx_XDECREF(__pyx_v_statusList); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5089 + * + * ################################################################################## + * 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_299setAndMatchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_299setAndMatchMany(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 4: + if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 5: + if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatchMany", 1, 6, 6, 5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAndMatchMany") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_valSet), (&PyList_Type), 1, "valSet", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_298setAndMatchMany(((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_298setAndMatchMany(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_CyCafeException *__pyx_v__cyCafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + unsigned int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + double __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setAndMatchMany", 0); + + /* "PyCafe.pyx":5090 + * ################################################################################## + * 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)): + */ + __Pyx_INCREF(__pyx_kp_u_setAndMatchMany_list_handlePVSet); + __pyx_v__METHOD_ = __pyx_kp_u_setAndMatchMany_list_handlePVSet; + + /* "PyCafe.pyx":5092 + * 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") + */ + __pyx_t_1 = PyList_Check(__pyx_v_handlePVSet); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5093 + * + * if not isinstance(handlePVSet, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__238, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5093; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5092 + * 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") + */ + } + + /* "PyCafe.pyx":5096 + * 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") + */ + __pyx_t_2 = PyList_Check(__pyx_v_valSet); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5097 + * + * if not isinstance(valSet, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Second input argument, should be of scalar values") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__239, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5097; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5096 + * 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") + */ + } + + /* "PyCafe.pyx":5100 + * 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") + */ + __pyx_t_1 = PyList_Check(__pyx_v_handlePVMatch); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5101 + * + * if not isinstance(handlePVMatch, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Third input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__240, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5101; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5100 + * 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") + */ + } + + /* "PyCafe.pyx":5104 + * Third input argument, should be of handles or PVs") + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v_valSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((__pyx_t_4 != __pyx_t_5) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5105 + * + * 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_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__241, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5105; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5104 + * Third input argument, should be of handles or PVs") + * + * 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":5108 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((__pyx_t_5 != __pyx_t_4) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5109 + * + * 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_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__242, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5109; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5108 + * 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":5114 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handleSet.reserve(__pyx_t_4); + + /* "PyCafe.pyx":5117 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handleMatch.reserve(__pyx_t_4); + + /* "PyCafe.pyx":5120 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_valSetV.reserve(__pyx_t_4); + + /* "PyCafe.pyx":5122 + * valSetV.reserve(len(valSet)) + * + * for i in range(0, len(handlePVSet)): # <<<<<<<<<<<<<< + * if isinstance(handlePVSet[i], (int,long)) == 1: + * handleSet.push_back(handlePVSet[i]) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_handlePVSet); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":5123 + * + * 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: + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5123; __pyx_clineno = __LINE__; goto __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_L11_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_L11_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5124 + * 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)) + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":5123 + * + * 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: + */ + goto __pyx_L10; + } + + /* "PyCafe.pyx":5125 + * 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: + */ + if (unlikely(__pyx_v_handlePVSet == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5125; __pyx_clineno = __LINE__; goto __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5126 + * handleSet.push_back(handlePVSet[i]) + * elif isinstance(handlePVSet[i], (str)) == 1: + * handleSet.push_back(self.checkForHandle(handlePVSet)) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVSet), 0, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_handleSet.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":5125 + * 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: + */ + goto __pyx_L10; + } + + /* "PyCafe.pyx":5128 + * 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) + */ + /*else*/ { + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ei, __pyx_kp_u_ThandlePVSet_list_member_should) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":5130 + * _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)): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5130; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L10:; + } + + /* "PyCafe.pyx":5132 + * raise Exception(_cyCafeException) + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int,long)) == 1: + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":5133 + * + * 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: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5133; __pyx_clineno = __LINE__; goto __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_L16_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_L16_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5134 + * 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)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":5133 + * + * 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: + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":5135 + * 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: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5135; __pyx_clineno = __LINE__; goto __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5136 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)) == 1: + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVMatch), 0, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":5135 + * 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: + */ + goto __pyx_L15; + } + + /* "PyCafe.pyx":5138 + * 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) + */ + /*else*/ { + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ei, __pyx_kp_u_handleMatch_list_member_should_b) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":5140 + * _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)): + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5140; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L15:; + } + + /* "PyCafe.pyx":5142 + * raise Exception(_cyCafeException) + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "PyCafe.pyx":5143 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":5147 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setAndMatchMany(handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":5148 + * + * with nogil: + * status=self._c_cafe.setAndMatchMany(handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __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":5147 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setAndMatchMany(handleSet, valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L22; + } + __pyx_L22:; + } + } + + /* "PyCafe.pyx":5150 + * 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) + */ + __pyx_t_2 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5151 + * + * 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_t_2 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5152 + * 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":5151 + * + * 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) + */ + } + + /* "PyCafe.pyx":5153 + * 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 + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5153; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_Exception, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5150 + * 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) + */ + } + + /* "PyCafe.pyx":5155 + * raise Exception("EXCEPTION RAISED in PyCafe def setAndMatchMany. Status = %d" %status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5089 + * + * ################################################################################## + * 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_3); + __Pyx_XDECREF(__pyx_t_8); + __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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5160 + * + * ################################################################################## + * 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)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_301setAndMatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_301setAndMatch(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePVSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 4: + if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 5: + if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setAndMatch", 1, 6, 6, 5); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAndMatch") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5160; __pyx_clineno = __LINE__; goto __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_300setAndMatch(((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_300setAndMatch(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_CyCafeException *__pyx_v__cyCafeException = 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setAndMatch", 0); + + /* "PyCafe.pyx":5161 + * ################################################################################## + * 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 + */ + __Pyx_INCREF(__pyx_kp_u_setAndMatch_handlePVSet_double_v); + __pyx_v__METHOD_ = __pyx_kp_u_setAndMatch_handlePVSet_double_v; + + /* "PyCafe.pyx":5163 + * 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 + */ + __pyx_v_handleSet = 0; + + /* "PyCafe.pyx":5164 + * + * cdef unsigned int handleSet=0 + * if isinstance(handlePVSet, (int,long)) == 1: # <<<<<<<<<<<<<< + * handleSet=handlePVSet + * elif isinstance(handlePVSet, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5165 + * cdef unsigned int handleSet=0 + * if isinstance(handlePVSet, (int,long)) == 1: + * handleSet=handlePVSet # <<<<<<<<<<<<<< + * elif isinstance(handlePVSet, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 5165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handleSet = __pyx_t_4; + + /* "PyCafe.pyx":5164 + * + * cdef unsigned int handleSet=0 + * if isinstance(handlePVSet, (int,long)) == 1: # <<<<<<<<<<<<<< + * handleSet=handlePVSet + * elif isinstance(handlePVSet, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5166 + * if isinstance(handlePVSet, (int,long)) == 1: + * handleSet=handlePVSet + * elif isinstance(handlePVSet, (str)) == 1: # <<<<<<<<<<<<<< + * handleSet=self.checkForHandle(handlePVSet) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVSet); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5167 + * handleSet=handlePVSet + * elif isinstance(handlePVSet, (str)) == 1: + * handleSet=self.checkForHandle(handlePVSet) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5167; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5167; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handleSet = __pyx_t_4; + + /* "PyCafe.pyx":5166 + * if isinstance(handlePVSet, (int,long)) == 1: + * handleSet=handlePVSet + * elif isinstance(handlePVSet, (str)) == 1: # <<<<<<<<<<<<<< + * handleSet=self.checkForHandle(handlePVSet) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5169 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5171 + * _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 + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5173 + * raise Exception(_cyCafeException) + * + * cdef unsigned int handleMatch=0 # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch, (int,long)) == 1: + * handleMatch=handlePVMatch + */ + __pyx_v_handleMatch = 0; + + /* "PyCafe.pyx":5174 + * + * cdef unsigned int handleMatch=0 + * if isinstance(handlePVMatch, (int,long)) == 1: # <<<<<<<<<<<<<< + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5175 + * cdef unsigned int handleMatch=0 + * if isinstance(handlePVMatch, (int,long)) == 1: + * handleMatch=handlePVMatch # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 5175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":5174 + * + * cdef unsigned int handleMatch=0 + * if isinstance(handlePVMatch, (int,long)) == 1: # <<<<<<<<<<<<<< + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":5176 + * if isinstance(handlePVMatch, (int,long)) == 1: + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: # <<<<<<<<<<<<<< + * handleMatch=self.checkForHandle(handlePVMatch) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVMatch); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5177 + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: + * handleMatch=self.checkForHandle(handlePVMatch) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5177; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5177; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":5176 + * if isinstance(handlePVMatch, (int,long)) == 1: + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: # <<<<<<<<<<<<<< + * handleMatch=self.checkForHandle(handlePVMatch) + * else: + */ + goto __pyx_L6; + } + + /* "PyCafe.pyx":5179 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_Third_input_argument_should_be_t) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5181 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="Third input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * cdef int status + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5181; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L6:; + + /* "PyCafe.pyx":5185 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setAndMatch(handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":5186 + * + * with nogil: + * status=self._c_cafe.setAndMatch(handleSet, valSet, handleMatch, tolerance, timeout, printFlag) # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __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":5185 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.setAndMatch(handleSet, valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L11; + } + __pyx_L11:; + } + } + + /* "PyCafe.pyx":5188 + * 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) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5189 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5190 + * 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":5189 + * + * 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) + */ + } + + /* "PyCafe.pyx":5191 + * 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 + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5191; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5191; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5188 + * 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) + */ + } + + /* "PyCafe.pyx":5193 + * raise Exception("EXCEPTION RAISED in PyCafe def setAndMatch. Status = %d" %status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5160 + * + * ################################################################################## + * 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)" + * + */ + + /* 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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5200 + * + * ################################################################################## + * 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)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_303matchMany(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_303matchMany(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 4: + if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("matchMany", 1, 5, 5, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matchMany") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_handlePVMatch), (&PyList_Type), 1, "handlePVMatch", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_pf_6PyCafe_6CyCafe_302matchMany(((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_302matchMany(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_CyCafeException *__pyx_v__cyCafeException = NULL; + int __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + unsigned int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + double __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("matchMany", 0); + + /* "PyCafe.pyx":5201 + * ################################################################################## + * 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)): + */ + __Pyx_INCREF(__pyx_kp_u_matchMany_self_list_valSet_list); + __pyx_v__METHOD_ = __pyx_kp_u_matchMany_self_list_valSet_list; + + /* "PyCafe.pyx":5203 + * 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") + */ + __pyx_t_1 = PyList_Check(__pyx_v_valSet); + __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5204 + * + * if not isinstance(valSet, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def matchMany. \n\ # <<<<<<<<<<<<<< + * Second input argument, should be of scalar values") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__243, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5204; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5203 + * 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") + */ + } + + /* "PyCafe.pyx":5207 + * 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") + */ + __pyx_t_2 = PyList_Check(__pyx_v_handlePVMatch); + __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5208 + * + * if not isinstance(handlePVMatch, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def matchMany. \n\ # <<<<<<<<<<<<<< + * Third input argument, should be of handles or PVs") + * + */ + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__244, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5208; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5207 + * 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") + */ + } + + /* "PyCafe.pyx":5211 + * Third input argument, should be of handles or PVs") + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_4 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((__pyx_t_4 != __pyx_t_5) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5212 + * + * 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_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__245, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5211 + * Third input argument, should be of handles or PVs") + * + * 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":5217 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handleMatch.reserve(__pyx_t_5); + + /* "PyCafe.pyx":5220 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_valSetV.reserve(__pyx_t_5); + + /* "PyCafe.pyx":5222 + * valSetV.reserve(len(valSet)) + * + * for i in range(0, len(handlePVMatch)): # <<<<<<<<<<<<<< + * if isinstance(handlePVMatch[i], (int,long)) == 1: + * handleMatch.push_back(handlePVMatch[i]) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_handlePVMatch); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_5; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":5223 + * + * 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: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5223; __pyx_clineno = __LINE__; goto __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_L9_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_L9_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = ((__pyx_t_1 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5224 + * 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)) + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":5223 + * + * 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: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":5225 + * 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: + */ + if (unlikely(__pyx_v_handlePVMatch == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_handlePVMatch, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5225; __pyx_clineno = __LINE__; goto __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 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5226 + * handleMatch.push_back(handlePVMatch[i]) + * elif isinstance(handlePVMatch[i], (str)) == 1: + * handleMatch.push_back(self.checkForHandle(handlePVMatch)) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_6PyCafe_CyCafe *)__pyx_v_self->__pyx_vtab)->checkForHandle(__pyx_v_self, ((PyObject*)__pyx_v_handlePVMatch), 0, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_handleMatch.push_back(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "PyCafe.pyx":5225 + * 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: + */ + goto __pyx_L8; + } + + /* "PyCafe.pyx":5228 + * 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) + */ + /*else*/ { + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "PyCafe.pyx":5230 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5230; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L8:; + } + + /* "PyCafe.pyx":5233 + * + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_valSet); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_5; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "PyCafe.pyx":5234 + * + * 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_filename = __pyx_f[1]; __pyx_lineno = 5234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_valSet, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + try { + __pyx_v_valSetV.push_back(__pyx_t_9); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + + /* "PyCafe.pyx":5238 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.matchMany( valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":5239 + * + * with nogil: + * status=self._c_cafe.matchMany( valSetV, handleMatch, tolerance, timeout, printFlag) # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __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":5238 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.matchMany( valSetV, handleMatch, tolerance, timeout, printFlag) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L15; + } + __pyx_L15:; + } + } + + /* "PyCafe.pyx":5241 + * 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) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5242 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5243 + * 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":5242 + * + * 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) + */ + } + + /* "PyCafe.pyx":5244 + * 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 + */ + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5244; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_Exception, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5241 + * 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) + */ + } + + /* "PyCafe.pyx":5246 + * raise Exception("EXCEPTION RAISED in PyCafe def matchMany. Status = %d" %status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5200 + * + * ################################################################################## + * 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)" + * + */ + + /* 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_8); + __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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5251 + * + * ################################################################################## + * 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_305match(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_305match(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_valSet)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePVMatch)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tolerance)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 3); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 4: + if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_printFlag)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("match", 1, 5, 5, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "match") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_timeout = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_timeout == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_printFlag = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_printFlag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5251; __pyx_clineno = __LINE__; goto __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_304match(((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_304match(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; + struct __pyx_obj_6PyCafe_CyCafeException *__pyx_v__cyCafeException = NULL; + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("match", 0); + + /* "PyCafe.pyx":5252 + * ################################################################################## + * 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":5254 + * 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 + */ + __pyx_v_handleMatch = 0; + + /* "PyCafe.pyx":5255 + * + * cdef unsigned int handleMatch=0 + * if isinstance(handlePVMatch, (int,long)) == 1: # <<<<<<<<<<<<<< + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: + */ + __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 == 1) != 0); + if (__pyx_t_2) { + + /* "PyCafe.pyx":5256 + * cdef unsigned int handleMatch=0 + * if isinstance(handlePVMatch, (int,long)) == 1: + * handleMatch=handlePVMatch # <<<<<<<<<<<<<< + * elif isinstance(handlePVMatch, (str)) == 1: + * 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_filename = __pyx_f[1]; __pyx_lineno = 5256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":5255 + * + * cdef unsigned int handleMatch=0 + * if isinstance(handlePVMatch, (int,long)) == 1: # <<<<<<<<<<<<<< + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5257 + * if isinstance(handlePVMatch, (int,long)) == 1: + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: # <<<<<<<<<<<<<< + * handleMatch=self.checkForHandle(handlePVMatch) + * else: + */ + __pyx_t_2 = PyUnicode_Check(__pyx_v_handlePVMatch); + __pyx_t_1 = ((__pyx_t_2 == 1) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5258 + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: + * handleMatch=self.checkForHandle(handlePVMatch) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5258; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5258; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handleMatch = __pyx_t_4; + + /* "PyCafe.pyx":5257 + * if isinstance(handlePVMatch, (int,long)) == 1: + * handleMatch=handlePVMatch + * elif isinstance(handlePVMatch, (str)) == 1: # <<<<<<<<<<<<<< + * handleMatch=self.checkForHandle(handlePVMatch) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5260 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5262 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * cdef int status + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5262; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5266 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.match(valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":5267 + * + * with nogil: + * status=self._c_cafe.match(valSet, handleMatch, tolerance, timeout, printFlag) # <<<<<<<<<<<<<< + * + * if status !=ICAFE_NORMAL: + */ + __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":5266 + * cdef int status + * + * with nogil: # <<<<<<<<<<<<<< + * status=self._c_cafe.match(valSet, handleMatch, tolerance, timeout, printFlag) + * + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L8; + } + __pyx_L8:; + } + } + + /* "PyCafe.pyx":5269 + * 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) + */ + __pyx_t_1 = ((__pyx_v_status != ICAFE_NORMAL) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5270 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5271 + * 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":5270 + * + * 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) + */ + } + + /* "PyCafe.pyx":5272 + * 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 + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_m_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5272; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5269 + * 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) + */ + } + + /* "PyCafe.pyx":5274 + * raise Exception("EXCEPTION RAISED in PyCafe def match. Status = %d" %status) + * + * return status # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5251 + * + * ################################################################################## + * 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_AddTraceback("PyCafe.CyCafe.match", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD_); + __Pyx_XDECREF((PyObject *)__pyx_v__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5279 + * + * ################################################################################## + * def setNelemCtrl(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelemCtrl(self, handlePV, unsigned int nelem)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_307setNelemCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_307setNelemCtrl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned int __pyx_v_nelem; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nelem_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelemCtrl", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5279; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelemCtrl") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5279; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5279; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5279; __pyx_clineno = __LINE__; goto __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_306setNelemCtrl(((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_306setNelemCtrl(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_CyCafeException *__pyx_v__cyCafeException = 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setNelemCtrl", 0); + + /* "PyCafe.pyx":5280 + * ################################################################################## + * def setNelemCtrl(self, handlePV, unsigned int nelem): + * cdef str _METHOD_="setNelemCtrl(self, handlePV, unsigned int nelem)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_kp_u_setNelemCtrl_self_handlePV_unsig); + __pyx_v__METHOD_ = __pyx_kp_u_setNelemCtrl_self_handlePV_unsig; + + /* "PyCafe.pyx":5282 + * cdef str _METHOD_="setNelemCtrl(self, handlePV, unsigned int nelem)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)): + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5283 + * + * 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":5284 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5283 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5285 + * 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":5286 + * handle=handlePV + * elif isinstance(handlePV, (str)): + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5286; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5286; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5285 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5288 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5290 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * if handle == 0: + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5290; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5292 + * raise Exception(_cyCafeException) + * + * 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":5293 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5294 + * 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":5293 + * + * 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") + */ + } + + /* "PyCafe.pyx":5295 + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") # <<<<<<<<<<<<<< + * + * #returns nelem + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__246, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5295; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5292 + * raise Exception(_cyCafeException) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":5298 + * + * #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_filename = __pyx_f[1]; __pyx_lineno = 5298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5279 + * + * ################################################################################## + * def setNelemCtrl(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelemCtrl(self, 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_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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5304 + * + * ################################################################################## + * def setNelem(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelem(self, handlePV, unsigned int nelem)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_309setNelem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_309setNelem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + unsigned int __pyx_v_nelem; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nelem_2)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelem", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelem") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5304; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5304; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5304; __pyx_clineno = __LINE__; goto __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_308setNelem(((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_308setNelem(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_CyCafeException *__pyx_v__cyCafeException = 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setNelem", 0); + + /* "PyCafe.pyx":5305 + * ################################################################################## + * def setNelem(self, handlePV, unsigned int nelem): + * cdef str _METHOD_="setNelem(self, handlePV, unsigned int nelem)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_kp_u_setNelem_self_handlePV_unsigned); + __pyx_v__METHOD_ = __pyx_kp_u_setNelem_self_handlePV_unsigned; + + /* "PyCafe.pyx":5307 + * cdef str _METHOD_="setNelem(self, handlePV, unsigned int nelem)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)): + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5308 + * + * 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":5309 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5308 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5310 + * 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":5311 + * handle=handlePV + * elif isinstance(handlePV, (str)): + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5311; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5311; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5310 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5313 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5315 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * if handle == 0: + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5315; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5317 + * raise Exception(_cyCafeException) + * + * 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":5318 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5319 + * 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":5318 + * + * 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") + */ + } + + /* "PyCafe.pyx":5320 + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") # <<<<<<<<<<<<<< + * + * #returns nelem + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__247, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5320; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5317 + * raise Exception(_cyCafeException) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":5323 + * + * #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_filename = __pyx_f[1]; __pyx_lineno = 5323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5304 + * + * ################################################################################## + * def setNelem(self, handlePV, unsigned int nelem): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelem(self, 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_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__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5326 + * + * ################################################################################## + * def setNelemToNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelemToNative(self, handlePV)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_311setNelemToNative(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_311setNelemToNative(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_310setNelemToNative(((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_310setNelemToNative(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_CyCafeException *__pyx_v__cyCafeException = 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setNelemToNative", 0); + + /* "PyCafe.pyx":5327 + * ################################################################################## + * def setNelemToNative(self, handlePV): + * cdef str _METHOD_="setNelemToNative(self, handlePV)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_kp_u_setNelemToNative_self_handlePV); + __pyx_v__METHOD_ = __pyx_kp_u_setNelemToNative_self_handlePV; + + /* "PyCafe.pyx":5329 + * cdef str _METHOD_="setNelemToNative(self, handlePV)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)): + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5330 + * + * 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":5331 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5330 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5332 + * 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":5333 + * handle=handlePV + * elif isinstance(handlePV, (str)): + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5333; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5333; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5332 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5335 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5337 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * if handle == 0: + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5337; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5339 + * raise Exception(_cyCafeException) + * + * 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":5340 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5341 + * 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":5340 + * + * 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") + */ + } + + /* "PyCafe.pyx":5342 + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") # <<<<<<<<<<<<<< + * + * #returns nelem + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__248, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5342; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5339 + * raise Exception(_cyCafeException) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":5345 + * + * #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_filename = __pyx_f[1]; __pyx_lineno = 5345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5326 + * + * ################################################################################## + * def setNelemToNative(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelemToNative(self, 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.setNelemToNative", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD_); + __Pyx_XDECREF((PyObject *)__pyx_v__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5349 + * ################################################################################## + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelemToRetrieveFromCacheToOne(self, handlePV)" + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_313setNelemToRetrieveFromCacheToOne(PyObject *__pyx_v_self, PyObject *__pyx_v_handlePV); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_313setNelemToRetrieveFromCacheToOne(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_312setNelemToRetrieveFromCacheToOne(((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_312setNelemToRetrieveFromCacheToOne(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_CyCafeException *__pyx_v__cyCafeException = 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCacheToOne", 0); + + /* "PyCafe.pyx":5350 + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): + * cdef str _METHOD_="setNelemToRetrieveFromCacheToOne(self, handlePV)" # <<<<<<<<<<<<<< + * + * cdef unsigned int handle=0 + */ + __Pyx_INCREF(__pyx_kp_u_setNelemToRetrieveFromCacheToOne); + __pyx_v__METHOD_ = __pyx_kp_u_setNelemToRetrieveFromCacheToOne; + + /* "PyCafe.pyx":5352 + * cdef str _METHOD_="setNelemToRetrieveFromCacheToOne(self, handlePV)" + * + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)): + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5353 + * + * 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":5354 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5353 + * + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5355 + * 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":5356 + * handle=handlePV + * elif isinstance(handlePV, (str)): + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * _cyCafeException = CyCafeException(_type='cafe',_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_filename = __pyx_f[1]; __pyx_lineno = 5356; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5356; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5355 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5358 + * 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) + */ + /*else*/ { + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_u_cafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_source, __pyx_v__METHOD_) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_ei, __pyx_kp_u_First_input_argument_should_be_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6PyCafe_CyCafeException), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v__cyCafeException = ((struct __pyx_obj_6PyCafe_CyCafeException *)__pyx_t_6); + __pyx_t_6 = 0; + + /* "PyCafe.pyx":5360 + * _cyCafeException = CyCafeException(_type='cafe',_source=_METHOD_, \ + * _ei="First input argument, should be if handle, else if PV") + * raise Exception(_cyCafeException) # <<<<<<<<<<<<<< + * + * if handle == 0: + */ + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_v__cyCafeException)); + __Pyx_GIVEREF(((PyObject *)__pyx_v__cyCafeException)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v__cyCafeException)); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5360; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5360; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5362 + * raise Exception(_cyCafeException) + * + * 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":5363 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5364 + * 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":5363 + * + * 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") + */ + } + + /* "PyCafe.pyx":5365 + * 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 + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__249, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5365; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5362 + * raise Exception(_cyCafeException) + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":5368 + * + * #returns previous nelem + * return self._c_cafe.setNelemToRetrieveFromCacheToOne(handle) # <<<<<<<<<<<<<< + * + * ################################################################################## + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToRetrieveFromCacheToOne(__pyx_v_handle)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5349 + * ################################################################################## + * + * def setNelemToRetrieveFromCacheToOne(self, handlePV): # <<<<<<<<<<<<<< + * cdef str _METHOD_="setNelemToRetrieveFromCacheToOne(self, 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.setNelemToRetrieveFromCacheToOne", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__METHOD_); + __Pyx_XDECREF((PyObject *)__pyx_v__cyCafeException); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5371 + * + * ################################################################################## + * def setNelemToRetrieveFromCache(self, handlePV, netrfc): # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_315setNelemToRetrieveFromCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_315setNelemToRetrieveFromCache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_handlePV = 0; + PyObject *__pyx_v_netrfc = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_handlePV)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_netrfc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("setNelemToRetrieveFromCache", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5371; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNelemToRetrieveFromCache") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5371; __pyx_clineno = __LINE__; goto __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 = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("setNelemToRetrieveFromCache", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5371; __pyx_clineno = __LINE__; goto __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_314setNelemToRetrieveFromCache(((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_314setNelemToRetrieveFromCache(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self, PyObject *__pyx_v_handlePV, PyObject *__pyx_v_netrfc) { + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setNelemToRetrieveFromCache", 0); + + /* "PyCafe.pyx":5372 + * ################################################################################## + * def setNelemToRetrieveFromCache(self, handlePV, netrfc): + * cdef unsigned int handle=0 # <<<<<<<<<<<<<< + * if isinstance(handlePV, (int,long)): + * handle=handlePV + */ + __pyx_v_handle = 0; + + /* "PyCafe.pyx":5373 + * def setNelemToRetrieveFromCache(self, handlePV, netrfc): + * 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":5374 + * 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_filename = __pyx_f[1]; __pyx_lineno = 5374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5373 + * def setNelemToRetrieveFromCache(self, handlePV, netrfc): + * cdef unsigned int handle=0 + * if isinstance(handlePV, (int,long)): # <<<<<<<<<<<<<< + * handle=handlePV + * elif isinstance(handlePV, (str)): + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5375 + * 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":5376 + * handle=handlePV + * elif isinstance(handlePV, (str)): + * handle=self.checkForHandle(handlePV) # <<<<<<<<<<<<<< + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def set. \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_filename = __pyx_f[1]; __pyx_lineno = 5376; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5376; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_handle = __pyx_t_4; + + /* "PyCafe.pyx":5375 + * if isinstance(handlePV, (int,long)): + * handle=handlePV + * elif isinstance(handlePV, (str)): # <<<<<<<<<<<<<< + * handle=self.checkForHandle(handlePV) + * else: + */ + goto __pyx_L3; + } + + /* "PyCafe.pyx":5378 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def set. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__250, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5378; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L3:; + + /* "PyCafe.pyx":5382 + * + * + * 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":5383 + * + * 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_t_1 = ((__pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL >= __pyx_v_6PyCafe_PYCAFE_PRINT_LOW) != 0); + if (__pyx_t_1) { + + /* "PyCafe.pyx":5384 + * 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":5383 + * + * 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") + */ + } + + /* "PyCafe.pyx":5385 + * 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 + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__251, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5385; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 5385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "PyCafe.pyx":5382 + * + * + * if handle == 0: # <<<<<<<<<<<<<< + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + */ + } + + /* "PyCafe.pyx":5388 + * + * #returns new nelem + * return self._c_cafe.setNelemToRetrieveFromCacheToPrevious(handle, netrfc) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_netrfc); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->_c_cafe->setNelemToRetrieveFromCacheToPrevious(__pyx_v_handle, __pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "PyCafe.pyx":5371 + * + * ################################################################################## + * def setNelemToRetrieveFromCache(self, handlePV, netrfc): # <<<<<<<<<<<<<< + * cdef unsigned int handle=0 + * if isinstance(handlePV, (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_AddTraceback("PyCafe.CyCafe.setNelemToRetrieveFromCache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "PyCafe.pyx":5392 + * + * ################################################################################## + * def terminate(self): # <<<<<<<<<<<<<< + * with nogil: + * self._c_cafe.terminate() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_317terminate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6PyCafe_6CyCafe_317terminate(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_316terminate(((struct __pyx_obj_6PyCafe_CyCafe *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6PyCafe_6CyCafe_316terminate(struct __pyx_obj_6PyCafe_CyCafe *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("terminate", 0); + + /* "PyCafe.pyx":5393 + * ################################################################################## + * def terminate(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.terminate() + * return + */ + { + #ifdef WITH_THREAD + PyThreadState *_save; + Py_UNBLOCK_THREADS + #endif + /*try:*/ { + + /* "PyCafe.pyx":5394 + * def terminate(self): + * with nogil: + * self._c_cafe.terminate() # <<<<<<<<<<<<<< + * return + * ################################################################################## + */ + __pyx_v_self->_c_cafe->terminate(); + } + + /* "PyCafe.pyx":5393 + * ################################################################################## + * def terminate(self): + * with nogil: # <<<<<<<<<<<<<< + * self._c_cafe.terminate() + * return + */ + /*finally:*/ { + /*normal exit:*/{ + #ifdef WITH_THREAD + Py_BLOCK_THREADS + #endif + goto __pyx_L5; + } + __pyx_L5:; + } + } + + /* "PyCafe.pyx":5395 + * with nogil: + * self._c_cafe.terminate() + * return # <<<<<<<<<<<<<< + * ################################################################################## + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "PyCafe.pyx":5392 + * + * ################################################################################## + * 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; +} + +/* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":197 + * # 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 fullfill 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_copy_shape; + 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_v_hasfields; + 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; + PyObject *__pyx_t_6 = NULL; + char *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getbuffer__", 0); + if (__pyx_v_info != NULL) { + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":203 + * # of flags + * + * if info == NULL: return # <<<<<<<<<<<<<< + * + * cdef int copy_shape, i, ndim + */ + __pyx_t_1 = ((__pyx_v_info == NULL) != 0); + if (__pyx_t_1) { + __pyx_r = 0; + goto __pyx_L0; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":206 + * + * cdef int copy_shape, i, ndim + * cdef int endian_detector = 1 # <<<<<<<<<<<<<< + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * + */ + __pyx_v_endian_detector = 1; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":207 + * cdef int copy_shape, 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":209 + * cdef bint little_endian = ((&endian_detector)[0] != 0) + * + * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< + * + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":211 + * ndim = PyArray_NDIM(self) + * + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * copy_shape = 1 + * else: + */ + __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":212 + * + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * copy_shape = 1 # <<<<<<<<<<<<<< + * else: + * copy_shape = 0 + */ + __pyx_v_copy_shape = 1; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":211 + * ndim = PyArray_NDIM(self) + * + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * copy_shape = 1 + * else: + */ + goto __pyx_L4; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":214 + * copy_shape = 1 + * else: + * copy_shape = 0 # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + */ + /*else*/ { + __pyx_v_copy_shape = 0; + } + __pyx_L4:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216 + * copy_shape = 0 + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_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_L6_bool_binop_done; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":217 + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not C contiguous") + * + */ + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L6_bool_binop_done:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216 + * copy_shape = 0 + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":218 + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_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__252, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":216 + * copy_shape = 0 + * + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") + */ + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_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_L9_bool_binop_done; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":221 + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not Fortran contiguous") + * + */ + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L9_bool_binop_done:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":222 + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_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__253, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":220 + * raise ValueError(u"ndarray is not C contiguous") + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") + */ + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":224 + * raise ValueError(u"ndarray is not Fortran contiguous") + * + * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< + * info.ndim = ndim + * if copy_shape: + */ + __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":225 + * + * info.buf = PyArray_DATA(self) + * info.ndim = ndim # <<<<<<<<<<<<<< + * if copy_shape: + * # Allocate new buffer for strides and shape info. + */ + __pyx_v_info->ndim = __pyx_v_ndim; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":226 + * info.buf = PyArray_DATA(self) + * info.ndim = ndim + * if copy_shape: # <<<<<<<<<<<<<< + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + */ + __pyx_t_1 = (__pyx_v_copy_shape != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":229 + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< + * info.shape = info.strides + ndim + * for i in range(ndim): + */ + __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":230 + * # This is allocated as one block, strides first. + * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":231 + * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) + * 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; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":232 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":233 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":226 + * info.buf = PyArray_DATA(self) + * info.ndim = ndim + * if copy_shape: # <<<<<<<<<<<<<< + * # Allocate new buffer for strides and shape info. + * # This is allocated as one block, strides first. + */ + goto __pyx_L11; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":235 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":236 + * 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_L11:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":237 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":238 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":239 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":242 + * + * cdef int t + * cdef char* f = NULL # <<<<<<<<<<<<<< + * cdef dtype descr = self.descr + * cdef int offset + */ + __pyx_v_f = NULL; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":243 + * cdef int t + * cdef char* f = NULL + * cdef dtype descr = self.descr # <<<<<<<<<<<<<< + * cdef int offset + * + */ + __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":246 + * cdef int offset + * + * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< + * + * if not hasfields and not copy_shape: + */ + __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":248 + * cdef bint hasfields = PyDataType_HASFIELDS(descr) + * + * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< + * # do not call releasebuffer + * info.obj = None + */ + __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L15_bool_binop_done:; + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":250 + * if not hasfields and not copy_shape: + * # do not call releasebuffer + * info.obj = None # <<<<<<<<<<<<<< + * else: + * # need to call releasebuffer + */ + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); + __pyx_v_info->obj = Py_None; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":248 + * cdef bint hasfields = PyDataType_HASFIELDS(descr) + * + * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< + * # do not call releasebuffer + * info.obj = None + */ + goto __pyx_L14; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":253 + * else: + * # need to call releasebuffer + * info.obj = self # <<<<<<<<<<<<<< + * + * if not hasfields: + */ + /*else*/ { + __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); + } + __pyx_L14:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":255 + * info.obj = self + * + * if not hasfields: # <<<<<<<<<<<<<< + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + */ + __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":256 + * + * if not hasfields: + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257 + * if not hasfields: + * 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_L20_next_or; + } else { + } + __pyx_t_2 = (__pyx_v_little_endian != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L19_bool_binop_done; + } + __pyx_L20_next_or:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":258 + * 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_L19_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L19_bool_binop_done:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257 + * if not hasfields: + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":259 + * 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__254, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":257 + * if not hasfields: + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":260 + * (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 = __pyx_k_b; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":261 + * 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" + */ + case NPY_UBYTE: + __pyx_v_f = __pyx_k_B; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":262 + * 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" + */ + case NPY_SHORT: + __pyx_v_f = __pyx_k_h; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":263 + * 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" + */ + case NPY_USHORT: + __pyx_v_f = __pyx_k_H; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":264 + * 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" + */ + case NPY_INT: + __pyx_v_f = __pyx_k_i; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":265 + * 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" + */ + case NPY_UINT: + __pyx_v_f = __pyx_k_I; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":266 + * 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" + */ + case NPY_LONG: + __pyx_v_f = __pyx_k_l; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":267 + * 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" + */ + case NPY_ULONG: + __pyx_v_f = __pyx_k_L; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":268 + * 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" + */ + case NPY_LONGLONG: + __pyx_v_f = __pyx_k_q; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":269 + * 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" + */ + case NPY_ULONGLONG: + __pyx_v_f = __pyx_k_Q; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":270 + * 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" + */ + case NPY_FLOAT: + __pyx_v_f = __pyx_k_f; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":271 + * 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" + */ + case NPY_DOUBLE: + __pyx_v_f = __pyx_k_d_2; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":272 + * 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" + */ + case NPY_LONGDOUBLE: + __pyx_v_f = __pyx_k_g; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":273 + * 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" + */ + case NPY_CFLOAT: + __pyx_v_f = __pyx_k_Zf; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":274 + * 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" + */ + case NPY_CDOUBLE: + __pyx_v_f = __pyx_k_Zd; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":275 + * 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: + */ + case NPY_CLONGDOUBLE: + __pyx_v_f = __pyx_k_Zg; + break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":276 + * 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) + */ + case NPY_OBJECT: + __pyx_v_f = __pyx_k_O; + break; + default: + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":278 + * 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_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + break; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":279 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":280 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) + * info.format = f + * return # <<<<<<<<<<<<<< + * else: + * info.format = stdlib.malloc(_buffer_format_string_len) + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":255 + * info.obj = self + * + * if not hasfields: # <<<<<<<<<<<<<< + * t = descr.type_num + * if ((descr.byteorder == c'>' and little_endian) or + */ + goto __pyx_L17; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":282 + * return + * else: + * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< + * info.format[0] = c'^' # Native data types, manual alignment + * offset = 0 + */ + /*else*/ { + __pyx_v_info->format = ((char *)malloc(0xFF)); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":283 + * else: + * info.format = stdlib.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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":284 + * info.format = stdlib.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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":285 + * 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_7 = __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_7 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_7; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":288 + * 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_L17:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":197 + * # 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 fullfill the PEP. + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(Py_None); + __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; + } + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_descr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":290 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * stdlib.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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":291 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * stdlib.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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":292 + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) + */ + free(__pyx_v_info->format); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":291 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":293 + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * stdlib.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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":294 + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) # <<<<<<<<<<<<<< + * # info.shape was stored after info.strides in the same block + * + */ + free(__pyx_v_info->strides); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":293 + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * stdlib.free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":290 + * f[0] = c'\0' # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":770 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":771 + * + * 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_filename = __pyx_f[2]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":770 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":773 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":774 + * + * 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_filename = __pyx_f[2]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":773 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":776 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":777 + * + * 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_filename = __pyx_f[2]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":776 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":779 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":780 + * + * 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_filename = __pyx_f[2]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":779 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":782 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":783 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: + */ + __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_filename = __pyx_f[2]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":782 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":785 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_util_dtypestring", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":790 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":791 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":794 + * 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_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":795 + * + * 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_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":796 + * 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; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":798 + * 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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":799 + * + * 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__255, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":798 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":802 + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":803 + * 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__256, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":801 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":813 + * + * # 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_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_6) break; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":814 + * # 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":815 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":816 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":818 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":820 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":821 + * + * 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_filename = __pyx_f[2]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":822 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":823 + * 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__257, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":822 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":826 + * + * # 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_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":827 + * # 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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":828 + * 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_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":829 + * 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_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":830 + * 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_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":831 + * 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_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":832 + * 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_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":833 + * 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_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":834 + * 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_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":835 + * 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_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":836 + * 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_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":837 + * 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_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":838 + * 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_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":839 + * 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_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":840 + * 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_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":841 + * 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_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":842 + * 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_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":844 + * 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 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L15:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":845 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":820 + * offset[0] += child.itemsize + * + * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< + * t = child.type_num + * if end - f < 5: + */ + goto __pyx_L13; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":849 + * # 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 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_9; + } + __pyx_L13:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":794 + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":850 + * # 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":785 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * 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.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":966 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + PyObject *__pyx_v_baseptr; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":968 + * cdef inline void set_array_base(ndarray arr, object base): + * cdef PyObject* baseptr + * if base is None: # <<<<<<<<<<<<<< + * baseptr = NULL + * else: + */ + __pyx_t_1 = (__pyx_v_base == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":969 + * cdef PyObject* baseptr + * if base is None: + * baseptr = NULL # <<<<<<<<<<<<<< + * else: + * Py_INCREF(base) # important to do this before decref below! + */ + __pyx_v_baseptr = NULL; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":968 + * cdef inline void set_array_base(ndarray arr, object base): + * cdef PyObject* baseptr + * if base is None: # <<<<<<<<<<<<<< + * baseptr = NULL + * else: + */ + goto __pyx_L3; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":971 + * baseptr = NULL + * else: + * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< + * baseptr = base + * Py_XDECREF(arr.base) + */ + /*else*/ { + Py_INCREF(__pyx_v_base); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":972 + * else: + * Py_INCREF(base) # important to do this before decref below! + * baseptr = base # <<<<<<<<<<<<<< + * Py_XDECREF(arr.base) + * arr.base = baseptr + */ + __pyx_v_baseptr = ((PyObject *)__pyx_v_base); + } + __pyx_L3:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":973 + * Py_INCREF(base) # important to do this before decref below! + * baseptr = base + * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< + * arr.base = baseptr + * + */ + Py_XDECREF(__pyx_v_arr->base); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":974 + * baseptr = base + * Py_XDECREF(arr.base) + * arr.base = baseptr # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + __pyx_v_arr->base = __pyx_v_baseptr; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":966 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":976 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":977 + * + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":978 + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: + * return None # <<<<<<<<<<<<<< + * else: + * return arr.base + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":977 + * + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: # <<<<<<<<<<<<<< + * return None + * else: + */ + goto __pyx_L3; + } + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":980 + * return None + * else: + * return arr.base # <<<<<<<<<<<<<< + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); + __pyx_r = ((PyObject *)__pyx_v_arr->base); + goto __pyx_L0; + } + __pyx_L3:; + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":976 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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(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_filename = __pyx_f[3]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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(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_filename = __pyx_f[3]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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(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_filename = __pyx_f[3]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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(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_filename = __pyx_f[3]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_filename = __pyx_f[3]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __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_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; +} + +/* "View.MemoryView":118 + * 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 3: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode); + if (value) { values[3] = value; kw_args--; } + } + case 4: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + 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_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } else { + + /* "View.MemoryView":119 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) { + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __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":118 + * 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; + char *__pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + __Pyx_INCREF(__pyx_v_format); + + /* "View.MemoryView":125 + * 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_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->ndim = ((int)__pyx_t_1); + + /* "View.MemoryView":126 + * + * self.ndim = len(shape) + * self.itemsize = itemsize # <<<<<<<<<<<<<< + * + * if not self.ndim: + */ + __pyx_v_self->itemsize = __pyx_v_itemsize; + + /* "View.MemoryView":128 + * 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 (__pyx_t_2) { + + /* "View.MemoryView":129 + * + * 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__258, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":128 + * self.itemsize = itemsize + * + * if not self.ndim: # <<<<<<<<<<<<<< + * raise ValueError("Empty shape tuple for cython.array") + * + */ + } + + /* "View.MemoryView":131 + * 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 (__pyx_t_2) { + + /* "View.MemoryView":132 + * + * 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__259, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":131 + * raise ValueError("Empty shape tuple for cython.array") + * + * if itemsize <= 0: # <<<<<<<<<<<<<< + * raise ValueError("itemsize <= 0 for cython.array") + * + */ + } + + /* "View.MemoryView":134 + * 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":135 + * + * 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__260, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_5); + __pyx_t_5 = 0; + + /* "View.MemoryView":134 + * 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":136 + * 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_filename = __pyx_f[3]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_v_format; + __Pyx_INCREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->_format); + __Pyx_DECREF(__pyx_v_self->_format); + __pyx_v_self->_format = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "View.MemoryView":137 + * format = format.encode('ASCII') + * self._format = format # keep a reference to the byte string + * self.format = self._format # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->_format); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->format = __pyx_t_6; + + /* "View.MemoryView":140 + * + * + * self._shape = PyMem_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<< + * self._strides = self._shape + self.ndim + * + */ + __pyx_v_self->_shape = ((Py_ssize_t *)PyMem_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2))); + + /* "View.MemoryView":141 + * + * self._shape = PyMem_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":143 + * 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 (__pyx_t_4) { + + /* "View.MemoryView":144 + * + * if not self._shape: + * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__261, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":143 + * self._strides = self._shape + self.ndim + * + * if not self._shape: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate shape and strides.") + * + */ + } + + /* "View.MemoryView":147 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + */ + __pyx_t_7 = 0; + __pyx_t_5 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_dim = __pyx_t_8; + __pyx_v_idx = __pyx_t_7; + __pyx_t_7 = (__pyx_t_7 + 1); + + /* "View.MemoryView":148 + * + * 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 (__pyx_t_4) { + + /* "View.MemoryView":149 + * 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_3 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9); + __pyx_t_3 = 0; + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __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_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":148 + * + * 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":150 + * 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":147 + * + * + * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<< + * if dim <= 0: + * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + */ + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "View.MemoryView":153 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_4) { + + /* "View.MemoryView":154 + * cdef char order + * if mode == 'fortran': + * order = b'F' # <<<<<<<<<<<<<< + * self.mode = u'fortran' + * elif mode == 'c': + */ + __pyx_v_order = 'F'; + + /* "View.MemoryView":155 + * 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":153 + * + * cdef char order + * if mode == 'fortran': # <<<<<<<<<<<<<< + * order = b'F' + * self.mode = u'fortran' + */ + goto __pyx_L10; + } + + /* "View.MemoryView":156 + * 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_filename = __pyx_f[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_4) { + + /* "View.MemoryView":157 + * self.mode = u'fortran' + * elif mode == 'c': + * order = b'C' # <<<<<<<<<<<<<< + * self.mode = u'c' + * else: + */ + __pyx_v_order = 'C'; + + /* "View.MemoryView":158 + * 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":156 + * order = b'F' + * self.mode = u'fortran' + * elif mode == 'c': # <<<<<<<<<<<<<< + * order = b'C' + * self.mode = u'c' + */ + goto __pyx_L10; + } + + /* "View.MemoryView":160 + * 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_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L10:; + + /* "View.MemoryView":162 + * 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":165 + * 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":166 + * + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<< + * if allocate_buffer: + * + */ + __pyx_t_5 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_self->dtype_is_object = __pyx_t_4; + + /* "View.MemoryView":167 + * 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":170 + * + * + * 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":171 + * + * 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 (__pyx_t_4) { + + /* "View.MemoryView":172 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: + */ + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__262, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":171 + * + * self.data = malloc(self.len) + * if not self.data: # <<<<<<<<<<<<<< + * raise MemoryError("unable to allocate array data.") + * + */ + } + + /* "View.MemoryView":174 + * 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":175 + * + * 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":176 + * 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_filename = __pyx_f[3]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize); + for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) { + __pyx_v_i = __pyx_t_8; + + /* "View.MemoryView":177 + * 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":178 + * for i in range(self.len / itemsize): + * p[i] = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + Py_INCREF(Py_None); + } + + /* "View.MemoryView":174 + * raise MemoryError("unable to allocate array data.") + * + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * p = self.data + * for i in range(self.len / itemsize): + */ + } + + /* "View.MemoryView":167 + * self.free_data = allocate_buffer + * self.dtype_is_object = format == b'O' + * if allocate_buffer: # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":118 + * 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_9); + __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":181 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getbuffer__", 0); + if (__pyx_v_info != NULL) { + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + } + + /* "View.MemoryView":182 + * @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":183 + * 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_filename = __pyx_f[3]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":184 + * 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":183 + * 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":185 + * 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_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":186 + * 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":185 + * 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":187 + * 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 (__pyx_t_1) { + + /* "View.MemoryView":188 + * 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__263, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":187 + * 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":189 + * 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":190 + * 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":191 + * 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":192 + * 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":193 + * 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":194 + * 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":195 + * 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":196 + * info.suboffsets = NULL + * info.itemsize = self.itemsize + * info.readonly = 0 # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + __pyx_v_info->readonly = 0; + + /* "View.MemoryView":198 + * 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":199 + * + * 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":198 + * info.readonly = 0 + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.format + * else: + */ + goto __pyx_L5; + } + + /* "View.MemoryView":201 + * info.format = self.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.obj = self + */ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L5:; + + /* "View.MemoryView":203 + * 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":181 + * + * @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 != NULL && __pyx_v_info->obj != NULL) { + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; + } + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(Py_None); + __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; + } + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":207 + * __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":208 + * + * 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":209 + * 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":208 + * + * 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":210 + * 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":211 + * 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":212 + * 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":211 + * 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":214 + * refcount_objects_in_slice(self.data, self._shape, + * self._strides, self.ndim, False) + * free(self.data) # <<<<<<<<<<<<<< + * PyMem_Free(self._shape) + * + */ + free(__pyx_v_self->data); + + /* "View.MemoryView":210 + * 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":215 + * self._strides, self.ndim, False) + * free(self.data) + * PyMem_Free(self._shape) # <<<<<<<<<<<<<< + * + * property memview: + */ + PyMem_Free(__pyx_v_self->_shape); + + /* "View.MemoryView":207 + * __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":219 + * property memview: + * @cname('get_memview') + * def __get__(self): # <<<<<<<<<<<<<< + * + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + */ + +/* Python wrapper */ +static PyObject *get_memview(PyObject *__pyx_v_self); /*proto*/ +static PyObject *get_memview(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) { + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":221 + * def __get__(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":222 + * + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __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":219 + * property memview: + * @cname('get_memview') + * def __get__(self): # <<<<<<<<<<<<<< + * + * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + */ + + /* 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.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":225 + * + * + * 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_6__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_6__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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getattr__", 0); + + /* "View.MemoryView":226 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __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":225 + * + * + * 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":228 + * 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_8__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_8__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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":229 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __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":228 + * 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":231 + * 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_10__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_10__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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setitem__", 0); + + /* "View.MemoryView":232 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":231 + * 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; +} + +/* "View.MemoryView":236 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("array_cwrapper", 0); + + /* "View.MemoryView":240 + * 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":241 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __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":240 + * cdef array result + * + * if buf == NULL: # <<<<<<<<<<<<<< + * result = array(shape, itemsize, format, mode.decode('ASCII')) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":243 + * 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_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __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":244 + * else: + * result = array(shape, itemsize, format, mode.decode('ASCII'), + * allocate_buffer=False) # <<<<<<<<<<<<<< + * result.data = buf + * + */ + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":243 + * 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_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __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":245 + * 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":247 + * 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":236 + * + * @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":273 + * 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__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_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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":274 + * 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":273 + * 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":275 + * 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":276 + * 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":275 + * 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; +} + +/* "View.MemoryView":290 + * + * @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":292 + * 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":296 + * + * with cython.cdivision(True): + * offset = aligned_p % alignment # <<<<<<<<<<<<<< + * + * if offset > 0: + */ + __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment); + + /* "View.MemoryView":298 + * 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":299 + * + * 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":298 + * offset = aligned_p % alignment + * + * if offset > 0: # <<<<<<<<<<<<<< + * aligned_p += alignment - offset + * + */ + } + + /* "View.MemoryView":301 + * aligned_p += alignment - offset + * + * return aligned_p # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview') + */ + __pyx_r = ((void *)__pyx_v_aligned_p); + goto __pyx_L0; + + /* "View.MemoryView":290 + * + * @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":319 + * 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + 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); + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + case 2: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__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_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + 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_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __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; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "View.MemoryView":320 + * + * 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":321 + * 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":322 + * 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":323 + * 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 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":324 + * 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":325 + * __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":326 + * if self.view.obj == NULL: + * (<__pyx_buffer *> &self.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * self.lock = PyThread_allocate_lock() + */ + Py_INCREF(Py_None); + + /* "View.MemoryView":324 + * 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":322 + * 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":328 + * Py_INCREF(Py_None) + * + * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<< + * if self.lock == NULL: + * raise MemoryError + */ + __pyx_v_self->lock = PyThread_allocate_lock(); + + /* "View.MemoryView":329 + * + * self.lock = PyThread_allocate_lock() + * if self.lock == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * + */ + __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":330 + * self.lock = PyThread_allocate_lock() + * if self.lock == NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + PyErr_NoMemory(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":329 + * + * self.lock = PyThread_allocate_lock() + * if self.lock == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * + */ + } + + /* "View.MemoryView":332 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = self.view.format == b'O' + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":333 + * + * if flags & PyBUF_FORMAT: + * self.dtype_is_object = self.view.format == b'O' # <<<<<<<<<<<<<< + * else: + * self.dtype_is_object = dtype_is_object + */ + __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __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 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_self->dtype_is_object = __pyx_t_1; + + /* "View.MemoryView":332 + * raise MemoryError + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * self.dtype_is_object = self.view.format == b'O' + * else: + */ + goto __pyx_L8; + } + + /* "View.MemoryView":335 + * self.dtype_is_object = self.view.format == b'O' + * 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_L8:; + + /* "View.MemoryView":337 + * 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":339 + * 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":319 + * 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_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":341 + * 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) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "View.MemoryView":342 + * + * 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":343 + * def __dealloc__(memoryview self): + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<< + * + * if self.lock != NULL: + */ + __Pyx_ReleaseBuffer((&__pyx_v_self->view)); + + /* "View.MemoryView":342 + * + * def __dealloc__(memoryview self): + * if self.obj is not None: # <<<<<<<<<<<<<< + * __Pyx_ReleaseBuffer(&self.view) + * + */ + } + + /* "View.MemoryView":345 + * __Pyx_ReleaseBuffer(&self.view) + * + * if self.lock != NULL: # <<<<<<<<<<<<<< + * PyThread_free_lock(self.lock) + * + */ + __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":346 + * + * if self.lock != NULL: + * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<< + * + * cdef char *get_item_pointer(memoryview self, object index) except NULL: + */ + PyThread_free_lock(__pyx_v_self->lock); + + /* "View.MemoryView":345 + * __Pyx_ReleaseBuffer(&self.view) + * + * if self.lock != NULL: # <<<<<<<<<<<<<< + * PyThread_free_lock(self.lock) + * + */ + } + + /* "View.MemoryView":341 + * self.typeinfo = NULL + * + * def __dealloc__(memoryview self): # <<<<<<<<<<<<<< + * if self.obj is not None: + * __Pyx_ReleaseBuffer(&self.view) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "View.MemoryView":348 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_item_pointer", 0); + + /* "View.MemoryView":350 + * 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":352 + * 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_filename = __pyx_f[3]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __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":353 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_itemp = __pyx_t_7; + + /* "View.MemoryView":352 + * 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":355 + * itemp = pybuffer_index(&self.view, itemp, idx, dim) + * + * return itemp # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_itemp; + goto __pyx_L0; + + /* "View.MemoryView":348 + * 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":358 + * + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + + /* "View.MemoryView":359 + * + * 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":360 + * 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":359 + * + * def __getitem__(memoryview self, object index): + * if index is Ellipsis: # <<<<<<<<<<<<<< + * return self + * + */ + } + + /* "View.MemoryView":362 + * 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_filename = __pyx_f[3]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (likely(__pyx_t_3 != Py_None)) { + PyObject* sequence = __pyx_t_3; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + #endif + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __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":365 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "View.MemoryView":366 + * 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_filename = __pyx_f[3]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":365 + * + * cdef char *itemp + * if have_slices: # <<<<<<<<<<<<<< + * return memview_slice(self, indices) + * else: + */ + } + + /* "View.MemoryView":368 + * 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 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_itemp = __pyx_t_6; + + /* "View.MemoryView":369 + * 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_filename = __pyx_f[3]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":358 + * + * + * 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":371 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * have_slices, index = _unellipsify(index, self.view.ndim) + * + */ + +/* 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 + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setitem__", 0); + __Pyx_INCREF(__pyx_v_index); + + /* "View.MemoryView":372 + * + * def __setitem__(memoryview self, object index, object value): + * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<< + * + * if have_slices: + */ + __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (likely(__pyx_t_1 != Py_None)) { + PyObject* sequence = __pyx_t_1; + #if CYTHON_COMPILING_IN_CPYTHON + Py_ssize_t size = Py_SIZE(sequence); + #else + Py_ssize_t size = PySequence_Size(sequence); + #endif + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_have_slices = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":374 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj: + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_4) { + + /* "View.MemoryView":375 + * + * if have_slices: + * obj = self.is_slice(value) # <<<<<<<<<<<<<< + * if obj: + * self.setitem_slice_assignment(self[index], obj) + */ + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_obj = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":376 + * if have_slices: + * obj = self.is_slice(value) + * if obj: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: + */ + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_4) { + + /* "View.MemoryView":377 + * 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_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":376 + * if have_slices: + * obj = self.is_slice(value) + * if obj: # <<<<<<<<<<<<<< + * self.setitem_slice_assignment(self[index], obj) + * else: + */ + goto __pyx_L4; + } + + /* "View.MemoryView":379 + * 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_3 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __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; + } + __pyx_L4:; + + /* "View.MemoryView":374 + * have_slices, index = _unellipsify(index, self.view.ndim) + * + * if have_slices: # <<<<<<<<<<<<<< + * obj = self.is_slice(value) + * if obj: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":381 + * self.setitem_slice_assign_scalar(self[index], value) + * else: + * self.setitem_indexed(index, value) # <<<<<<<<<<<<<< + * + * cdef is_slice(self, obj): + */ + /*else*/ { + __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":371 + * return self.convert_item_to_object(itemp) + * + * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<< + * have_slices, index = _unellipsify(index, self.view.ndim) + * + */ + + /* 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("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":383 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_slice", 0); + __Pyx_INCREF(__pyx_v_obj); + + /* "View.MemoryView":384 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags|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":385 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + */ + { + __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":386 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: + */ + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_self->flags | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_6); + + /* "View.MemoryView":387 + * try: + * obj = memoryview(obj, self.flags|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_filename = __pyx_f[3]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __Pyx_GOTREF(__pyx_t_7); + + /* "View.MemoryView":386 + * if not isinstance(obj, memoryview): + * try: + * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<< + * self.dtype_is_object) + * except TypeError: + */ + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __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":385 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags|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_L11_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":388 + * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, + * self.dtype_is_object) + * except TypeError: # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_t_9 = 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_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_6); + + /* "View.MemoryView":389 + * self.dtype_is_object) + * except TypeError: + * return None # <<<<<<<<<<<<<< + * + * return obj + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = 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":385 + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): + * try: # <<<<<<<<<<<<<< + * obj = memoryview(obj, self.flags|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_L11_try_end:; + } + + /* "View.MemoryView":384 + * + * cdef is_slice(self, obj): + * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<< + * try: + * obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, + */ + } + + /* "View.MemoryView":391 + * 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":383 + * 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":393 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_slice_assignment", 0); + + /* "View.MemoryView":397 + * 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_filename = __pyx_f[3]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":398 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":399 + * 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_filename = __pyx_f[3]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":397 + * 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 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":393 + * 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":401 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0); + + /* "View.MemoryView":403 + * 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":408 + * 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":410 + * 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":411 + * + * 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":412 + * 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 (__pyx_t_1) { + + /* "View.MemoryView":413 + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: + * raise MemoryError # <<<<<<<<<<<<<< + * item = tmp + * else: + */ + PyErr_NoMemory(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":412 + * if self.view.itemsize > sizeof(array): + * tmp = PyMem_Malloc(self.view.itemsize) + * if tmp == NULL: # <<<<<<<<<<<<<< + * raise MemoryError + * item = tmp + */ + } + + /* "View.MemoryView":414 + * if tmp == NULL: + * raise MemoryError + * item = tmp # <<<<<<<<<<<<<< + * else: + * item = array + */ + __pyx_v_item = __pyx_v_tmp; + + /* "View.MemoryView":410 + * 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":416 + * item = tmp + * else: + * item = array # <<<<<<<<<<<<<< + * + * try: + */ + /*else*/ { + __pyx_v_item = ((void *)__pyx_v_array); + } + __pyx_L3:; + + /* "View.MemoryView":418 + * item = array + * + * try: # <<<<<<<<<<<<<< + * if self.dtype_is_object: + * ( item)[0] = value + */ + /*try:*/ { + + /* "View.MemoryView":419 + * + * 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":420 + * 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":419 + * + * try: + * if self.dtype_is_object: # <<<<<<<<<<<<<< + * ( item)[0] = value + * else: + */ + goto __pyx_L8; + } + + /* "View.MemoryView":422 + * ( 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_filename = __pyx_f[3]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_L8:; + + /* "View.MemoryView":426 + * + * + * 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":427 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":426 + * + * + * 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":428 + * 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":431 + * 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; + } + /*exception exit:*/{ + __pyx_L6_error:; + __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":401 + * 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":433 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("setitem_indexed", 0); + + /* "View.MemoryView":434 + * + * 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 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_itemp = __pyx_t_1; + + /* "View.MemoryView":435 + * 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_filename = __pyx_f[3]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":433 + * 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":437 + * 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; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + size_t __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":440 + * """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_filename = __pyx_f[3]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":443 + * 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_filename = __pyx_f[3]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_bytesitem = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":444 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + { + __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":445 + * 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_filename = __pyx_f[3]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + __pyx_t_8 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __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":444 + * + * bytesitem = itemp[:self.view.itemsize] + * try: # <<<<<<<<<<<<<< + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: + */ + } + + /* "View.MemoryView":449 + * 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":450 + * 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 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __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":449 + * raise ValueError("Unable to convert item to object") + * else: + * if len(self.view.format) == 1: # <<<<<<<<<<<<<< + * return result[0] + * return result + */ + } + + /* "View.MemoryView":451 + * 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":446 + * try: + * result = struct.unpack(self.view.format, bytesitem) + * except struct.error: # <<<<<<<<<<<<<< + * raise ValueError("Unable to convert item to object") + * else: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = PyErr_ExceptionMatches(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_12) { + __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_9); + + /* "View.MemoryView":447 + * 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__264, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "View.MemoryView":444 + * + * 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":437 + * 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":453 + * 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; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + char *__pyx_t_10; + char *__pyx_t_11; + char *__pyx_t_12; + char *__pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":456 + * """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_filename = __pyx_f[3]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_struct = __pyx_t_1; + __pyx_t_1 = 0; + + /* "View.MemoryView":461 + * 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":462 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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 = PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + + /* "View.MemoryView":461 + * cdef Py_ssize_t i + * + * if isinstance(value, tuple): # <<<<<<<<<<<<<< + * bytesvalue = struct.pack(self.view.format, *value) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":464 + * 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_filename = __pyx_f[3]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && 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; + } + } + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":466 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * + */ + __pyx_t_7 = 0; + if (unlikely(__pyx_v_bytesvalue == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __Pyx_INCREF(__pyx_v_bytesvalue); + __pyx_t_9 = __pyx_v_bytesvalue; + __pyx_t_11 = PyBytes_AS_STRING(__pyx_t_9); + __pyx_t_12 = (__pyx_t_11 + PyBytes_GET_SIZE(__pyx_t_9)); + for (__pyx_t_13 = __pyx_t_11; __pyx_t_13 < __pyx_t_12; __pyx_t_13++) { + __pyx_t_10 = __pyx_t_13; + __pyx_v_c = (__pyx_t_10[0]); + + /* "View.MemoryView":467 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + __pyx_v_i = __pyx_t_7; + + /* "View.MemoryView":466 + * bytesvalue = struct.pack(self.view.format, value) + * + * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<< + * itemp[i] = c + * + */ + __pyx_t_7 = (__pyx_t_7 + 1); + + /* "View.MemoryView":467 + * + * for i, c in enumerate(bytesvalue): + * itemp[i] = c # <<<<<<<<<<<<<< + * + * @cname('getbuffer') + */ + (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "View.MemoryView":453 + * 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_9); + __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":470 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * if flags & PyBUF_STRIDES: + * info.shape = self.view.shape + */ + +/* 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; + Py_ssize_t *__pyx_t_2; + char *__pyx_t_3; + void *__pyx_t_4; + int __pyx_t_5; + Py_ssize_t __pyx_t_6; + __Pyx_RefNannySetupContext("__getbuffer__", 0); + if (__pyx_v_info != NULL) { + __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(__pyx_v_info->obj); + } + + /* "View.MemoryView":471 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: + */ + __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":472 + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_STRIDES: + * info.shape = self.view.shape # <<<<<<<<<<<<<< + * else: + * info.shape = NULL + */ + __pyx_t_2 = __pyx_v_self->view.shape; + __pyx_v_info->shape = __pyx_t_2; + + /* "View.MemoryView":471 + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.shape = self.view.shape + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":474 + * info.shape = self.view.shape + * else: + * info.shape = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_STRIDES: + */ + /*else*/ { + __pyx_v_info->shape = NULL; + } + __pyx_L3:; + + /* "View.MemoryView":476 + * 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":477 + * + * if flags & PyBUF_STRIDES: + * info.strides = self.view.strides # <<<<<<<<<<<<<< + * else: + * info.strides = NULL + */ + __pyx_t_2 = __pyx_v_self->view.strides; + __pyx_v_info->strides = __pyx_t_2; + + /* "View.MemoryView":476 + * info.shape = NULL + * + * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<< + * info.strides = self.view.strides + * else: + */ + goto __pyx_L4; + } + + /* "View.MemoryView":479 + * info.strides = self.view.strides + * else: + * info.strides = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_INDIRECT: + */ + /*else*/ { + __pyx_v_info->strides = NULL; + } + __pyx_L4:; + + /* "View.MemoryView":481 + * 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":482 + * + * if flags & PyBUF_INDIRECT: + * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<< + * else: + * info.suboffsets = NULL + */ + __pyx_t_2 = __pyx_v_self->view.suboffsets; + __pyx_v_info->suboffsets = __pyx_t_2; + + /* "View.MemoryView":481 + * info.strides = NULL + * + * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<< + * info.suboffsets = self.view.suboffsets + * else: + */ + goto __pyx_L5; + } + + /* "View.MemoryView":484 + * info.suboffsets = self.view.suboffsets + * else: + * info.suboffsets = NULL # <<<<<<<<<<<<<< + * + * if flags & PyBUF_FORMAT: + */ + /*else*/ { + __pyx_v_info->suboffsets = NULL; + } + __pyx_L5:; + + /* "View.MemoryView":486 + * 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":487 + * + * if flags & PyBUF_FORMAT: + * info.format = self.view.format # <<<<<<<<<<<<<< + * else: + * info.format = NULL + */ + __pyx_t_3 = __pyx_v_self->view.format; + __pyx_v_info->format = __pyx_t_3; + + /* "View.MemoryView":486 + * info.suboffsets = NULL + * + * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<< + * info.format = self.view.format + * else: + */ + goto __pyx_L6; + } + + /* "View.MemoryView":489 + * info.format = self.view.format + * else: + * info.format = NULL # <<<<<<<<<<<<<< + * + * info.buf = self.view.buf + */ + /*else*/ { + __pyx_v_info->format = NULL; + } + __pyx_L6:; + + /* "View.MemoryView":491 + * info.format = NULL + * + * info.buf = self.view.buf # <<<<<<<<<<<<<< + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + */ + __pyx_t_4 = __pyx_v_self->view.buf; + __pyx_v_info->buf = __pyx_t_4; + + /* "View.MemoryView":492 + * + * info.buf = self.view.buf + * info.ndim = self.view.ndim # <<<<<<<<<<<<<< + * info.itemsize = self.view.itemsize + * info.len = self.view.len + */ + __pyx_t_5 = __pyx_v_self->view.ndim; + __pyx_v_info->ndim = __pyx_t_5; + + /* "View.MemoryView":493 + * info.buf = self.view.buf + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<< + * info.len = self.view.len + * info.readonly = 0 + */ + __pyx_t_6 = __pyx_v_self->view.itemsize; + __pyx_v_info->itemsize = __pyx_t_6; + + /* "View.MemoryView":494 + * info.ndim = self.view.ndim + * info.itemsize = self.view.itemsize + * info.len = self.view.len # <<<<<<<<<<<<<< + * info.readonly = 0 + * info.obj = self + */ + __pyx_t_6 = __pyx_v_self->view.len; + __pyx_v_info->len = __pyx_t_6; + + /* "View.MemoryView":495 + * info.itemsize = self.view.itemsize + * info.len = self.view.len + * info.readonly = 0 # <<<<<<<<<<<<<< + * info.obj = self + * + */ + __pyx_v_info->readonly = 0; + + /* "View.MemoryView":496 + * info.len = self.view.len + * info.readonly = 0 + * 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":470 + * + * @cname('getbuffer') + * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<< + * if flags & PyBUF_STRIDES: + * info.shape = self.view.shape + */ + + /* function exit code */ + __pyx_r = 0; + if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(Py_None); + __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":503 + * property T: + * @cname('__pyx_memoryview_transpose') + * def __get__(self): # <<<<<<<<<<<<<< + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_transpose(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_transpose(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":504 + * @cname('__pyx_memoryview_transpose') + * def __get__(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_filename = __pyx_f[3]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "View.MemoryView":505 + * def __get__(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 == 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":506 + * cdef _memoryviewslice result = memoryview_copy(self) + * transpose_memslice(&result.from_slice) + * return result # <<<<<<<<<<<<<< + * + * property base: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyObject *)__pyx_v_result); + goto __pyx_L0; + + /* "View.MemoryView":503 + * property T: + * @cname('__pyx_memoryview_transpose') + * def __get__(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":510 + * property base: + * @cname('__pyx_memoryview__get__base') + * def __get__(self): # <<<<<<<<<<<<<< + * return self.obj + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview__get__base(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview__get__base(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":511 + * @cname('__pyx_memoryview__get__base') + * def __get__(self): + * return self.obj # <<<<<<<<<<<<<< + * + * property shape: + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->obj); + __pyx_r = __pyx_v_self->obj; + goto __pyx_L0; + + /* "View.MemoryView":510 + * property base: + * @cname('__pyx_memoryview__get__base') + * def __get__(self): # <<<<<<<<<<<<<< + * return self.obj + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":515 + * property shape: + * @cname('__pyx_memoryview_get_shape') + * def __get__(self): # <<<<<<<<<<<<<< + * return tuple([length for length in self.view.shape[:self.view.ndim]]) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_get_shape(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_shape(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":516 + * @cname('__pyx_memoryview_get_shape') + * def __get__(self): + * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * property strides: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __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":515 + * property shape: + * @cname('__pyx_memoryview_get_shape') + * def __get__(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":520 + * property strides: + * @cname('__pyx_memoryview_get_strides') + * def __get__(self): # <<<<<<<<<<<<<< + * if self.view.strides == NULL: + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_get_strides(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_strides(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":521 + * @cname('__pyx_memoryview_get_strides') + * def __get__(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 (__pyx_t_1) { + + /* "View.MemoryView":523 + * 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__265, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":521 + * @cname('__pyx_memoryview_get_strides') + * def __get__(self): + * if self.view.strides == NULL: # <<<<<<<<<<<<<< + * + * raise ValueError("Buffer view does not expose strides") + */ + } + + /* "View.MemoryView":525 + * raise ValueError("Buffer view does not expose strides") + * + * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * property suboffsets: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __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":520 + * property strides: + * @cname('__pyx_memoryview_get_strides') + * def __get__(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":529 + * property suboffsets: + * @cname('__pyx_memoryview_get_suboffsets') + * def __get__(self): # <<<<<<<<<<<<<< + * if self.view.suboffsets == NULL: + * return (-1,) * self.view.ndim + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_get_suboffsets(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_suboffsets(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":530 + * @cname('__pyx_memoryview_get_suboffsets') + * def __get__(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":531 + * def __get__(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_filename = __pyx_f[3]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__266, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __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":530 + * @cname('__pyx_memoryview_get_suboffsets') + * def __get__(self): + * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<< + * return (-1,) * self.view.ndim + * + */ + } + + /* "View.MemoryView":533 + * return (-1,) * self.view.ndim + * + * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<< + * + * property ndim: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __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":529 + * property suboffsets: + * @cname('__pyx_memoryview_get_suboffsets') + * def __get__(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":537 + * property ndim: + * @cname('__pyx_memoryview_get_ndim') + * def __get__(self): # <<<<<<<<<<<<<< + * return self.view.ndim + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_get_ndim(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_ndim(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":538 + * @cname('__pyx_memoryview_get_ndim') + * def __get__(self): + * return self.view.ndim # <<<<<<<<<<<<<< + * + * property itemsize: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":537 + * property ndim: + * @cname('__pyx_memoryview_get_ndim') + * def __get__(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":542 + * property itemsize: + * @cname('__pyx_memoryview_get_itemsize') + * def __get__(self): # <<<<<<<<<<<<<< + * return self.view.itemsize + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_get_itemsize(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_itemsize(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":543 + * @cname('__pyx_memoryview_get_itemsize') + * def __get__(self): + * return self.view.itemsize # <<<<<<<<<<<<<< + * + * property nbytes: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":542 + * property itemsize: + * @cname('__pyx_memoryview_get_itemsize') + * def __get__(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":547 + * property nbytes: + * @cname('__pyx_memoryview_get_nbytes') + * def __get__(self): # <<<<<<<<<<<<<< + * return self.size * self.view.itemsize + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_get_nbytes(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_nbytes(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":548 + * @cname('__pyx_memoryview_get_nbytes') + * def __get__(self): + * return self.size * self.view.itemsize # <<<<<<<<<<<<<< + * + * property size: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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":547 + * property nbytes: + * @cname('__pyx_memoryview_get_nbytes') + * def __get__(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":552 + * property size: + * @cname('__pyx_memoryview_get_size') + * def __get__(self): # <<<<<<<<<<<<<< + * if self._size is None: + * result = 1 + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryview_get_size(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryview_get_size(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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "View.MemoryView":553 + * @cname('__pyx_memoryview_get_size') + * def __get__(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":554 + * def __get__(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":556 + * 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_filename = __pyx_f[3]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6); + __pyx_t_6 = 0; + + /* "View.MemoryView":557 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6); + __pyx_t_6 = 0; + } + + /* "View.MemoryView":559 + * 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":553 + * @cname('__pyx_memoryview_get_size') + * def __get__(self): + * if self._size is None: # <<<<<<<<<<<<<< + * result = 1 + * + */ + } + + /* "View.MemoryView":561 + * 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":552 + * property size: + * @cname('__pyx_memoryview_get_size') + * def __get__(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":563 + * 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":564 + * + * 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":565 + * 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":564 + * + * def __len__(self): + * if self.view.ndim >= 1: # <<<<<<<<<<<<<< + * return self.view.shape[0] + * + */ + } + + /* "View.MemoryView":567 + * return self.view.shape[0] + * + * return 0 # <<<<<<<<<<<<<< + * + * def __repr__(self): + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":563 + * 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":569 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "View.MemoryView":570 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __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_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":571 + * def __repr__(self): + * return "" % (self.base.__class__.__name__, + * id(self)) # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "View.MemoryView":570 + * + * def __repr__(self): + * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<< + * id(self)) + * + */ + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __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_t_3 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __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":569 + * 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":573 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + + /* "View.MemoryView":574 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __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_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __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":573 + * 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":577 + * + * + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_c_contig", 0); + + /* "View.MemoryView":580 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice, 'C', self.view.ndim) + * + */ + __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); + + /* "View.MemoryView":581 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice, '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, 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":577 + * + * + * 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":583 + * return slice_is_contig(mslice, '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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_f_contig", 0); + + /* "View.MemoryView":586 + * cdef __Pyx_memviewslice *mslice + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<< + * return slice_is_contig(mslice, 'F', self.view.ndim) + * + */ + __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); + + /* "View.MemoryView":587 + * cdef __Pyx_memviewslice tmp + * mslice = get_slice_from_memview(self, &tmp) + * return slice_is_contig(mslice, 'F', self.view.ndim) # <<<<<<<<<<<<<< + * + * def copy(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig(__pyx_v_mslice, 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":583 + * return slice_is_contig(mslice, '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":589 + * return slice_is_contig(mslice, '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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("copy", 0); + + /* "View.MemoryView":591 + * 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":593 + * 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":594 + * + * 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), __pyx_k_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_filename = __pyx_f[3]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_mslice = __pyx_t_1; + + /* "View.MemoryView":599 + * 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_filename = __pyx_f[3]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":589 + * return slice_is_contig(mslice, '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":601 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("copy_fortran", 0); + + /* "View.MemoryView":603 + * 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":605 + * 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":606 + * + * 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), __pyx_k_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_filename = __pyx_f[3]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_dst = __pyx_t_1; + + /* "View.MemoryView":611 + * 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_filename = __pyx_f[3]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":601 + * 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; +} + +/* "View.MemoryView":615 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_cwrapper", 0); + + /* "View.MemoryView":616 + * @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_filename = __pyx_f[3]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __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":617 + * 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":618 + * 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":615 + * + * @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":621 + * + * @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":622 + * @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":621 + * + * @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":624 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_unellipsify", 0); + + /* "View.MemoryView":629 + * 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":630 + * """ + * if not isinstance(index, tuple): + * tup = (index,) # <<<<<<<<<<<<<< + * else: + * tup = index + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __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":629 + * full slices. + * """ + * if not isinstance(index, tuple): # <<<<<<<<<<<<<< + * tup = (index,) + * else: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":632 + * tup = (index,) + * else: + * tup = index # <<<<<<<<<<<<<< + * + * result = [] + */ + /*else*/ { + __Pyx_INCREF(__pyx_v_index); + __pyx_v_tup = __pyx_v_index; + } + __pyx_L3:; + + /* "View.MemoryView":634 + * tup = index + * + * result = [] # <<<<<<<<<<<<<< + * have_slices = False + * seen_ellipsis = False + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_result = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "View.MemoryView":635 + * + * result = [] + * have_slices = False # <<<<<<<<<<<<<< + * seen_ellipsis = False + * for idx, item in enumerate(tup): + */ + __pyx_v_have_slices = 0; + + /* "View.MemoryView":636 + * result = [] + * have_slices = False + * seen_ellipsis = False # <<<<<<<<<<<<<< + * for idx, item in enumerate(tup): + * if item is Ellipsis: + */ + __pyx_v_seen_ellipsis = 0; + + /* "View.MemoryView":637 + * 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_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + #endif + } else { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __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":638 + * 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":639 + * 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":640 + * 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 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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__267); + __Pyx_GIVEREF(__pyx_slice__267); + PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__267); + } + } + __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "View.MemoryView":641 + * 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":639 + * 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":643 + * seen_ellipsis = True + * else: + * result.append(slice(None)) # <<<<<<<<<<<<<< + * have_slices = True + * else: + */ + /*else*/ { + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__268); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L7:; + + /* "View.MemoryView":644 + * 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":638 + * 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":646 + * 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 (__pyx_t_1) { + + /* "View.MemoryView":647 + * 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_Format(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_Raise(__pyx_t_7, 0, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":646 + * 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":649 + * 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":650 + * + * 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 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L6:; + + /* "View.MemoryView":637 + * 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":652 + * 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 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5); + + /* "View.MemoryView":653 + * + * nslices = ndim - len(result) + * if nslices: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * nslices) + * + */ + __pyx_t_1 = (__pyx_v_nslices != 0); + if (__pyx_t_1) { + + /* "View.MemoryView":654 + * 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_filename = __pyx_f[3]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __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__269); + __Pyx_GIVEREF(__pyx_slice__269); + PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__269); + } + } + __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "View.MemoryView":653 + * + * nslices = ndim - len(result) + * if nslices: # <<<<<<<<<<<<<< + * result.extend([slice(None)] * nslices) + * + */ + } + + /* "View.MemoryView":656 + * 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_filename = __pyx_f[3]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "View.MemoryView":624 + * 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":658 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("assert_direct_dimensions", 0); + + /* "View.MemoryView":659 + * + * 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":660 + * 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 (__pyx_t_4) { + + /* "View.MemoryView":661 + * 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__270, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":660 + * 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":658 + * 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":668 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memview_slice", 0); + + /* "View.MemoryView":669 + * @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":676 + * + * + * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<< + * + * cdef _memoryviewslice memviewsliceobj + */ + memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))); + + /* "View.MemoryView":680 + * 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_filename = __pyx_f[3]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + #endif + + /* "View.MemoryView":682 + * 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":683 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __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":684 + * 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":682 + * assert memview.view.ndim > 0 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * memviewsliceobj = memview + * p_src = &memviewsliceobj.from_slice + */ + goto __pyx_L3; + } + + /* "View.MemoryView":686 + * 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":687 + * else: + * slice_copy(memview, &src) + * p_src = &src # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_p_src = (&__pyx_v_src); + } + __pyx_L3:; + + /* "View.MemoryView":693 + * + * + * 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":694 + * + * 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":699 + * + * + * 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":700 + * + * 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":704 + * 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_filename = __pyx_f[3]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + #endif + } else { + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __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":705 + * + * 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":709 + * 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_filename = __pyx_f[3]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":706 + * 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 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":705 + * + * 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":712 + * 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":713 + * 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":714 + * 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":715 + * 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":716 + * 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":712 + * 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":718 + * 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_filename = __pyx_f[3]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __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":719 + * 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_filename = __pyx_f[3]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __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":720 + * 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_filename = __pyx_f[3]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __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":722 + * 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_filename = __pyx_f[3]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __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":723 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __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":724 + * 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_filename = __pyx_f[3]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __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":726 + * 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 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":732 + * 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":704 + * 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":734 + * 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":735 + * + * 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":736 + * 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_filename = __pyx_f[3]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "View.MemoryView":737 + * 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_filename = __pyx_f[3]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "View.MemoryView":735 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "View.MemoryView":734 + * new_ndim += 1 + * + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * return memoryview_fromslice(dst, new_ndim, + * memviewsliceobj.to_object_func, + */ + } + + /* "View.MemoryView":740 + * 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":741 + * 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_filename = __pyx_f[3]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + + /* "View.MemoryView":740 + * 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_filename = __pyx_f[3]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3); + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":668 + * + * @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":765 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":785 + * 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":787 + * 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":788 + * + * 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":787 + * if not is_slice: + * + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if not 0 <= start < shape: + */ + } + + /* "View.MemoryView":789 + * 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":790 + * 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, __pyx_k_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":789 + * if start < 0: + * start += shape + * if not 0 <= start < shape: # <<<<<<<<<<<<<< + * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + * else: + */ + } + + /* "View.MemoryView":785 + * cdef bint negative_step + * + * if not is_slice: # <<<<<<<<<<<<<< + * + * if start < 0: + */ + goto __pyx_L3; + } + + /* "View.MemoryView":793 + * 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":795 + * 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":796 + * + * 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, __pyx_k_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":795 + * 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":799 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape + */ + __pyx_t_2 = (__pyx_v_have_start != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":800 + * + * 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":801 + * if have_start: + * if start < 0: + * start += shape # <<<<<<<<<<<<<< + * if start < 0: + * start = 0 + */ + __pyx_v_start = (__pyx_v_start + __pyx_v_shape); + + /* "View.MemoryView":802 + * 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":803 + * start += shape + * if start < 0: + * start = 0 # <<<<<<<<<<<<<< + * elif start >= shape: + * if negative_step: + */ + __pyx_v_start = 0; + + /* "View.MemoryView":802 + * if start < 0: + * start += shape + * if start < 0: # <<<<<<<<<<<<<< + * start = 0 + * elif start >= shape: + */ + } + + /* "View.MemoryView":800 + * + * if have_start: + * if start < 0: # <<<<<<<<<<<<<< + * start += shape + * if start < 0: + */ + goto __pyx_L12; + } + + /* "View.MemoryView":804 + * 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":805 + * 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":806 + * elif start >= shape: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = shape + */ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":805 + * start = 0 + * elif start >= shape: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + goto __pyx_L14; + } + + /* "View.MemoryView":808 + * start = shape - 1 + * else: + * start = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: + */ + /*else*/ { + __pyx_v_start = __pyx_v_shape; + } + __pyx_L14:; + + /* "View.MemoryView":804 + * if start < 0: + * start = 0 + * elif start >= shape: # <<<<<<<<<<<<<< + * if negative_step: + * start = shape - 1 + */ + } + __pyx_L12:; + + /* "View.MemoryView":799 + * + * + * if have_start: # <<<<<<<<<<<<<< + * if start < 0: + * start += shape + */ + goto __pyx_L11; + } + + /* "View.MemoryView":810 + * 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":811 + * else: + * if negative_step: + * start = shape - 1 # <<<<<<<<<<<<<< + * else: + * start = 0 + */ + __pyx_v_start = (__pyx_v_shape - 1); + + /* "View.MemoryView":810 + * start = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * start = shape - 1 + * else: + */ + goto __pyx_L15; + } + + /* "View.MemoryView":813 + * start = shape - 1 + * else: + * start = 0 # <<<<<<<<<<<<<< + * + * if have_stop: + */ + /*else*/ { + __pyx_v_start = 0; + } + __pyx_L15:; + } + __pyx_L11:; + + /* "View.MemoryView":815 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape + */ + __pyx_t_2 = (__pyx_v_have_stop != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":816 + * + * 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":817 + * if have_stop: + * if stop < 0: + * stop += shape # <<<<<<<<<<<<<< + * if stop < 0: + * stop = 0 + */ + __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape); + + /* "View.MemoryView":818 + * 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":819 + * stop += shape + * if stop < 0: + * stop = 0 # <<<<<<<<<<<<<< + * elif stop > shape: + * stop = shape + */ + __pyx_v_stop = 0; + + /* "View.MemoryView":818 + * if stop < 0: + * stop += shape + * if stop < 0: # <<<<<<<<<<<<<< + * stop = 0 + * elif stop > shape: + */ + } + + /* "View.MemoryView":816 + * + * if have_stop: + * if stop < 0: # <<<<<<<<<<<<<< + * stop += shape + * if stop < 0: + */ + goto __pyx_L17; + } + + /* "View.MemoryView":820 + * 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":821 + * stop = 0 + * elif stop > shape: + * stop = shape # <<<<<<<<<<<<<< + * else: + * if negative_step: + */ + __pyx_v_stop = __pyx_v_shape; + + /* "View.MemoryView":820 + * if stop < 0: + * stop = 0 + * elif stop > shape: # <<<<<<<<<<<<<< + * stop = shape + * else: + */ + } + __pyx_L17:; + + /* "View.MemoryView":815 + * start = 0 + * + * if have_stop: # <<<<<<<<<<<<<< + * if stop < 0: + * stop += shape + */ + goto __pyx_L16; + } + + /* "View.MemoryView":823 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: + */ + /*else*/ { + __pyx_t_2 = (__pyx_v_negative_step != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":824 + * else: + * if negative_step: + * stop = -1 # <<<<<<<<<<<<<< + * else: + * stop = shape + */ + __pyx_v_stop = -1L; + + /* "View.MemoryView":823 + * stop = shape + * else: + * if negative_step: # <<<<<<<<<<<<<< + * stop = -1 + * else: + */ + goto __pyx_L19; + } + + /* "View.MemoryView":826 + * stop = -1 + * else: + * stop = shape # <<<<<<<<<<<<<< + * + * if not have_step: + */ + /*else*/ { + __pyx_v_stop = __pyx_v_shape; + } + __pyx_L19:; + } + __pyx_L16:; + + /* "View.MemoryView":828 + * stop = shape + * + * if not have_step: # <<<<<<<<<<<<<< + * step = 1 + * + */ + __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":829 + * + * if not have_step: + * step = 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_step = 1; + + /* "View.MemoryView":828 + * stop = shape + * + * if not have_step: # <<<<<<<<<<<<<< + * step = 1 + * + */ + } + + /* "View.MemoryView":833 + * + * 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":835 + * 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":836 + * + * if (stop - start) - step * new_shape: + * new_shape += 1 # <<<<<<<<<<<<<< + * + * if new_shape < 0: + */ + __pyx_v_new_shape = (__pyx_v_new_shape + 1); + + /* "View.MemoryView":835 + * new_shape = (stop - start) // step + * + * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<< + * new_shape += 1 + * + */ + } + + /* "View.MemoryView":838 + * 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":839 + * + * if new_shape < 0: + * new_shape = 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_new_shape = 0; + + /* "View.MemoryView":838 + * new_shape += 1 + * + * if new_shape < 0: # <<<<<<<<<<<<<< + * new_shape = 0 + * + */ + } + + /* "View.MemoryView":842 + * + * + * 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":843 + * + * 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":844 + * 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":847 + * + * + * 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":848 + * + * 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":847 + * + * + * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<< + * dst.data += start * stride + * else: + */ + goto __pyx_L23; + } + + /* "View.MemoryView":850 + * 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":852 + * 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":853 + * + * 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":854 + * 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":855 + * 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":854 + * if suboffset >= 0: + * if not is_slice: + * if new_ndim == 0: # <<<<<<<<<<<<<< + * dst.data = ( dst.data)[0] + suboffset + * else: + */ + goto __pyx_L26; + } + + /* "View.MemoryView":857 + * 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":858 + * 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, __pyx_k_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L26:; + + /* "View.MemoryView":853 + * + * if suboffset >= 0: + * if not is_slice: # <<<<<<<<<<<<<< + * if new_ndim == 0: + * dst.data = ( dst.data)[0] + suboffset + */ + goto __pyx_L25; + } + + /* "View.MemoryView":860 + * "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":852 + * dst.suboffsets[suboffset_dim[0]] += start * stride + * + * if suboffset >= 0: # <<<<<<<<<<<<<< + * if not is_slice: + * if new_ndim == 0: + */ + } + + /* "View.MemoryView":862 + * suboffset_dim[0] = new_ndim + * + * return 0 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":765 + * + * @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 = PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":868 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pybuffer_index", 0); + + /* "View.MemoryView":870 + * 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":871 + * 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":874 + * 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":875 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize); + + /* "View.MemoryView":876 + * if view.ndim == 0: + * shape = view.len / itemsize + * stride = itemsize # <<<<<<<<<<<<<< + * else: + * shape = view.shape[dim] + */ + __pyx_v_stride = __pyx_v_itemsize; + + /* "View.MemoryView":874 + * cdef char *resultp + * + * if view.ndim == 0: # <<<<<<<<<<<<<< + * shape = view.len / itemsize + * stride = itemsize + */ + goto __pyx_L3; + } + + /* "View.MemoryView":878 + * 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":879 + * 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":880 + * 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":881 + * 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":880 + * shape = view.shape[dim] + * stride = view.strides[dim] + * if view.suboffsets != NULL: # <<<<<<<<<<<<<< + * suboffset = view.suboffsets[dim] + * + */ + } + } + __pyx_L3:; + + /* "View.MemoryView":883 + * 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":884 + * + * 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":885 + * 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 (__pyx_t_2) { + + /* "View.MemoryView":886 + * 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_filename = __pyx_f[3]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __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; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":885 + * if index < 0: + * index += view.shape[dim] + * if index < 0: # <<<<<<<<<<<<<< + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + * + */ + } + + /* "View.MemoryView":883 + * suboffset = view.suboffsets[dim] + * + * if index < 0: # <<<<<<<<<<<<<< + * index += view.shape[dim] + * if index < 0: + */ + } + + /* "View.MemoryView":888 + * 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 (__pyx_t_2) { + + /* "View.MemoryView":889 + * + * if index >= shape: + * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<< + * + * resultp = bufp + index * stride + */ + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":888 + * 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":891 + * 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":892 + * + * 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":893 + * 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":892 + * + * resultp = bufp + index * stride + * if suboffset >= 0: # <<<<<<<<<<<<<< + * resultp = ( resultp)[0] + suboffset + * + */ + } + + /* "View.MemoryView":895 + * resultp = ( resultp)[0] + suboffset + * + * return resultp # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_resultp; + goto __pyx_L0; + + /* "View.MemoryView":868 + * + * @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":901 + * + * @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; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":902 + * @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":904 + * 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":905 + * + * 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":909 + * + * 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); + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_3; __pyx_t_1+=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":910 + * 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":911 + * 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_4 = (__pyx_v_strides[__pyx_v_j]); + __pyx_t_5 = (__pyx_v_strides[__pyx_v_i]); + (__pyx_v_strides[__pyx_v_i]) = __pyx_t_4; + (__pyx_v_strides[__pyx_v_j]) = __pyx_t_5; + + /* "View.MemoryView":912 + * 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_5 = (__pyx_v_shape[__pyx_v_j]); + __pyx_t_4 = (__pyx_v_shape[__pyx_v_i]); + (__pyx_v_shape[__pyx_v_i]) = __pyx_t_5; + (__pyx_v_shape[__pyx_v_j]) = __pyx_t_4; + + /* "View.MemoryView":914 + * 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_7 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0); + if (!__pyx_t_7) { + } else { + __pyx_t_6 = __pyx_t_7; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_7 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0); + __pyx_t_6 = __pyx_t_7; + __pyx_L6_bool_binop_done:; + if (__pyx_t_6) { + + /* "View.MemoryView":915 + * + * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<< + * + * return 1 + */ + __pyx_t_8 = __pyx_memoryview_err(__pyx_builtin_ValueError, __pyx_k_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":914 + * 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":917 + * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + * + * return 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "View.MemoryView":901 + * + * @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 = PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":934 + * 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":935 + * + * 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":934 + * 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":937 + * __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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("convert_item_to_object", 0); + + /* "View.MemoryView":938 + * + * 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":939 + * 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_filename = __pyx_f[3]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "View.MemoryView":938 + * + * cdef convert_item_to_object(self, char *itemp): + * if self.to_object_func != NULL: # <<<<<<<<<<<<<< + * return self.to_object_func(itemp) + * else: + */ + } + + /* "View.MemoryView":941 + * 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_filename = __pyx_f[3]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + } + + /* "View.MemoryView":937 + * __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":943 + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("assign_item_from_object", 0); + + /* "View.MemoryView":944 + * + * 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":945 + * 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 == 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":944 + * + * 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":947 + * self.to_dtype_func(itemp, value) + * else: + * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<< + * + * property base: + */ + /*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_filename = __pyx_f[3]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "View.MemoryView":943 + * 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":951 + * property base: + * @cname('__pyx_memoryviewslice__get__base') + * def __get__(self): # <<<<<<<<<<<<<< + * return self.from_object + * + */ + +/* Python wrapper */ +static PyObject *__pyx_memoryviewslice__get__base(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_memoryviewslice__get__base(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":952 + * @cname('__pyx_memoryviewslice__get__base') + * def __get__(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":951 + * property base: + * @cname('__pyx_memoryviewslice__get__base') + * def __get__(self): # <<<<<<<<<<<<<< + * return self.from_object + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":958 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_fromslice", 0); + + /* "View.MemoryView":966 + * 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":967 + * + * if memviewslice.memview == Py_None: + * return None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + + /* "View.MemoryView":966 + * cdef _memoryviewslice result + * + * if memviewslice.memview == Py_None: # <<<<<<<<<<<<<< + * return None + * + */ + } + + /* "View.MemoryView":972 + * + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __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":974 + * 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":975 + * + * result.from_slice = memviewslice + * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<< + * + * result.from_object = ( memviewslice.memview).base + */ + __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1); + + /* "View.MemoryView":977 + * __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_filename = __pyx_f[3]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __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":978 + * + * 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":980 + * 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":981 + * + * 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":982 + * 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":983 + * 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":984 + * result.view.ndim = ndim + * (<__pyx_buffer *> &result.view).obj = Py_None + * Py_INCREF(Py_None) # <<<<<<<<<<<<<< + * + * result.flags = PyBUF_RECORDS + */ + Py_INCREF(Py_None); + + /* "View.MemoryView":986 + * Py_INCREF(Py_None) + * + * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<< + * + * result.view.shape = result.from_slice.shape + */ + __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS; + + /* "View.MemoryView":988 + * result.flags = PyBUF_RECORDS + * + * 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":989 + * + * 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":992 + * + * + * 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":993 + * + * 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":994 + * 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":995 + * 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":996 + * if suboffset >= 0: + * result.view.suboffsets = result.from_slice.suboffsets + * break # <<<<<<<<<<<<<< + * + * result.view.len = result.view.itemsize + */ + goto __pyx_L5_break; + + /* "View.MemoryView":994 + * result.view.suboffsets = NULL + * for suboffset in result.from_slice.suboffsets[:ndim]: + * if suboffset >= 0: # <<<<<<<<<<<<<< + * result.view.suboffsets = result.from_slice.suboffsets + * break + */ + } + } + __pyx_L5_break:; + + /* "View.MemoryView":998 + * 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":999 + * + * 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_filename = __pyx_f[3]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2); + __pyx_t_2 = 0; + + /* "View.MemoryView":1000 + * 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_filename = __pyx_f[3]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_result->__pyx_base.view.len = __pyx_t_9; + } + + /* "View.MemoryView":1002 + * 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":1003 + * + * 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":1005 + * 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":958 + * + * @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":1008 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_slice_from_memview", 0); + + /* "View.MemoryView":1011 + * __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":1012 + * 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_filename = __pyx_f[3]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __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":1013 + * 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":1011 + * __Pyx_memviewslice *mslice): + * cdef _memoryviewslice obj + * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<< + * obj = memview + * return &obj.from_slice + */ + } + + /* "View.MemoryView":1015 + * return &obj.from_slice + * else: + * slice_copy(memview, mslice) # <<<<<<<<<<<<<< + * return mslice + * + */ + /*else*/ { + __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice); + + /* "View.MemoryView":1016 + * else: + * slice_copy(memview, mslice) + * return mslice # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_slice_copy') + */ + __pyx_r = __pyx_v_mslice; + goto __pyx_L0; + } + + /* "View.MemoryView":1008 + * + * @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, 0, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "View.MemoryView":1019 + * + * @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; + Py_ssize_t __pyx_t_4; + __Pyx_RefNannySetupContext("slice_copy", 0); + + /* "View.MemoryView":1023 + * 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":1024 + * + * 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":1025 + * 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":1027 + * 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":1028 + * + * 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":1030 + * 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; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_dim = __pyx_t_3; + + /* "View.MemoryView":1031 + * + * 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":1032 + * 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":1033 + * 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_4 = (__pyx_v_suboffsets[__pyx_v_dim]); + } else { + __pyx_t_4 = -1L; + } + (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_4; + } + + /* "View.MemoryView":1019 + * + * @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":1036 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_copy", 0); + + /* "View.MemoryView":1039 + * "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":1040 + * 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_filename = __pyx_f[3]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1036 + * + * @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":1043 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0); + + /* "View.MemoryView":1050 + * 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":1051 + * + * 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":1052 + * 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":1050 + * 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":1054 + * 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":1055 + * 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":1057 + * 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":1059 + * 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_filename = __pyx_f[3]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "View.MemoryView":1043 + * + * @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":1065 + * + * + * 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":1066 + * + * 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":1067 + * 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":1066 + * + * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + * if arg < 0: # <<<<<<<<<<<<<< + * return -arg + * else: + */ + } + + /* "View.MemoryView":1069 + * return -arg + * else: + * return arg # <<<<<<<<<<<<<< + * + * @cname('__pyx_get_best_slice_order') + */ + /*else*/ { + __pyx_r = __pyx_v_arg; + goto __pyx_L0; + } + + /* "View.MemoryView":1065 + * + * + * 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":1072 + * + * @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; + + /* "View.MemoryView":1077 + * """ + * cdef int i + * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<< + * cdef Py_ssize_t f_stride = 0 + * + */ + __pyx_v_c_stride = 0; + + /* "View.MemoryView":1078 + * 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":1080 + * 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 > -1L; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1081 + * + * 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":1082 + * 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":1083 + * if mslice.shape[i] > 1: + * c_stride = mslice.strides[i] + * break # <<<<<<<<<<<<<< + * + * for i in range(ndim): + */ + goto __pyx_L4_break; + + /* "View.MemoryView":1081 + * + * for i in range(ndim - 1, -1, -1): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * c_stride = mslice.strides[i] + * break + */ + } + } + __pyx_L4_break:; + + /* "View.MemoryView":1085 + * break + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if mslice.shape[i] > 1: + * f_stride = mslice.strides[i] + */ + __pyx_t_1 = __pyx_v_ndim; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1086 + * + * 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":1087 + * 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":1088 + * 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":1086 + * + * for i in range(ndim): + * if mslice.shape[i] > 1: # <<<<<<<<<<<<<< + * f_stride = mslice.strides[i] + * break + */ + } + } + __pyx_L7_break:; + + /* "View.MemoryView":1090 + * 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":1091 + * + * 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":1090 + * break + * + * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<< + * return 'C' + * else: + */ + } + + /* "View.MemoryView":1093 + * return 'C' + * else: + * return 'F' # <<<<<<<<<<<<<< + * + * @cython.cdivision(True) + */ + /*else*/ { + __pyx_r = 'F'; + goto __pyx_L0; + } + + /* "View.MemoryView":1072 + * + * @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":1096 + * + * @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; + + /* "View.MemoryView":1103 + * + * 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":1104 + * 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":1105 + * 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":1106 + * 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":1108 + * 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":1109 + * + * 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":1110 + * 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":1109 + * + * 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":1111 + * 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): + */ + memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)); + + /* "View.MemoryView":1109 + * + * 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":1113 + * 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; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1114 + * else: + * for i in range(dst_extent): + * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<< + * src_data += src_stride + * dst_data += dst_stride + */ + memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize); + + /* "View.MemoryView":1115 + * 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":1116 + * 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":1108 + * 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":1118 + * 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; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1119 + * 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":1123 + * 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":1124 + * 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":1096 + * + * @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":1126 + * 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":1129 + * __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":1126 + * 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":1133 + * + * @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; + + /* "View.MemoryView":1136 + * "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":1138 + * cdef Py_ssize_t size = src.memview.view.itemsize + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * size *= src.shape[i] + * + */ + __pyx_t_2 = __pyx_v_ndim; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1139 + * + * 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":1141 + * size *= src.shape[i] + * + * return size # <<<<<<<<<<<<<< + * + * @cname('__pyx_fill_contig_strides_array') + */ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "View.MemoryView":1133 + * + * @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":1144 + * + * @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; + + /* "View.MemoryView":1153 + * 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":1154 + * + * if order == 'F': + * for idx in range(ndim): # <<<<<<<<<<<<<< + * strides[idx] = stride + * stride = stride * shape[idx] + */ + __pyx_t_2 = __pyx_v_ndim; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_idx = __pyx_t_3; + + /* "View.MemoryView":1155 + * 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":1156 + * 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":1153 + * cdef int idx + * + * if order == 'F': # <<<<<<<<<<<<<< + * for idx in range(ndim): + * strides[idx] = stride + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1158 + * 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 > -1L; __pyx_t_2-=1) { + __pyx_v_idx = __pyx_t_2; + + /* "View.MemoryView":1159 + * 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":1160 + * 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":1162 + * stride = stride * shape[idx] + * + * return stride # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_data_to_temp') + */ + __pyx_r = __pyx_v_stride; + goto __pyx_L0; + + /* "View.MemoryView":1144 + * + * @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":1165 + * + * @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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":1176 + * 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":1177 + * + * 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":1179 + * 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":1180 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err(MemoryError, NULL) + * + */ + __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1181 + * result = malloc(size) + * if not result: + * _err(MemoryError, NULL) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":1180 + * + * result = malloc(size) + * if not result: # <<<<<<<<<<<<<< + * _err(MemoryError, NULL) + * + */ + } + + /* "View.MemoryView":1184 + * + * + * tmpslice.data = result # <<<<<<<<<<<<<< + * tmpslice.memview = src.memview + * for i in range(ndim): + */ + __pyx_v_tmpslice->data = ((char *)__pyx_v_result); + + /* "View.MemoryView":1185 + * + * 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":1186 + * 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; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1187 + * 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":1188 + * 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":1190 + * tmpslice.suboffsets[i] = -1 + * + * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<< + * ndim, order) + * + */ + __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":1194 + * + * + * for i in range(ndim): # <<<<<<<<<<<<<< + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 + */ + __pyx_t_3 = __pyx_v_ndim; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "View.MemoryView":1195 + * + * 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":1196 + * for i in range(ndim): + * if tmpslice.shape[i] == 1: + * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<< + * + * if slice_is_contig(src, order, ndim): + */ + (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0; + + /* "View.MemoryView":1195 + * + * for i in range(ndim): + * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<< + * tmpslice.strides[i] = 0 + * + */ + } + } + + /* "View.MemoryView":1198 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: + */ + __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1199 + * + * if slice_is_contig(src, order, ndim): + * memcpy(result, src.data, size) # <<<<<<<<<<<<<< + * else: + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + */ + memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size); + + /* "View.MemoryView":1198 + * tmpslice.strides[i] = 0 + * + * if slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<< + * memcpy(result, src.data, size) + * else: + */ + goto __pyx_L9; + } + + /* "View.MemoryView":1201 + * 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":1203 + * copy_strided_to_strided(src, tmpslice, ndim, itemsize) + * + * return result # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "View.MemoryView":1165 + * + * @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 = PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = NULL; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1208 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err_extents", 0); + + /* "View.MemoryView":1211 + * 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_filename = __pyx_f[3]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __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":1210 + * 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_filename = __pyx_f[3]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":1208 + * + * @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 + PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1214 + * + * @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; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err_dim", 0); + __Pyx_INCREF(__pyx_v_error); + + /* "View.MemoryView":1215 + * @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_filename = __pyx_f[3]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_2) { + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else { + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __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_filename = __pyx_f[3]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":1214 + * + * @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_XDECREF(__pyx_t_5); + __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 + PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1218 + * + * @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; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("_err", 0); + __Pyx_INCREF(__pyx_v_error); + + /* "View.MemoryView":1219 + * @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 (__pyx_t_1) { + + /* "View.MemoryView":1220 + * 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_filename = __pyx_f[3]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON && 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); + } + } + if (!__pyx_t_5) { + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else { + __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __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_filename = __pyx_f[3]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":1219 + * @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":1222 + * raise error(msg.decode('ascii')) + * else: + * raise error # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_copy_contents') + */ + /*else*/ { + __Pyx_Raise(__pyx_v_error, 0, 0, 0); + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + + /* "View.MemoryView":1218 + * + * @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_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_XDECREF(__pyx_v_error); + __Pyx_RefNannyFinishContext(); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif + return __pyx_r; +} + +/* "View.MemoryView":1225 + * + * @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; + void *__pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "View.MemoryView":1233 + * 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":1234 + * """ + * 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":1236 + * 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":1237 + * 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":1238 + * 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":1241 + * 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":1242 + * + * 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":1241 + * 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":1243 + * 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":1244 + * 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":1243 + * 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":1246 + * 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":1248 + * 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; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_5; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1249 + * + * 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":1250 + * 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":1251 + * 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":1252 + * 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":1250 + * 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":1254 + * src.strides[i] = 0 + * else: + * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<< + * + * if src.suboffsets[i] >= 0: + */ + /*else*/ { + __pyx_t_4 = __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_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_L7:; + + /* "View.MemoryView":1249 + * + * for i in range(ndim): + * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<< + * if src.shape[i] == 1: + * broadcasting = True + */ + } + + /* "View.MemoryView":1256 + * _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":1257 + * + * if src.suboffsets[i] >= 0: + * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<< + * + * if slices_overlap(&src, &dst, ndim, itemsize): + */ + __pyx_t_4 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, __pyx_k_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":1256 + * _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":1259 + * _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":1261 + * 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":1262 + * + * 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":1261 + * if slices_overlap(&src, &dst, ndim, itemsize): + * + * if not slice_is_contig(&src, order, ndim): # <<<<<<<<<<<<<< + * order = get_best_order(&dst, ndim) + * + */ + } + + /* "View.MemoryView":1264 + * order = get_best_order(&dst, ndim) + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<< + * src = tmp + * + */ + __pyx_t_6 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_tmpdata = __pyx_t_6; + + /* "View.MemoryView":1265 + * + * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + * src = tmp # <<<<<<<<<<<<<< + * + * if not broadcasting: + */ + __pyx_v_src = __pyx_v_tmp; + + /* "View.MemoryView":1259 + * _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":1267 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0); + if (__pyx_t_2) { + + /* "View.MemoryView":1270 + * + * + * 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":1271 + * + * 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":1270 + * + * + * 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":1272 + * 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":1273 + * 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":1272 + * 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":1275 + * 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":1277 + * 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":1278 + * + * 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) + */ + memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)); + + /* "View.MemoryView":1279 + * 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":1280 + * 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":1281 + * 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":1275 + * direct_copy = slice_is_contig(&dst, 'F', ndim) + * + * if direct_copy: # <<<<<<<<<<<<<< + * + * refcount_copying(&dst, dtype_is_object, ndim, False) + */ + } + + /* "View.MemoryView":1267 + * src = tmp + * + * if not broadcasting: # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":1283 + * 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_7 = (__pyx_t_2 != 0); + if (__pyx_t_7) { + + /* "View.MemoryView":1286 + * + * + * transpose_memslice(&src) # <<<<<<<<<<<<<< + * transpose_memslice(&dst) + * + */ + __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":1287 + * + * 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 == 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":1283 + * return 0 + * + * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<< + * + * + */ + } + + /* "View.MemoryView":1289 + * 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":1290 + * + * 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":1291 + * 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":1293 + * refcount_copying(&dst, dtype_is_object, ndim, True) + * + * free(tmpdata) # <<<<<<<<<<<<<< + * return 0 + * + */ + free(__pyx_v_tmpdata); + + /* "View.MemoryView":1294 + * + * free(tmpdata) + * return 0 # <<<<<<<<<<<<<< + * + * @cname('__pyx_memoryview_broadcast_leading') + */ + __pyx_r = 0; + goto __pyx_L0; + + /* "View.MemoryView":1225 + * + * @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 = PyGILState_Ensure(); + #endif + __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif + } + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "View.MemoryView":1297 + * + * @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; + + /* "View.MemoryView":1301 + * 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":1303 + * 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 > -1L; __pyx_t_1-=1) { + __pyx_v_i = __pyx_t_1; + + /* "View.MemoryView":1304 + * + * 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":1305 + * 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":1306 + * 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":1308 + * 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; + for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { + __pyx_v_i = __pyx_t_2; + + /* "View.MemoryView":1309 + * + * 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":1310 + * 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":1311 + * mslice.shape[i] = 1 + * mslice.strides[i] = mslice.strides[0] + * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<< + * + * + */ + (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L; + } + + /* "View.MemoryView":1297 + * + * @cname('__pyx_memoryview_broadcast_leading') + * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<< + * int ndim, + * int ndim_other) nogil: + */ + + /* function exit code */ +} + +/* "View.MemoryView":1319 + * + * @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":1323 + * + * + * 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":1324 + * + * 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":1323 + * + * + * if dtype_is_object: # <<<<<<<<<<<<<< + * refcount_objects_in_slice_with_gil(dst.data, dst.shape, + * dst.strides, ndim, inc) + */ + } + + /* "View.MemoryView":1319 + * + * @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":1328 + * + * @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 = PyGILState_Ensure(); + #endif + __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0); + + /* "View.MemoryView":1331 + * 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":1328 + * + * @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 + PyGILState_Release(__pyx_gilstate_save); + #endif +} + +/* "View.MemoryView":1334 + * + * @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; + int __pyx_t_3; + __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0); + + /* "View.MemoryView":1338 + * cdef Py_ssize_t i + * + * for i in range(shape[0]): # <<<<<<<<<<<<<< + * if ndim == 1: + * if inc: + */ + __pyx_t_1 = (__pyx_v_shape[0]); + for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { + __pyx_v_i = __pyx_t_2; + + /* "View.MemoryView":1339 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) + */ + __pyx_t_3 = ((__pyx_v_ndim == 1) != 0); + if (__pyx_t_3) { + + /* "View.MemoryView":1340 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: + */ + __pyx_t_3 = (__pyx_v_inc != 0); + if (__pyx_t_3) { + + /* "View.MemoryView":1341 + * if ndim == 1: + * if inc: + * Py_INCREF(( data)[0]) # <<<<<<<<<<<<<< + * else: + * Py_DECREF(( data)[0]) + */ + Py_INCREF((((PyObject **)__pyx_v_data)[0])); + + /* "View.MemoryView":1340 + * for i in range(shape[0]): + * if ndim == 1: + * if inc: # <<<<<<<<<<<<<< + * Py_INCREF(( data)[0]) + * else: + */ + goto __pyx_L6; + } + + /* "View.MemoryView":1343 + * 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":1339 + * + * for i in range(shape[0]): + * if ndim == 1: # <<<<<<<<<<<<<< + * if inc: + * Py_INCREF(( data)[0]) + */ + goto __pyx_L5; + } + + /* "View.MemoryView":1345 + * Py_DECREF(( data)[0]) + * else: + * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<< + * ndim - 1, inc) + * + */ + /*else*/ { + + /* "View.MemoryView":1346 + * 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":1348 + * ndim - 1, inc) + * + * data += strides[0] # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0])); + } + + /* "View.MemoryView":1334 + * + * @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":1354 + * + * @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":1357 + * 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":1358 + * 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":1360 + * _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":1354 + * + * @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":1364 + * + * @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; + + /* "View.MemoryView":1368 + * 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":1369 + * 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":1371 + * 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":1372 + * + * if ndim == 1: + * for i in range(extent): # <<<<<<<<<<<<<< + * memcpy(data, item, itemsize) + * data += stride + */ + __pyx_t_2 = __pyx_v_extent; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1373 + * if ndim == 1: + * for i in range(extent): + * memcpy(data, item, itemsize) # <<<<<<<<<<<<<< + * data += stride + * else: + */ + memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize); + + /* "View.MemoryView":1374 + * 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":1371 + * cdef Py_ssize_t extent = shape[0] + * + * if ndim == 1: # <<<<<<<<<<<<<< + * for i in range(extent): + * memcpy(data, item, itemsize) + */ + goto __pyx_L3; + } + + /* "View.MemoryView":1376 + * 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; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "View.MemoryView":1377 + * 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":1379 + * _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":1364 + * + * @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 */ +} + +/* "FromPyStructUtility":11 + * + * @cname("__pyx_convert__from_py_epicsTimeStamp") + * cdef epicsTimeStamp __pyx_convert__from_py_epicsTimeStamp(obj) except *: # <<<<<<<<<<<<<< + * cdef epicsTimeStamp result + * if not PyMapping_Check(obj): + */ + +static struct epicsTimeStamp __pyx_convert__from_py_epicsTimeStamp(PyObject *__pyx_v_obj) { + struct epicsTimeStamp __pyx_v_result; + PyObject *__pyx_v_value = NULL; + struct epicsTimeStamp __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; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + unsigned int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert__from_py_epicsTimeStamp", 0); + + /* "FromPyStructUtility":13 + * cdef epicsTimeStamp __pyx_convert__from_py_epicsTimeStamp(obj) except *: + * cdef epicsTimeStamp result + * if not PyMapping_Check(obj): # <<<<<<<<<<<<<< + * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) + * + */ + __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0); + if (__pyx_t_1) { + + /* "FromPyStructUtility":14 + * cdef epicsTimeStamp result + * if not PyMapping_Check(obj): + * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) # <<<<<<<<<<<<<< + * + * try: + */ + __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, __pyx_k_Expected_16s_got_200s, __pyx_k_a_mapping, Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "FromPyStructUtility":13 + * cdef epicsTimeStamp __pyx_convert__from_py_epicsTimeStamp(obj) except *: + * cdef epicsTimeStamp result + * if not PyMapping_Check(obj): # <<<<<<<<<<<<<< + * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) + * + */ + } + + /* "FromPyStructUtility":16 + * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) + * + * try: # <<<<<<<<<<<<<< + * value = obj['secPastEpoch'] + * except KeyError: + */ + { + __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:*/ { + + /* "FromPyStructUtility":17 + * + * try: + * value = obj['secPastEpoch'] # <<<<<<<<<<<<<< + * except KeyError: + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") + */ + __pyx_t_2 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_secPastEpoch); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L4_error;}; + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_value = __pyx_t_2; + __pyx_t_2 = 0; + + /* "FromPyStructUtility":16 + * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) + * + * try: # <<<<<<<<<<<<<< + * value = obj['secPastEpoch'] + * except KeyError: + */ + } + __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_L11_try_end; + __pyx_L4_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "FromPyStructUtility":18 + * try: + * value = obj['secPastEpoch'] + * except KeyError: # <<<<<<<<<<<<<< + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") + * result.secPastEpoch = value + */ + __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_6) { + __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_epicsTimeStamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_8); + + /* "FromPyStructUtility":19 + * value = obj['secPastEpoch'] + * except KeyError: + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") # <<<<<<<<<<<<<< + * result.secPastEpoch = value + * try: + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__271, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + } + goto __pyx_L6_except_error; + __pyx_L6_except_error:; + + /* "FromPyStructUtility":16 + * PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) + * + * try: # <<<<<<<<<<<<<< + * value = obj['secPastEpoch'] + * except KeyError: + */ + __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_L11_try_end:; + } + + /* "FromPyStructUtility":20 + * except KeyError: + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") + * result.secPastEpoch = value # <<<<<<<<<<<<<< + * try: + * value = obj['nsec'] + */ + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result.secPastEpoch = __pyx_t_10; + + /* "FromPyStructUtility":21 + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") + * result.secPastEpoch = value + * try: # <<<<<<<<<<<<<< + * value = obj['nsec'] + * except KeyError: + */ + { + __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "FromPyStructUtility":22 + * result.secPastEpoch = value + * try: + * value = obj['nsec'] # <<<<<<<<<<<<<< + * except KeyError: + * raise ValueError("No value specified for struct attribute 'nsec'") + */ + __pyx_t_8 = PyObject_GetItem(__pyx_v_obj, __pyx_n_s_nsec); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L14_error;}; + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8); + __pyx_t_8 = 0; + + /* "FromPyStructUtility":21 + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") + * result.secPastEpoch = value + * try: # <<<<<<<<<<<<<< + * value = obj['nsec'] + * except KeyError: + */ + } + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L21_try_end; + __pyx_L14_error:; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "FromPyStructUtility":23 + * try: + * value = obj['nsec'] + * except KeyError: # <<<<<<<<<<<<<< + * raise ValueError("No value specified for struct attribute 'nsec'") + * result.nsec = value + */ + __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_6) { + __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_epicsTimeStamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_2); + + /* "FromPyStructUtility":24 + * value = obj['nsec'] + * except KeyError: + * raise ValueError("No value specified for struct attribute 'nsec'") # <<<<<<<<<<<<<< + * result.nsec = value + * return result + */ + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__272, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_Raise(__pyx_t_9, 0, 0, 0); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;} + } + goto __pyx_L16_except_error; + __pyx_L16_except_error:; + + /* "FromPyStructUtility":21 + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") + * result.secPastEpoch = value + * try: # <<<<<<<<<<<<<< + * value = obj['nsec'] + * except KeyError: + */ + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L21_try_end:; + } + + /* "FromPyStructUtility":25 + * except KeyError: + * raise ValueError("No value specified for struct attribute 'nsec'") + * result.nsec = value # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_result.nsec = __pyx_t_10; + + /* "FromPyStructUtility":26 + * raise ValueError("No value specified for struct attribute 'nsec'") + * result.nsec = value + * return result # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "FromPyStructUtility":11 + * + * @cname("__pyx_convert__from_py_epicsTimeStamp") + * cdef epicsTimeStamp __pyx_convert__from_py_epicsTimeStamp(obj) except *: # <<<<<<<<<<<<<< + * cdef epicsTimeStamp result + * if not PyMapping_Check(obj): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_epicsTimeStamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_value); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "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 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 *__pyx_v_data; + std::string __pyx_r; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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 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 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_data = __pyx_t_1; + + /* "string.from_py":16 + * cdef Py_ssize_t length + * cdef 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 char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":67 + * + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(v[i]) for i in range(v.size())] + * + */ + +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; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_unsigned_int", 0); + + /* "vector.to_py":68 + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): + * return [X_to_py(v[i]) for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":67 + * + * @cname("__pyx_convert_vector_to_py_unsigned_int") + * cdef object __pyx_convert_vector_to_py_unsigned_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(v[i]) for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __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; +} + +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; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_std_3a__3a_string", 0); + + /* "vector.to_py":68 + * @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 [X_to_py(v[i]) for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + __pyx_t_4 = __pyx_convert_PyObject_string_to_py_std__in_string((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":67 + * + * @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 [X_to_py(v[i]) for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __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; +} + +/* "vector.from_py":50 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_std_3a__3a_string", 0); + + /* "vector.from_py":52 + * 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(X_from_py(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_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __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":53 + * cdef vector[X] v + * for item in o: + * v.push_back(X_from_py(item)) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_item); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.push_back(__pyx_t_5); + + /* "vector.from_py":52 + * 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(X_from_py(item)) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":54 + * for item in o: + * v.push_back(X_from_py(item)) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":50 + * + * @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_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_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":49 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0); + + /* "vector.from_py":51 + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(X_from_py(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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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":52 + * cdef vector[X] v + * for item in o: + * v.push_back(X_from_py(item)) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely(__pyx_t_5 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.push_back(__pyx_t_5); + + /* "vector.from_py":51 + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(X_from_py(item)) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":53 + * for item in o: + * v.push_back(X_from_py(item)) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":49 + * + * @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_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_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":67 + * + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(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; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0); + + /* "vector.to_py":68 + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): + * return [X_to_py(v[i]) for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":67 + * + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(v[i]) for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __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; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_dbr_long_t", 0); + + /* "vector.to_py":68 + * @cname("__pyx_convert_vector_to_py_dbr_long_t") + * cdef object __pyx_convert_vector_to_py_dbr_long_t(vector[X]& v): + * return [X_to_py(v[i]) for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + __pyx_t_4 = __Pyx_PyInt_From_dbr_long_t((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":67 + * + * @cname("__pyx_convert_vector_to_py_dbr_long_t") + * cdef object __pyx_convert_vector_to_py_dbr_long_t(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(v[i]) for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __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; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_double", 0); + + /* "vector.to_py":68 + * @cname("__pyx_convert_vector_to_py_double") + * cdef object __pyx_convert_vector_to_py_double(vector[X]& v): + * return [X_to_py(v[i]) for i in range(v.size())] # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_v_v.size(); + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "vector.to_py":67 + * + * @cname("__pyx_convert_vector_to_py_double") + * cdef object __pyx_convert_vector_to_py_double(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(v[i]) for i in range(v.size())] + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __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":49 + * + * @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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_char__const___2a_", 0); + + /* "vector.from_py":51 + * 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(X_from_py(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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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":52 + * cdef vector[X] v + * for item in o: + * v.push_back(X_from_py(item)) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_item); if (unlikely(__pyx_t_5 == NULL && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.push_back(__pyx_t_5); + + /* "vector.from_py":51 + * 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(X_from_py(item)) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":53 + * for item in o: + * v.push_back(X_from_py(item)) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":49 + * + * @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_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_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_double", 0); + + /* "vector.from_py":51 + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(X_from_py(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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __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_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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":52 + * cdef vector[X] v + * for item in o: + * v.push_back(X_from_py(item)) # <<<<<<<<<<<<<< + * return v + * + */ + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_item); if (unlikely(__pyx_t_5 == -1.0 && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_v.push_back(__pyx_t_5); + + /* "vector.from_py":51 + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: + * cdef vector[X] v + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(X_from_py(item)) + * return v + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "vector.from_py":53 + * for item in o: + * v.push_back(X_from_py(item)) + * return v # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":49 + * + * @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_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_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_tp_new_6PyCafe__finalizer(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; + return o; +} + +static void __pyx_tp_dealloc_6PyCafe__finalizer(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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_10_finalizer_1__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_6PyCafe__finalizer[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe__finalizer = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe._finalizer", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe__finalizer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe__finalizer, /*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__finalizer, /*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__finalizer, /*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_CyCa(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_4CyCa_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_CyCa(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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_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_TIMEOUT(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_4CyCa_14CY_ECA_TIMEOUT_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_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_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_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 PyMethodDef __pyx_methods_6PyCafe_CyCa[] = { + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CyCa[] = { + {(char *)"CY_DBE_VALUE", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_VALUE, 0, 0, 0}, + {(char *)"CY_DBE_LOG", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_LOG, 0, 0, 0}, + {(char *)"CY_DBE_ARCHIVE", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_ARCHIVE, 0, 0, 0}, + {(char *)"CY_DBE_ALARM", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_ALARM, 0, 0, 0}, + {(char *)"CY_DBE_PROPERTY", __pyx_getprop_6PyCafe_4CyCa_CY_DBE_PROPERTY, 0, 0, 0}, + {(char *)"CY_DBR_PRIMITIVE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PRIMITIVE, 0, 0, 0}, + {(char *)"CY_DBR_PLAIN", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PLAIN, 0, 0, 0}, + {(char *)"CY_DBR_STS", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS, 0, 0, 0}, + {(char *)"CY_DBR_TIME", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME, 0, 0, 0}, + {(char *)"CY_DBR_GR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR, 0, 0, 0}, + {(char *)"CY_DBR_CTRL", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL, 0, 0, 0}, + {(char *)"CY_DBR_PUT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_PUT, 0, 0, 0}, + {(char *)"CY_DBR_STSACK", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STSACK, 0, 0, 0}, + {(char *)"CY_DBR_CLASS", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CLASS, 0, 0, 0}, + {(char *)"CY_DBR_NONE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_NONE, 0, 0, 0}, + {(char *)"CY_DBR_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STRING, 0, 0, 0}, + {(char *)"CY_DBR_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_SHORT, 0, 0, 0}, + {(char *)"CY_DBR_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_INT, 0, 0, 0}, + {(char *)"CY_DBR_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_FLOAT, 0, 0, 0}, + {(char *)"CY_DBR_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_ENUM, 0, 0, 0}, + {(char *)"CY_DBR_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CHAR, 0, 0, 0}, + {(char *)"CY_DBR_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_LONG, 0, 0, 0}, + {(char *)"CY_DBR_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_DOUBLE, 0, 0, 0}, + {(char *)"CY_DBR_STS_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_STRING, 0, 0, 0}, + {(char *)"CY_DBR_STS_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_SHORT, 0, 0, 0}, + {(char *)"CY_DBR_STS_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_INT, 0, 0, 0}, + {(char *)"CY_DBR_STS_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_FLOAT, 0, 0, 0}, + {(char *)"CY_DBR_STS_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_ENUM, 0, 0, 0}, + {(char *)"CY_DBR_STS_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_CHAR, 0, 0, 0}, + {(char *)"CY_DBR_STS_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_LONG, 0, 0, 0}, + {(char *)"CY_DBR_STS_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_STS_DOUBLE, 0, 0, 0}, + {(char *)"CY_DBR_TIME_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_STRING, 0, 0, 0}, + {(char *)"CY_DBR_TIME_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_SHORT, 0, 0, 0}, + {(char *)"CY_DBR_TIME_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_INT, 0, 0, 0}, + {(char *)"CY_DBR_TIME_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_FLOAT, 0, 0, 0}, + {(char *)"CY_DBR_TIME_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_ENUM, 0, 0, 0}, + {(char *)"CY_DBR_TIME_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_CHAR, 0, 0, 0}, + {(char *)"CY_DBR_TIME_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_LONG, 0, 0, 0}, + {(char *)"CY_DBR_TIME_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_TIME_DOUBLE, 0, 0, 0}, + {(char *)"CY_DBR_GR_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_STRING, 0, 0, 0}, + {(char *)"CY_DBR_GR_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_SHORT, 0, 0, 0}, + {(char *)"CY_DBR_GR_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_INT, 0, 0, 0}, + {(char *)"CY_DBR_GR_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_FLOAT, 0, 0, 0}, + {(char *)"CY_DBR_GR_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_ENUM, 0, 0, 0}, + {(char *)"CY_DBR_GR_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_CHAR, 0, 0, 0}, + {(char *)"CY_DBR_GR_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_LONG, 0, 0, 0}, + {(char *)"CY_DBR_GR_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_GR_DOUBLE, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_STRING", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_STRING, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_SHORT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_SHORT, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_INT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_INT, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_FLOAT", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_FLOAT, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_ENUM", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_ENUM, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_CHAR", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_CHAR, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_LONG", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_LONG, 0, 0, 0}, + {(char *)"CY_DBR_CTRL_DOUBLE", __pyx_getprop_6PyCafe_4CyCa_CY_DBR_CTRL_DOUBLE, 0, 0, 0}, + {(char *)"CY_ECA_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_CY_ECA_TIMEOUT, 0, 0, 0}, + {(char *)"ICAFE_CS_NEVER_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_NEVER_CONN, 0, 0, 0}, + {(char *)"ICAFE_CS_PREV_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_PREV_CONN, 0, 0, 0}, + {(char *)"ICAFE_CS_CONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CONN, 0, 0, 0}, + {(char *)"ICAFE_CS_CLOSED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_CLOSED, 0, 0, 0}, + {(char *)"ICAFE_CS_DISCONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_DISCONN, 0, 0, 0}, + {(char *)"ICAFE_CS_UNKNOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CS_UNKNOWN, 0, 0, 0}, + {(char *)"ICAFE_TYPENOTCONN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_TYPENOTCONN, 0, 0, 0}, + {(char *)"ICAFE_RULE_FALSE", __pyx_getprop_6PyCafe_4CyCa_ICAFE_RULE_FALSE, 0, 0, 0}, + {(char *)"ICAFE_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_BADCOUNT, 0, 0, 0}, + {(char *)"ICAFE_CALLBACK_NOT_YET_INVOKED", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CALLBACK_NOT_YET_INVOKED, 0, 0, 0}, + {(char *)"ICAFE_WAITING_FOR_PREV_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_ICAFE_WAITING_FOR_PREV_CALLBACK, 0, 0, 0}, + {(char *)"ICAFE_CACHE_EMPTY", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CACHE_EMPTY, 0, 0, 0}, + {(char *)"ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT, 0, 0, 0}, + {(char *)"ICAFE_MONITOR_DELAYED_AS_CONN_DOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_MONITOR_DELAYED_AS_CONN_DOWN, 0, 0, 0}, + {(char *)"ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE", __pyx_getprop_6PyCafe_4CyCa_ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_GET", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_GET, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_PUT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_PUT, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_CREATE_CHANNEL", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CREATE_CHANNEL, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_ADD_EVENT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_ADD_EVENT, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_CLEAR_EVENT", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CLEAR_EVENT, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_OTHER", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_OTHER, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_CONN_DOWN", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_DOWN, 0, 0, 0}, + {(char *)"ICAFE_CA_OP_CONN_UP", __pyx_getprop_6PyCafe_4CyCa_ICAFE_CA_OP_CONN_UP, 0, 0, 0}, + {(char *)"ECAFE_LOAD_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_COLLECTION, 0, 0, 0}, + {(char *)"ECAFE_LOAD_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_LOAD_GROUP, 0, 0, 0}, + {(char *)"ICAFE_NORMAL", __pyx_getprop_6PyCafe_4CyCa_ICAFE_NORMAL, 0, 0, 0}, + {(char *)"ICAFE_SUCCESS", __pyx_getprop_6PyCafe_4CyCa_ICAFE_SUCCESS, 0, 0, 0}, + {(char *)"ECAFE_NODATA", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NODATA, 0, 0, 0}, + {(char *)"ECAFE_INVALID_TYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_TYPE, 0, 0, 0}, + {(char *)"ECAFE_BADCOUNT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADCOUNT, 0, 0, 0}, + {(char *)"ECAFE_BADSTR", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADSTR, 0, 0, 0}, + {(char *)"ECAFE_BADTYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_BADTYPE, 0, 0, 0}, + {(char *)"ECAFE_NO_CONVERT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NO_CONVERT, 0, 0, 0}, + {(char *)"ECAFE_NULLCONTEXT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCONTEXT, 0, 0, 0}, + {(char *)"ECAFE_NULLCHID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLCHID, 0, 0, 0}, + {(char *)"ECAFE_NULLEVID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NULLEVID, 0, 0, 0}, + {(char *)"ECAFE_UNKNOWN_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_COLLECTION, 0, 0, 0}, + {(char *)"ECAFE_EMPTY_COLLECTION", __pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_COLLECTION, 0, 0, 0}, + {(char *)"ECAFE_COLLECTION_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_PREV_DEF, 0, 0, 0}, + {(char *)"ECAFE_COLLECTION_INVALID_MEMBER", __pyx_getprop_6PyCafe_4CyCa_ECAFE_COLLECTION_INVALID_MEMBER, 0, 0, 0}, + {(char *)"ECAFE_RULE_FALSE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_RULE_FALSE, 0, 0, 0}, + {(char *)"ECAFE_UNKNOWN_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_UNKNOWN_GROUP, 0, 0, 0}, + {(char *)"ECAFE_EMPTY_GROUP", __pyx_getprop_6PyCafe_4CyCa_ECAFE_EMPTY_GROUP, 0, 0, 0}, + {(char *)"ECAFE_GROUP_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_GROUP_PREV_DEF, 0, 0, 0}, + {(char *)"ECAFE_INVALID_HANDLE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_HANDLE, 0, 0, 0}, + {(char *)"ECAFE_INVALID_GROUP_HANDLE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_GROUP_HANDLE, 0, 0, 0}, + {(char *)"ECAFE_NORDACCESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NORDACCESS, 0, 0, 0}, + {(char *)"ECAFE_NOWTACCESS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_NOWTACCESS, 0, 0, 0}, + {(char *)"ECAFE_TIMEOUT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT, 0, 0, 0}, + {(char *)"ECAFE_CANNOT_OPEN_FILE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_CANNOT_OPEN_FILE, 0, 0, 0}, + {(char *)"ECAFE_INVALID_SWITCH_CASE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_SWITCH_CASE, 0, 0, 0}, + {(char *)"ECAFE_PVALIAS_PREV_DEF", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_PREV_DEF, 0, 0, 0}, + {(char *)"ECAFE_PVALIAS_INVALID", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVALIAS_INVALID, 0, 0, 0}, + {(char *)"ECAFE_PVNAME_PREV_DEF_AS_PVALIAS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVNAME_PREV_DEF_AS_PVALIAS, 0, 0, 0}, + {(char *)"ECAFE_DEVICE_ATTRIB_NOT_FOUND", __pyx_getprop_6PyCafe_4CyCa_ECAFE_DEVICE_ATTRIB_NOT_FOUND, 0, 0, 0}, + {(char *)"ECAFE_HASH_UNIQUEID_EXISTS", __pyx_getprop_6PyCafe_4CyCa_ECAFE_HASH_UNIQUEID_EXISTS, 0, 0, 0}, + {(char *)"ECAFE_WRONG_CA_CONTEXT", __pyx_getprop_6PyCafe_4CyCa_ECAFE_WRONG_CA_CONTEXT, 0, 0, 0}, + {(char *)"ECAFE_INVALID_CAFENUM_POLICY_TYPE", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_CAFENUM_POLICY_TYPE, 0, 0, 0}, + {(char *)"ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED", __pyx_getprop_6PyCafe_4CyCa_ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED, 0, 0, 0}, + {(char *)"ECAFE_INVALID_ENUM_INDEX", __pyx_getprop_6PyCafe_4CyCa_ECAFE_INVALID_ENUM_INDEX, 0, 0, 0}, + {(char *)"ECAFE_PVGROUP_GROUPHANDLE_MISMATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_PVGROUP_GROUPHANDLE_MISMATCH, 0, 0, 0}, + {(char *)"ECAFE_TIMEOUT_SET_AND_MATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_TIMEOUT_SET_AND_MATCH, 0, 0, 0}, + {(char *)"ECAFE_HANDLE_MISMATCH_SET_AND_MATCH", __pyx_getprop_6PyCafe_4CyCa_ECAFE_HANDLE_MISMATCH_SET_AND_MATCH, 0, 0, 0}, + {(char *)"WITHOUT_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_WITHOUT_CALLBACK, 0, 0, 0}, + {(char *)"WITH_CALLBACK_DEFAULT", __pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_DEFAULT, 0, 0, 0}, + {(char *)"WITH_CALLBACK_USER_SUPPLIED", __pyx_getprop_6PyCafe_4CyCa_WITH_CALLBACK_USER_SUPPLIED, 0, 0, 0}, + {(char *)"WITH_FLUSH_IO", __pyx_getprop_6PyCafe_4CyCa_WITH_FLUSH_IO, 0, 0, 0}, + {(char *)"WITH_PEND_IO", __pyx_getprop_6PyCafe_4CyCa_WITH_PEND_IO, 0, 0, 0}, + {(char *)"WITH_PEND_EVENT", __pyx_getprop_6PyCafe_4CyCa_WITH_PEND_EVENT, 0, 0, 0}, + {(char *)"WITH_POLL", __pyx_getprop_6PyCafe_4CyCa_WITH_POLL, 0, 0, 0}, + {(char *)"FLUSH_AUTOMATIC", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AUTOMATIC, 0, 0, 0}, + {(char *)"FLUSH_NOW", __pyx_getprop_6PyCafe_4CyCa_FLUSH_NOW, 0, 0, 0}, + {(char *)"FLUSH_AFTER_EACH_CHANNEL_CREATION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_CREATION, 0, 0, 0}, + {(char *)"FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION, 0, 0, 0}, + {(char *)"FLUSH_AFTER_EACH_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_MESSAGE, 0, 0, 0}, + {(char *)"FLUSH_AFTER_EACH_GROUP_CREATION", __pyx_getprop_6PyCafe_4CyCa_FLUSH_AFTER_EACH_GROUP_CREATION, 0, 0, 0}, + {(char *)"FLUSH_DESIGNATED_TO_CLIENT", __pyx_getprop_6PyCafe_4CyCa_FLUSH_DESIGNATED_TO_CLIENT, 0, 0, 0}, + {(char *)"GET_CACHE_NO_CHECK", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_CHECK, 0, 0, 0}, + {(char *)"GET_CACHE_NO_WAIT", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NO_WAIT, 0, 0, 0}, + {(char *)"GET_CACHE_NOW", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_NOW, 0, 0, 0}, + {(char *)"GET_CACHE_WAIT", __pyx_getprop_6PyCafe_4CyCa_GET_CACHE_WAIT, 0, 0, 0}, + {(char *)"GET_FROM_CACHE", __pyx_getprop_6PyCafe_4CyCa_GET_FROM_CACHE, 0, 0, 0}, + {(char *)"GET_FROM_IOC", __pyx_getprop_6PyCafe_4CyCa_GET_FROM_IOC, 0, 0, 0}, + {(char *)"NATIVE_DATATYPE", __pyx_getprop_6PyCafe_4CyCa_NATIVE_DATATYPE, 0, 0, 0}, + {(char *)"LOWEST_DATATYPE", __pyx_getprop_6PyCafe_4CyCa_LOWEST_DATATYPE, 0, 0, 0}, + {(char *)"BLOCKING", __pyx_getprop_6PyCafe_4CyCa_BLOCKING, 0, 0, 0}, + {(char *)"WAIT", __pyx_getprop_6PyCafe_4CyCa_WAIT, 0, 0, 0}, + {(char *)"NON_BLOCKING", __pyx_getprop_6PyCafe_4CyCa_NON_BLOCKING, 0, 0, 0}, + {(char *)"NO_WAIT", __pyx_getprop_6PyCafe_4CyCa_NO_WAIT, 0, 0, 0}, + {(char *)"NO_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_NO_MESSAGE, 0, 0, 0}, + {(char *)"PRE_REQUEST", __pyx_getprop_6PyCafe_4CyCa_PRE_REQUEST, 0, 0, 0}, + {(char *)"FROM_REQUEST", __pyx_getprop_6PyCafe_4CyCa_FROM_REQUEST, 0, 0, 0}, + {(char *)"FROM_PEND", __pyx_getprop_6PyCafe_4CyCa_FROM_PEND, 0, 0, 0}, + {(char *)"FROM_CALLBACK", __pyx_getprop_6PyCafe_4CyCa_FROM_CALLBACK, 0, 0, 0}, + {(char *)"FROM_MESSAGE", __pyx_getprop_6PyCafe_4CyCa_FROM_MESSAGE, 0, 0, 0}, + {(char *)"NOT_INITIATED", __pyx_getprop_6PyCafe_4CyCa_NOT_INITIATED, 0, 0, 0}, + {(char *)"PENDING", __pyx_getprop_6PyCafe_4CyCa_PENDING, 0, 0, 0}, + {(char *)"COMPLETE", __pyx_getprop_6PyCafe_4CyCa_COMPLETE, 0, 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->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)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_channelInfo(PyObject *o) { + struct __pyx_obj_6PyCafe_channelInfo *p = (struct __pyx_obj_6PyCafe_channelInfo *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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->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_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}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_channelInfo[] = { + {(char *)"channelID", __pyx_getprop_6PyCafe_11channelInfo_channelID, 0, 0, 0}, + {(char *)"connectFlag", __pyx_getprop_6PyCafe_11channelInfo_connectFlag, 0, 0, 0}, + {(char *)"hostName", __pyx_getprop_6PyCafe_11channelInfo_hostName, 0, 0, 0}, + {(char *)"nelem", __pyx_getprop_6PyCafe_11channelInfo_nelem, 0, 0, 0}, + {(char *)"dataType", __pyx_getprop_6PyCafe_11channelInfo_dataType, 0, 0, 0}, + {(char *)"accessRead", __pyx_getprop_6PyCafe_11channelInfo_accessRead, 0, 0, 0}, + {(char *)"accessWrite", __pyx_getprop_6PyCafe_11channelInfo_accessWrite, 0, 0, 0}, + {(char *)"className", __pyx_getprop_6PyCafe_11channelInfo_className, 0, 0, 0}, + {(char *)"connectionState", __pyx_getprop_6PyCafe_11channelInfo_connectionState, 0, 0, 0}, + {(char *)"cafeConnectionState", __pyx_getprop_6PyCafe_11channelInfo_cafeConnectionState, 0, 0, 0}, + {(char *)"connectionStateAsString", __pyx_getprop_6PyCafe_11channelInfo_connectionStateAsString, 0, 0, 0}, + {(char *)"cafeConnectionStateAsString", __pyx_getprop_6PyCafe_11channelInfo_cafeConnectionStateAsString, 0, 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 PyObject *__pyx_tp_new_6PyCafe__epicsTimeStampAsDate(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *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__epicsTimeStampAsDate *)o); + p->etsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_21_epicsTimeStampAsDate_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe__epicsTimeStampAsDate(PyObject *o) { + struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *p = (struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->etsDate); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe__epicsTimeStampAsDate(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *p = (struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *)o; + if (p->etsDate) { + e = (*v)(p->etsDate, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe__epicsTimeStampAsDate(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *p = (struct __pyx_obj_6PyCafe__epicsTimeStampAsDate *)o; + tmp = ((PyObject*)p->etsDate); + p->etsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_6PyCafe__epicsTimeStampAsDate[] = { + {"get", (PyCFunction)__pyx_pw_6PyCafe_21_epicsTimeStampAsDate_3get, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe__epicsTimeStampAsDate = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe._epicsTimeStampAsDate", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe__epicsTimeStampAsDate), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe__epicsTimeStampAsDate, /*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__epicsTimeStampAsDate, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe__epicsTimeStampAsDate, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe__epicsTimeStampAsDate, /*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__epicsTimeStampAsDate, /*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; + new((void*)&(p->units)) std::string(); + 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); + p->pythonVersion = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6pvctrl_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_pvctrl(PyObject *o) { + struct __pyx_obj_6PyCafe_pvctrl *p = (struct __pyx_obj_6PyCafe_pvctrl *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + __Pyx_call_destructor(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_CLEAR(p->pythonVersion); + (*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; + } + if (p->pythonVersion) { + e = (*v)(p->pythonVersion, 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); + tmp = ((PyObject*)p->pythonVersion); + p->pythonVersion = ((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 PyObject *__pyx_getprop_6PyCafe_6pvctrl_pythonVersion(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvctrl_13pythonVersion_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}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvctrl[] = { + {(char *)"nelem", __pyx_getprop_6PyCafe_6pvctrl_nelem, 0, 0, 0}, + {(char *)"alarmStatus", __pyx_getprop_6PyCafe_6pvctrl_alarmStatus, 0, 0, 0}, + {(char *)"alarmSeverity", __pyx_getprop_6PyCafe_6pvctrl_alarmSeverity, 0, 0, 0}, + {(char *)"precision", __pyx_getprop_6PyCafe_6pvctrl_precision, 0, 0, 0}, + {(char *)"units", __pyx_getprop_6PyCafe_6pvctrl_units, 0, 0, 0}, + {(char *)"noEnumStrings", __pyx_getprop_6PyCafe_6pvctrl_noEnumStrings, 0, 0, 0}, + {(char *)"enumStrings", __pyx_getprop_6PyCafe_6pvctrl_enumStrings, 0, 0, 0}, + {(char *)"upperDisplayLimit", __pyx_getprop_6PyCafe_6pvctrl_upperDisplayLimit, 0, 0, 0}, + {(char *)"lowerDisplayLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerDisplayLimit, 0, 0, 0}, + {(char *)"upperAlarmLimit", __pyx_getprop_6PyCafe_6pvctrl_upperAlarmLimit, 0, 0, 0}, + {(char *)"upperWarningLimit", __pyx_getprop_6PyCafe_6pvctrl_upperWarningLimit, 0, 0, 0}, + {(char *)"lowerWarningLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerWarningLimit, 0, 0, 0}, + {(char *)"lowerAlarmLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerAlarmLimit, 0, 0, 0}, + {(char *)"upperControlLimit", __pyx_getprop_6PyCafe_6pvctrl_upperControlLimit, 0, 0, 0}, + {(char *)"lowerControlLimit", __pyx_getprop_6PyCafe_6pvctrl_lowerControlLimit, 0, 0, 0}, + {(char *)"value", __pyx_getprop_6PyCafe_6pvctrl_value, 0, 0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_6pvctrl_status, 0, 0, 0}, + {(char *)"pythonVersion", __pyx_getprop_6PyCafe_6pvctrl_pythonVersion, 0, 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_CyCafeException(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_6PyCafe_CyCafeException *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_CyCafeException *)o); + p->type = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->source = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->pv = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->errorText = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->errorInfo = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_15CyCafeException_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_CyCafeException(PyObject *o) { + struct __pyx_obj_6PyCafe_CyCafeException *p = (struct __pyx_obj_6PyCafe_CyCafeException *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + Py_CLEAR(p->type); + Py_CLEAR(p->source); + Py_CLEAR(p->pv); + Py_CLEAR(p->errorText); + Py_CLEAR(p->errorInfo); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_6PyCafe_15CyCafeException_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_15CyCafeException_4type_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_15CyCafeException_source(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_15CyCafeException_6source_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_15CyCafeException_handle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_15CyCafeException_6handle_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_15CyCafeException_pv(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_15CyCafeException_2pv_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_15CyCafeException_errorCode(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_15CyCafeException_9errorCode_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_15CyCafeException_errorText(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_15CyCafeException_9errorText_1__get__(o); +} + +static PyObject *__pyx_getprop_6PyCafe_15CyCafeException_errorInfo(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_15CyCafeException_9errorInfo_1__get__(o); +} + +static PyMethodDef __pyx_methods_6PyCafe_CyCafeException[] = { + {"show", (PyCFunction)__pyx_pw_6PyCafe_15CyCafeException_3show, METH_NOARGS, 0}, + {"reveal", (PyCFunction)__pyx_pw_6PyCafe_15CyCafeException_5reveal, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_CyCafeException[] = { + {(char *)"type", __pyx_getprop_6PyCafe_15CyCafeException_type, 0, 0, 0}, + {(char *)"source", __pyx_getprop_6PyCafe_15CyCafeException_source, 0, 0, 0}, + {(char *)"handle", __pyx_getprop_6PyCafe_15CyCafeException_handle, 0, 0, 0}, + {(char *)"pv", __pyx_getprop_6PyCafe_15CyCafeException_pv, 0, 0, 0}, + {(char *)"errorCode", __pyx_getprop_6PyCafe_15CyCafeException_errorCode, 0, 0, 0}, + {(char *)"errorText", __pyx_getprop_6PyCafe_15CyCafeException_errorText, 0, 0, 0}, + {(char *)"errorInfo", __pyx_getprop_6PyCafe_15CyCafeException_errorInfo, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_6PyCafe_CyCafeException = { + PyVarObject_HEAD_INIT(0, 0) + "PyCafe.CyCafeException", /*tp_name*/ + sizeof(struct __pyx_obj_6PyCafe_CyCafeException), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6PyCafe_CyCafeException, /*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_CyCafeException, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6PyCafe_CyCafeException, /*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_CyCafeException, /*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)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_monitorpolicy(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_monitorpolicy[] = { + {(char *)"dataType", __pyx_getprop_6PyCafe_13monitorpolicy_dataType, 0, 0, 0}, + {(char *)"dbrDataType", __pyx_getprop_6PyCafe_13monitorpolicy_dbrDataType, 0, 0, 0}, + {(char *)"cafeDbrType", __pyx_getprop_6PyCafe_13monitorpolicy_cafeDbrType, 0, 0, 0}, + {(char *)"nelem", __pyx_getprop_6PyCafe_13monitorpolicy_nelem, 0, 0, 0}, + {(char *)"mask", __pyx_getprop_6PyCafe_13monitorpolicy_mask, 0, 0, 0}, + {(char *)"userArgs", __pyx_getprop_6PyCafe_13monitorpolicy_userArgs, 0, 0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_13monitorpolicy_status, 0, 0, 0}, + {(char *)"monid", __pyx_getprop_6PyCafe_13monitorpolicy_monid, 0, 0, 0}, + {(char *)"maskHasDBE_PROPERTY", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_PROPERTY, 0, 0, 0}, + {(char *)"maskHasDBE_VALUE", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_VALUE, 0, 0, 0}, + {(char *)"maskHasDBE_LOG", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_LOG, 0, 0, 0}, + {(char *)"maskHasDBE_ALARM", __pyx_getprop_6PyCafe_13monitorpolicy_maskHasDBE_ALARM, 0, 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->ts = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->tsDate = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->value = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->pythonVersion = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6pvdata_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_pvdata(PyObject *o) { + struct __pyx_obj_6PyCafe_pvdata *p = (struct __pyx_obj_6PyCafe_pvdata *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->ts); + Py_CLEAR(p->tsDate); + Py_CLEAR(p->value); + Py_CLEAR(p->pythonVersion); + (*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; + } + if (p->pythonVersion) { + e = (*v)(p->pythonVersion, 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); + tmp = ((PyObject*)p->pythonVersion); + p->pythonVersion = ((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_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_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 PyObject *__pyx_getprop_6PyCafe_6pvdata_pythonVersion(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6PyCafe_6pvdata_13pythonVersion_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}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvdata[] = { + {(char *)"nelem", __pyx_getprop_6PyCafe_6pvdata_nelem, 0, 0, 0}, + {(char *)"alarmStatus", __pyx_getprop_6PyCafe_6pvdata_alarmStatus, 0, 0, 0}, + {(char *)"alarmSeverity", __pyx_getprop_6PyCafe_6pvdata_alarmSeverity, 0, 0, 0}, + {(char *)"ts", __pyx_getprop_6PyCafe_6pvdata_ts, 0, 0, 0}, + {(char *)"tsDate", __pyx_getprop_6PyCafe_6pvdata_tsDate, 0, 0, 0}, + {(char *)"value", __pyx_getprop_6PyCafe_6pvdata_value, 0, 0, 0}, + {(char *)"status", __pyx_getprop_6PyCafe_6pvdata_status, 0, 0, 0}, + {(char *)"pythonVersion", __pyx_getprop_6PyCafe_6pvdata_pythonVersion, 0, 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); + p->pythonVersion = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_7pvgroup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_pvgroup(PyObject *o) { + struct __pyx_obj_6PyCafe_pvgroup *p = (struct __pyx_obj_6PyCafe_pvgroup *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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_CLEAR(p->pythonVersion); + (*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; + } + if (p->pythonVersion) { + e = (*v)(p->pythonVersion, 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); + tmp = ((PyObject*)p->pythonVersion); + p->pythonVersion = ((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}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6PyCafe_pvgroup[] = { + {(char *)"pvdata", __pyx_getprop_6PyCafe_7pvgroup_pvdata, __pyx_setprop_6PyCafe_7pvgroup_pvdata, 0, 0}, + {(char *)"npv", __pyx_getprop_6PyCafe_7pvgroup_npv, __pyx_setprop_6PyCafe_7pvgroup_npv, 0, 0}, + {(char *)"name", __pyx_getprop_6PyCafe_7pvgroup_name, __pyx_setprop_6PyCafe_7pvgroup_name, 0, 0}, + {(char *)"groupStatus", __pyx_getprop_6PyCafe_7pvgroup_groupStatus, 0, 0, 0}, + {(char *)"groupHandle", __pyx_getprop_6PyCafe_7pvgroup_groupHandle, __pyx_setprop_6PyCafe_7pvgroup_groupHandle, 0, 0}, + {(char *)"rule", __pyx_getprop_6PyCafe_7pvgroup_rule, __pyx_setprop_6PyCafe_7pvgroup_rule, 0, 0}, + {(char *)"hasAlarm", __pyx_getprop_6PyCafe_7pvgroup_hasAlarm, __pyx_setprop_6PyCafe_7pvgroup_hasAlarm, 0, 0}, + {(char *)"hasTS", __pyx_getprop_6PyCafe_7pvgroup_hasTS, __pyx_setprop_6PyCafe_7pvgroup_hasTS, 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 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->vStr)) std::vector (); + new((void*)&(p->vFloat)) std::vector (); + new((void*)&(p->vInt)) std::vector (); + new((void*)&(p->hh)) HandleHelper(); + new((void*)&(p->ph)) PolicyHelper(); + new((void*)&(p->exopen)) CAFEException_open(); + new((void*)&(p->cs)) CAFEStatus(); + new((void*)&(p->css)) CAFEStatusSeverity(); + new((void*)&(p->channelInfo)) ChannelRegalia(); + p->pythonVersion = ((PyObject*)Py_None); Py_INCREF(Py_None); + p->exString = ((PyObject*)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_6PyCafe_6CyCafe_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_6PyCafe_CyCafe(PyObject *o) { + struct __pyx_obj_6PyCafe_CyCafe *p = (struct __pyx_obj_6PyCafe_CyCafe *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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_pw_6PyCafe_6CyCafe_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + __Pyx_call_destructor(p->valStr); + __Pyx_call_destructor(p->vStr); + __Pyx_call_destructor(p->vFloat); + __Pyx_call_destructor(p->vInt); + __Pyx_call_destructor(p->hh); + __Pyx_call_destructor(p->ph); + __Pyx_call_destructor(p->exopen); + __Pyx_call_destructor(p->cs); + __Pyx_call_destructor(p->css); + __Pyx_call_destructor(p->channelInfo); + Py_CLEAR(p->pythonVersion); + Py_CLEAR(p->exString); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6PyCafe_CyCafe(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6PyCafe_CyCafe *p = (struct __pyx_obj_6PyCafe_CyCafe *)o; + if (p->pythonVersion) { + e = (*v)(p->pythonVersion, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6PyCafe_CyCafe(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6PyCafe_CyCafe *p = (struct __pyx_obj_6PyCafe_CyCafe *)o; + tmp = ((PyObject*)p->pythonVersion); + p->pythonVersion = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_6PyCafe_CyCafe[] = { + {"init", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_5init, METH_NOARGS, 0}, + {"withExceptions", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_7withExceptions, METH_VARARGS|METH_KEYWORDS, 0}, + {"open", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_9open, METH_O, 0}, + {"openNoWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_11openNoWait, METH_NOARGS, 0}, + {"openPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_13openPrepare, METH_NOARGS, 0}, + {"openGroupPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_15openGroupPrepare, METH_NOARGS, 0}, + {"openMonitorPrepare", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_17openMonitorPrepare, METH_NOARGS, 0}, + {"setOpenDefaultPendTime", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_19setOpenDefaultPendTime, METH_O, 0}, + {"getOpenDefaultPendTime", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_21getOpenDefaultPendTime, METH_NOARGS, 0}, + {"openNow", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_23openNow, METH_NOARGS, 0}, + {"openNowAndWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_25openNowAndWait, METH_O, 0}, + {"openGroupNowAndWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_27openGroupNowAndWait, METH_O, 0}, + {"openMonitorNow", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_29openMonitorNow, METH_NOARGS, 0}, + {"openMonitorNowAndWait", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_31openMonitorNowAndWait, METH_O, 0}, + {"_ca_pend_event", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_33_ca_pend_event, METH_O, 0}, + {"_ca_pend_io", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_35_ca_pend_io, METH_O, 0}, + {"_ca_poll", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_37_ca_poll, METH_NOARGS, 0}, + {"_ca_flush_io", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_39_ca_flush_io, METH_NOARGS, 0}, + {"setChannelRequestPolicyGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_41setChannelRequestPolicyGet, METH_VARARGS|METH_KEYWORDS, 0}, + {"setCallbackGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_43setCallbackGet, METH_VARARGS|METH_KEYWORDS, 0}, + {"setCallbackPut", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_45setCallbackPut, METH_VARARGS|METH_KEYWORDS, 0}, + {"setTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_47setTimeout, METH_O, 0}, + {"getTimeoutGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_49getTimeoutGet, METH_NOARGS, 0}, + {"getTimeoutPut", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_51getTimeoutPut, METH_NOARGS, 0}, + {"setSelfGoverningTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_53setSelfGoverningTimeout, METH_O, 0}, + {"setSGTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_55setSGTimeout, METH_O, 0}, + {"getSGTimeoutGet", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_57getSGTimeoutGet, METH_NOARGS, 0}, + {"getSGTimeoutPut", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_59getSGTimeoutPut, METH_NOARGS, 0}, + {"setSGSelfGoverningTimeout", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_61setSGSelfGoverningTimeout, METH_O, 0}, + {"attachContext", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_63attachContext, METH_O, 0}, + {"loadCollectionsFromXML", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_65loadCollectionsFromXML, METH_O, 0}, + {"loadGroupsFromXML", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_67loadGroupsFromXML, METH_O, 0}, + {"groupList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_69groupList, METH_NOARGS, 0}, + {"getMonitorIDInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_71getMonitorIDInCallback, METH_O, 0}, + {"getDataTypeInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_73getDataTypeInCallback, METH_O, 0}, + {"getDbrDataTypeInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_75getDbrDataTypeInCallback, METH_O, 0}, + {"getDbrBaseInCallback", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_77getDbrBaseInCallback, METH_O, 0}, + {"getHandlesFromWithinGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_79getHandlesFromWithinGroup, METH_O, 0}, + {"close", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_81close, METH_O, 0}, + {"closeChannels", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_83closeChannels, METH_NOARGS, 0}, + {"allConnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_85allConnected, METH_NOARGS, 0}, + {"isConnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_87isConnected, METH_O, 0}, + {"printDisconnected", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_89printDisconnected, METH_NOARGS, 0}, + {"printDisconnectedHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_91printDisconnectedHandles, METH_NOARGS, 0}, + {"printHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_93printHandles, METH_NOARGS, 0}, + {"printHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_95printHandle, METH_O, 0}, + {"printHandlesV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_97printHandlesV, METH_O, 0}, + {"getDisconnectedHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_99getDisconnectedHandles, METH_NOARGS, 0}, + {"getStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_101getStatusSeverity, METH_O, 0}, + {"getStatusCodeAsText", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_103getStatusCodeAsText, METH_O, 0}, + {"getStatusInfo", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_105getStatusInfo, METH_O, 0}, + {"getStatusMsg", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_107getStatusMsg, METH_O, 0}, + {"getStatus", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_109getStatus, METH_O, 0}, + {"getAlarmStatusSeverity", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_111getAlarmStatusSeverity, METH_O, 0}, + {"getTimeStamp", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_113getTimeStamp, METH_O, 0}, + {"getTimeStampAsDate", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_115getTimeStampAsDate, METH_O, 0}, + {"checkForHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_117checkForHandle, METH_VARARGS|METH_KEYWORDS, 0}, + {"checkForHandleList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_119checkForHandleList, METH_VARARGS|METH_KEYWORDS, 0}, + {"checkForGroupHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_121checkForGroupHandle, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVNameFromHandle", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_123getPVNameFromHandle, METH_O, 0}, + {"getHandleFromPVName", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_125getHandleFromPVName, METH_O, 0}, + {"getChannelInfo", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_127getChannelInfo, METH_O, 0}, + {"getChannelList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_129getChannelList, METH_O, 0}, + {"getEnumFromString", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_131getEnumFromString, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStringFromEnum", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_133getStringFromEnum, METH_VARARGS|METH_KEYWORDS, 0}, + {"loadSFGroups", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_135loadSFGroups, METH_NOARGS, 0}, + {"loadSFGroupsWithBase", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_137loadSFGroupsWithBase, METH_O, 0}, + {"setDbrBase", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_139setDbrBase, METH_VARARGS|METH_KEYWORDS, 0}, + {"getDbrBase", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_141getDbrBase, METH_O, 0}, + {"setGetCacheWaitPolicy", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_143setGetCacheWaitPolicy, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGetCacheWaitPolicyAllHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_145setGetCacheWaitPolicyAllHandles, METH_O, 0}, + {"setGetActionWhenMonitorPolicy", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_147setGetActionWhenMonitorPolicy, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGetActionWhenMonitorPolicyAllHandles", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_149setGetActionWhenMonitorPolicyAllHandles, METH_O, 0}, + {"getNonBlocking", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_151getNonBlocking, METH_O, 0}, + {"getStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_153getStr, METH_VARARGS|METH_KEYWORDS, 0}, + {"getInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_155getInt, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_157getFloat, METH_VARARGS|METH_KEYWORDS, 0}, + {"get", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_159get, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_161getIntList, METH_O, 0}, + {"getFloatList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_163getFloatList, METH_O, 0}, + {"getStrList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_165getStrList, METH_O, 0}, + {"getList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_167getList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrArray", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_169getStrArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntArray", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_171getIntArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloatArray", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_173getFloatArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getArray", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_175getArray, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_177getPVInt, METH_O, 0}, + {"getPVFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_179getPVFloat, METH_O, 0}, + {"getPVStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_181getPVStr, METH_O, 0}, + {"getPV", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_183getPV, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVStrList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_185getPVStrList, METH_O, 0}, + {"getPVIntList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_187getPVIntList, METH_O, 0}, + {"getPVFloatList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_189getPVFloatList, METH_O, 0}, + {"getPVList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_191getPVList, METH_VARARGS|METH_KEYWORDS, 0}, + {"printStatusIfError", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_193printStatusIfError, METH_VARARGS|METH_KEYWORDS, 0}, + {"getAsyn", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_195getAsyn, METH_O, 0}, + {"waitForGetEvent", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_197waitForGetEvent, METH_O, 0}, + {"waitForBundledEvents", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_199waitForBundledEvents, METH_O, 0}, + {"getStrScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_201getStrScalarList, METH_O, 0}, + {"getIntScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_203getIntScalarList, METH_O, 0}, + {"getFloatScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_205getFloatScalarList, METH_O, 0}, + {"getScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_207getScalarList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCompoundList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_209getCompoundList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCompoundPVGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_211getCompoundPVGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_213getStrCache, METH_O, 0}, + {"getIntCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_215getIntCache, METH_O, 0}, + {"getFloatCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_217getFloatCache, METH_O, 0}, + {"getCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_219getCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getStrArrayCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_221getStrArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getIntArrayCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_223getIntArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getFloatArrayCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_225getFloatArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getArrayCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_227getArrayCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVStrCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_229getPVStrCache, METH_O, 0}, + {"getPVIntCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_231getPVIntCache, METH_O, 0}, + {"getPVFloatCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_233getPVFloatCache, METH_O, 0}, + {"getPVCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_235getPVCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCtrl", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_237getCtrl, METH_VARARGS|METH_KEYWORDS, 0}, + {"getCtrlCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_239getCtrlCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStop", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_241groupMonitorStop, METH_O, 0}, + {"getMonitorPolicyVector", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_243getMonitorPolicyVector, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStart", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_245groupMonitorStart, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupMonitorStartWithCBList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_247groupMonitorStartWithCBList, METH_VARARGS|METH_KEYWORDS, 0}, + {"getGroupStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_249getGroupStr, METH_O, 0}, + {"getGroupInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_251getGroupInt, METH_O, 0}, + {"getGroupFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_253getGroupFloat, METH_O, 0}, + {"getGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_255getGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getGroupCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_257getGroupCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVGroupStr", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_259getPVGroupStr, METH_O, 0}, + {"getPVGroupInt", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_261getPVGroupInt, METH_O, 0}, + {"getPVGroupFloat", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_263getPVGroupFloat, METH_O, 0}, + {"getPVGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_265getPVGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"getPVGroupCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_267getPVGroupCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"PVGroupValuesToList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_269PVGroupValuesToList, METH_O, 0}, + {"groupMemberList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_271groupMemberList, METH_O, 0}, + {"grouping", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_273grouping, METH_VARARGS|METH_KEYWORDS, 0}, + {"defineGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_275defineGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"groupOpen", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_277groupOpen, METH_O, 0}, + {"groupClose", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_279groupClose, METH_O, 0}, + {"getNoMonitors", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_281getNoMonitors, METH_O, 0}, + {"getMonitorIDs", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_283getMonitorIDs, METH_O, 0}, + {"monitorStart", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_285monitorStart, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStop", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_287monitorStop, METH_VARARGS|METH_KEYWORDS, 0}, + {"monitorStopAll", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_289monitorStopAll, METH_NOARGS, 0}, + {"set", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_291set, METH_VARARGS|METH_KEYWORDS, 0}, + {"setScalarList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_293setScalarList, METH_VARARGS|METH_KEYWORDS, 0}, + {"setCompoundList", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_295setCompoundList, METH_VARARGS|METH_KEYWORDS, 0}, + {"setGroup", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_297setGroup, METH_VARARGS|METH_KEYWORDS, 0}, + {"setAndMatchMany", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_299setAndMatchMany, METH_VARARGS|METH_KEYWORDS, 0}, + {"setAndMatch", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_301setAndMatch, METH_VARARGS|METH_KEYWORDS, 0}, + {"matchMany", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_303matchMany, METH_VARARGS|METH_KEYWORDS, 0}, + {"match", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_305match, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelemCtrl", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_307setNelemCtrl, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelem", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_309setNelem, METH_VARARGS|METH_KEYWORDS, 0}, + {"setNelemToNative", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_311setNelemToNative, METH_O, 0}, + {"setNelemToRetrieveFromCacheToOne", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_313setNelemToRetrieveFromCacheToOne, METH_O, 0}, + {"setNelemToRetrieveFromCache", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_315setNelemToRetrieveFromCache, METH_VARARGS|METH_KEYWORDS, 0}, + {"terminate", (PyCFunction)__pyx_pw_6PyCafe_6CyCafe_317terminate, METH_NOARGS, 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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6PyCafe_CyCafe, /*tp_traverse*/ + __pyx_tp_clear_6PyCafe_CyCafe, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6PyCafe_CyCafe, /*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_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 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->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)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_array(PyObject *o) { + struct __pyx_array_obj *p = (struct __pyx_array_obj *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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 = 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 get_memview(o); +} + +static PyMethodDef __pyx_methods_array[] = { + {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_array[] = { + {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_array = { + 0, /*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 = { + 0, /*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 PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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[] = { + {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)) { + Py_DECREF(o); o = 0; + } + return o; +} + +static void __pyx_tp_dealloc_memoryview(PyObject *o) { + struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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_memoryview_transpose(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview__get__base(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview_get_shape(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview_get_strides(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview_get_suboffsets(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview_get_ndim(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview_get_itemsize(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview_get_nbytes(o); +} + +static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_memoryview_get_size(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}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_memoryview[] = { + {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, 0, 0}, + {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, 0, 0}, + {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, 0, 0}, + {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, 0, 0}, + {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, 0, 0}, + {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, 0, 0}, + {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, 0, 0}, + {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, 0, 0}, + {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, 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 PY_VERSION_HEX >= 0x030400a1 + if (unlikely(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_memoryviewslice__get__base(o); +} + +static PyMethodDef __pyx_methods__memoryviewslice[] = { + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = { + {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, 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 +static struct PyModuleDef __pyx_moduledef = { + #if PY_VERSION_HEX < 0x03020000 + { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, + #else + PyModuleDef_HEAD_INIT, + #endif + "PyCafe", + 0, /* m_doc */ + -1, /* m_size */ + __pyx_methods /* m_methods */, + NULL, /* m_reload */ + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1}, + {&__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_DBR_PLAIN, __pyx_k_Allowed_DBR_TYPEs_are_DBR_PLAIN, sizeof(__pyx_k_Allowed_DBR_TYPEs_are_DBR_PLAIN), 0, 1, 0, 0}, + {&__pyx_kp_u_Analysing_statusList, __pyx_k_Analysing_statusList, sizeof(__pyx_k_Analysing_statusList), 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_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_CAFEException, __pyx_k_CAFEException, sizeof(__pyx_k_CAFEException), 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_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_Compiler, __pyx_k_Compiler, sizeof(__pyx_k_Compiler), 0, 0, 1, 1}, + {&__pyx_kp_u_CyCafeException, __pyx_k_CyCafeException, sizeof(__pyx_k_CyCafeException), 0, 1, 0, 0}, + {&__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_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_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_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_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_m_4, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_4, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_m_4), 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_10, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_10, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_10), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_11, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_11, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_11), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_12, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_12, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_12), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_13, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_13, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_13), 0, 1, 0, 0}, + {&__pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_14, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_14, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_def_s_14), 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_pyx, __pyx_k_EXCEPTION_RAISED_IN_PyCafe_pyx, sizeof(__pyx_k_EXCEPTION_RAISED_IN_PyCafe_pyx), 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_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_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_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, + {&__pyx_kp_u_First_Input_argument_should_be_t, __pyx_k_First_Input_argument_should_be_t, sizeof(__pyx_k_First_Input_argument_should_be_t), 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_t, __pyx_k_First_input_argument_should_be_t, sizeof(__pyx_k_First_input_argument_should_be_t), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_t_2, __pyx_k_First_input_argument_should_be_t_2, sizeof(__pyx_k_First_input_argument_should_be_t_2), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_t_3, __pyx_k_First_input_argument_should_be_t_3, sizeof(__pyx_k_First_input_argument_should_be_t_3), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_t_4, __pyx_k_First_input_argument_should_be_t_4, sizeof(__pyx_k_First_input_argument_should_be_t_4), 0, 1, 0, 0}, + {&__pyx_kp_u_First_input_argument_should_be_t_5, __pyx_k_First_input_argument_should_be_t_5, sizeof(__pyx_k_First_input_argument_should_be_t_5), 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_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_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_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_pv_should_be_type, __pyx_k_Input_argument_pv_should_be_type, sizeof(__pyx_k_Input_argument_pv_should_be_type), 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_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_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, + {&__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_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_s_No_value_specified_for_struct_at, __pyx_k_No_value_specified_for_struct_at, sizeof(__pyx_k_No_value_specified_for_struct_at), 0, 0, 1, 0}, + {&__pyx_kp_s_No_value_specified_for_struct_at_2, __pyx_k_No_value_specified_for_struct_at_2, sizeof(__pyx_k_No_value_specified_for_struct_at_2), 0, 0, 1, 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_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1}, + {&__pyx_n_s_Options, __pyx_k_Options, sizeof(__pyx_k_Options), 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_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_n_u_PV_3, __pyx_k_PV_3, sizeof(__pyx_k_PV_3), 0, 1, 0, 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_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_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_swithing_to, __pyx_k_TIMEOUT_in_getGroup_swithing_to, sizeof(__pyx_k_TIMEOUT_in_getGroup_swithing_to), 0, 1, 0, 0}, + {&__pyx_kp_u_TIMEOUT_in_getGroup_swithing_to_2, __pyx_k_TIMEOUT_in_getGroup_swithing_to_2, sizeof(__pyx_k_TIMEOUT_in_getGroup_swithing_to_2), 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_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_t, __pyx_k_Third_input_argument_should_be_t, sizeof(__pyx_k_Third_input_argument_should_be_t), 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_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_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_kp_u_Unknown_type_in, __pyx_k_Unknown_type_in, sizeof(__pyx_k_Unknown_type_in), 0, 1, 0, 0}, + {&__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_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__108, __pyx_k__108, sizeof(__pyx_k__108), 0, 1, 0, 0}, + {&__pyx_kp_u__109, __pyx_k__109, sizeof(__pyx_k__109), 0, 1, 0, 0}, + {&__pyx_kp_u__113, __pyx_k__113, sizeof(__pyx_k__113), 0, 1, 0, 0}, + {&__pyx_kp_u__120, __pyx_k__120, sizeof(__pyx_k__120), 0, 1, 0, 0}, + {&__pyx_kp_u__122, __pyx_k__122, sizeof(__pyx_k__122), 0, 1, 0, 0}, + {&__pyx_kp_u__199, __pyx_k__199, sizeof(__pyx_k__199), 0, 1, 0, 0}, + {&__pyx_kp_u__206, __pyx_k__206, sizeof(__pyx_k__206), 0, 1, 0, 0}, + {&__pyx_kp_u__212, __pyx_k__212, sizeof(__pyx_k__212), 0, 1, 0, 0}, + {&__pyx_kp_u__213, __pyx_k__213, sizeof(__pyx_k__213), 0, 1, 0, 0}, + {&__pyx_kp_u__236, __pyx_k__236, sizeof(__pyx_k__236), 0, 1, 0, 0}, + {&__pyx_kp_u__85, __pyx_k__85, sizeof(__pyx_k__85), 0, 1, 0, 0}, + {&__pyx_kp_u__93, __pyx_k__93, sizeof(__pyx_k__93), 0, 1, 0, 0}, + {&__pyx_kp_u__98, __pyx_k__98, sizeof(__pyx_k__98), 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_s_afs_psi_ch_project_cafe_gitwork, __pyx_k_afs_psi_ch_project_cafe_gitwork, sizeof(__pyx_k_afs_psi_ch_project_cafe_gitwork), 0, 0, 1, 0}, + {&__pyx_n_s_alarmSeverity, __pyx_k_alarmSeverity, sizeof(__pyx_k_alarmSeverity), 0, 0, 1, 1}, + {&__pyx_kp_u_alarmSeverity_d, __pyx_k_alarmSeverity_d, sizeof(__pyx_k_alarmSeverity_d), 0, 1, 0, 0}, + {&__pyx_n_s_alarmStatus, __pyx_k_alarmStatus, sizeof(__pyx_k_alarmStatus), 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_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 0, 0, 1, 1}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 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_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_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, + {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, + {&__pyx_n_s_bool8, __pyx_k_bool8, sizeof(__pyx_k_bool8), 0, 0, 1, 1}, + {&__pyx_n_s_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 0, 1, 1}, + {&__pyx_n_u_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 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_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_n_u_cafe, __pyx_k_cafe, sizeof(__pyx_k_cafe), 0, 1, 0, 1}, + {&__pyx_kp_u_cafeConnectionState_s_d, __pyx_k_cafeConnectionState_s_d, sizeof(__pyx_k_cafeConnectionState_s_d), 0, 1, 0, 0}, + {&__pyx_kp_u_cafeDbrType, __pyx_k_cafeDbrType, sizeof(__pyx_k_cafeDbrType), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_PyCafe_CyCafe, __pyx_k_cafe_PyCafe_CyCafe, sizeof(__pyx_k_cafe_PyCafe_CyCafe), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_allConnected, __pyx_k_cafe_allConnected, sizeof(__pyx_k_cafe_allConnected), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_checkForGroupHandle_groupNa, __pyx_k_cafe_checkForGroupHandle_groupNa, sizeof(__pyx_k_cafe_checkForGroupHandle_groupNa), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_checkForHandleList_pvList, __pyx_k_cafe_checkForHandleList_pvList, sizeof(__pyx_k_cafe_checkForHandleList_pvList), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_checkForHandle_pv, __pyx_k_cafe_checkForHandle_pv, sizeof(__pyx_k_cafe_checkForHandle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_closeChannels, __pyx_k_cafe_closeChannels, sizeof(__pyx_k_cafe_closeChannels), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_close_handlePV_handle_pv, __pyx_k_cafe_close_handlePV_handle_pv, sizeof(__pyx_k_cafe_close_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getAlarmStatusSeverity_hand, __pyx_k_cafe_getAlarmStatusSeverity_hand, sizeof(__pyx_k_cafe_getAlarmStatusSeverity_hand), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getArrayCache_handlePV_hand, __pyx_k_cafe_getArrayCache_handlePV_hand, sizeof(__pyx_k_cafe_getArrayCache_handlePV_hand), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getArrayCache_handlePV_hand_2, __pyx_k_cafe_getArrayCache_handlePV_hand_2, sizeof(__pyx_k_cafe_getArrayCache_handlePV_hand_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getArray_handlePV_handle_pv, __pyx_k_cafe_getArray_handlePV_handle_pv, sizeof(__pyx_k_cafe_getArray_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getArray_handlePV_handle_pv_2, __pyx_k_cafe_getArray_handlePV_handle_pv_2, sizeof(__pyx_k_cafe_getArray_handlePV_handle_pv_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getChannelInfo_handlePV_han, __pyx_k_cafe_getChannelInfo_handlePV_han, sizeof(__pyx_k_cafe_getChannelInfo_handlePV_han), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getCtrlCache_handlePV_handl, __pyx_k_cafe_getCtrlCache_handlePV_handl, sizeof(__pyx_k_cafe_getCtrlCache_handlePV_handl), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getCtrlCache_handlePV_handl_2, __pyx_k_cafe_getCtrlCache_handlePV_handl_2, sizeof(__pyx_k_cafe_getCtrlCache_handlePV_handl_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getCtrl_handlePV_handle_pv, __pyx_k_cafe_getCtrl_handlePV_handle_pv, sizeof(__pyx_k_cafe_getCtrl_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getCtrl_handlePV_handle_pv_2, __pyx_k_cafe_getCtrl_handlePV_handle_pv_2, sizeof(__pyx_k_cafe_getCtrl_handlePV_handle_pv_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getDbrBase_handlePV_handle, __pyx_k_cafe_getDbrBase_handlePV_handle, sizeof(__pyx_k_cafe_getDbrBase_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getFloatArrayCache_handlePV, __pyx_k_cafe_getFloatArrayCache_handlePV, sizeof(__pyx_k_cafe_getFloatArrayCache_handlePV), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getFloatArray_handlePV_hand, __pyx_k_cafe_getFloatArray_handlePV_hand, sizeof(__pyx_k_cafe_getFloatArray_handlePV_hand), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getFloatList_handlePV_handl, __pyx_k_cafe_getFloatList_handlePV_handl, sizeof(__pyx_k_cafe_getFloatList_handlePV_handl), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getFloatScalarList_handleLi, __pyx_k_cafe_getFloatScalarList_handleLi, sizeof(__pyx_k_cafe_getFloatScalarList_handleLi), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getFloathandlePV_handle_pv, __pyx_k_cafe_getFloathandlePV_handle_pv, sizeof(__pyx_k_cafe_getFloathandlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getHandleFromPVName_str, __pyx_k_cafe_getHandleFromPVName_str, sizeof(__pyx_k_cafe_getHandleFromPVName_str), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getIntArrayCache_handlePV_h, __pyx_k_cafe_getIntArrayCache_handlePV_h, sizeof(__pyx_k_cafe_getIntArrayCache_handlePV_h), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getIntArray_handlePV_handle, __pyx_k_cafe_getIntArray_handlePV_handle, sizeof(__pyx_k_cafe_getIntArray_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getIntList_handlePV_handle, __pyx_k_cafe_getIntList_handlePV_handle, sizeof(__pyx_k_cafe_getIntList_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getIntScalarList_handleList, __pyx_k_cafe_getIntScalarList_handleList, sizeof(__pyx_k_cafe_getIntScalarList_handleList), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getInt_handlePV_handle_pv, __pyx_k_cafe_getInt_handlePV_handle_pv, sizeof(__pyx_k_cafe_getInt_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getList_handlePV_handle_pv, __pyx_k_cafe_getList_handlePV_handle_pv, sizeof(__pyx_k_cafe_getList_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getList_handlePV_handle_pv_2, __pyx_k_cafe_getList_handlePV_handle_pv_2, sizeof(__pyx_k_cafe_getList_handlePV_handle_pv_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getNoMonitors_handlePV_hand, __pyx_k_cafe_getNoMonitors_handlePV_hand, sizeof(__pyx_k_cafe_getNoMonitors_handlePV_hand), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getNonBlocking_handlePV_han, __pyx_k_cafe_getNonBlocking_handlePV_han, sizeof(__pyx_k_cafe_getNonBlocking_handlePV_han), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVCache_handlePV_handle, __pyx_k_cafe_getPVCache_handlePV_handle, sizeof(__pyx_k_cafe_getPVCache_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVCache_handlePV_handle_2, __pyx_k_cafe_getPVCache_handlePV_handle_2, sizeof(__pyx_k_cafe_getPVCache_handlePV_handle_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVFloatCache_handlePV_ha, __pyx_k_cafe_getPVFloatCache_handlePV_ha, sizeof(__pyx_k_cafe_getPVFloatCache_handlePV_ha), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVFloatList_handleList_h, __pyx_k_cafe_getPVFloatList_handleList_h, sizeof(__pyx_k_cafe_getPVFloatList_handleList_h), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVFloat_handlePV_handle, __pyx_k_cafe_getPVFloat_handlePV_handle, sizeof(__pyx_k_cafe_getPVFloat_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVIntCache_handlePV_hand, __pyx_k_cafe_getPVIntCache_handlePV_hand, sizeof(__pyx_k_cafe_getPVIntCache_handlePV_hand), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVIntList_handleList_han, __pyx_k_cafe_getPVIntList_handleList_han, sizeof(__pyx_k_cafe_getPVIntList_handleList_han), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVInt_handlePV_handle_pv, __pyx_k_cafe_getPVInt_handlePV_handle_pv, sizeof(__pyx_k_cafe_getPVInt_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVList_handleList_handle, __pyx_k_cafe_getPVList_handleList_handle, sizeof(__pyx_k_cafe_getPVList_handleList_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVList_handleList_handle_2, __pyx_k_cafe_getPVList_handleList_handle_2, sizeof(__pyx_k_cafe_getPVList_handleList_handle_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVNameFromHandle_int, __pyx_k_cafe_getPVNameFromHandle_int, sizeof(__pyx_k_cafe_getPVNameFromHandle_int), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVStrCache_handlePV_hand, __pyx_k_cafe_getPVStrCache_handlePV_hand, sizeof(__pyx_k_cafe_getPVStrCache_handlePV_hand), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVStrList_handleList_han, __pyx_k_cafe_getPVStrList_handleList_han, sizeof(__pyx_k_cafe_getPVStrList_handleList_han), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPVStr_handlePV_handle_pv, __pyx_k_cafe_getPVStr_handlePV_handle_pv, sizeof(__pyx_k_cafe_getPVStr_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPV_handlePV_handle_pv, __pyx_k_cafe_getPV_handlePV_handle_pv, sizeof(__pyx_k_cafe_getPV_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getPV_handlePV_handle_pv_dt, __pyx_k_cafe_getPV_handlePV_handle_pv_dt, sizeof(__pyx_k_cafe_getPV_handlePV_handle_pv_dt), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getScalarList_handleList_ha, __pyx_k_cafe_getScalarList_handleList_ha, sizeof(__pyx_k_cafe_getScalarList_handleList_ha), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getScalarList_handleList_ha_2, __pyx_k_cafe_getScalarList_handleList_ha_2, sizeof(__pyx_k_cafe_getScalarList_handleList_ha_2), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getStatus_handlePV_handle_p, __pyx_k_cafe_getStatus_handlePV_handle_p, sizeof(__pyx_k_cafe_getStatus_handlePV_handle_p), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getStrList_handlePV_handle, __pyx_k_cafe_getStrList_handlePV_handle, sizeof(__pyx_k_cafe_getStrList_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getStrScalarList_handleList, __pyx_k_cafe_getStrScalarList_handleList, sizeof(__pyx_k_cafe_getStrScalarList_handleList), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getStr_handlePV_handle_pv, __pyx_k_cafe_getStr_handlePV_handle_pv, sizeof(__pyx_k_cafe_getStr_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getTimeStampDate_handlePV_h, __pyx_k_cafe_getTimeStampDate_handlePV_h, sizeof(__pyx_k_cafe_getTimeStampDate_handlePV_h), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_getTimeStamp_handlePV_handl, __pyx_k_cafe_getTimeStamp_handlePV_handl, sizeof(__pyx_k_cafe_getTimeStamp_handlePV_handl), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_get_handlePV_handle_pv, __pyx_k_cafe_get_handlePV_handle_pv, sizeof(__pyx_k_cafe_get_handlePV_handle_pv), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_get_handlePV_handle_pv_dt_n, __pyx_k_cafe_get_handlePV_handle_pv_dt_n, sizeof(__pyx_k_cafe_get_handlePV_handle_pv_dt_n), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_init, __pyx_k_cafe_init, sizeof(__pyx_k_cafe_init), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_isConnected_handlePV_handle, __pyx_k_cafe_isConnected_handlePV_handle, sizeof(__pyx_k_cafe_isConnected_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_monitorStopAll_handlePV_han, __pyx_k_cafe_monitorStopAll_handlePV_han, sizeof(__pyx_k_cafe_monitorStopAll_handlePV_han), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_monitorStop_handlePV_handle, __pyx_k_cafe_monitorStop_handlePV_handle, sizeof(__pyx_k_cafe_monitorStop_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_openNoWait, __pyx_k_cafe_openNoWait, sizeof(__pyx_k_cafe_openNoWait), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_openNow, __pyx_k_cafe_openNow, sizeof(__pyx_k_cafe_openNow), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_openNowAndWait_timeout, __pyx_k_cafe_openNowAndWait_timeout, sizeof(__pyx_k_cafe_openNowAndWait_timeout), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_printDisconnected, __pyx_k_cafe_printDisconnected, sizeof(__pyx_k_cafe_printDisconnected), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_printHandle_handlePV_handle, __pyx_k_cafe_printHandle_handlePV_handle, sizeof(__pyx_k_cafe_printHandle_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_printHandles, __pyx_k_cafe_printHandles, sizeof(__pyx_k_cafe_printHandles), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_setAndMatch_handlePVSet_han, __pyx_k_cafe_setAndMatch_handlePVSet_han, sizeof(__pyx_k_cafe_setAndMatch_handlePVSet_han), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_setDbrBase_handlePV_handle, __pyx_k_cafe_setDbrBase_handlePV_handle, sizeof(__pyx_k_cafe_setDbrBase_handlePV_handle), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_setGroup_ghandleName_vector, __pyx_k_cafe_setGroup_ghandleName_vector, sizeof(__pyx_k_cafe_setGroup_ghandleName_vector), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_setScalarList_handleList_ha, __pyx_k_cafe_setScalarList_handleList_ha, sizeof(__pyx_k_cafe_setScalarList_handleList_ha), 0, 1, 0, 0}, + {&__pyx_kp_u_cafe_set_handlePV_handle_pv_valS, __pyx_k_cafe_set_handlePV_handle_pv_valS, sizeof(__pyx_k_cafe_set_handlePV_handle_pv_valS), 0, 1, 0, 0}, + {&__pyx_n_s_cb, __pyx_k_cb, sizeof(__pyx_k_cb), 0, 0, 1, 1}, + {&__pyx_kp_u_channelID_x, __pyx_k_channelID_x, sizeof(__pyx_k_channelID_x), 0, 1, 0, 0}, + {&__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_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_u_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 1, 0, 1}, + {&__pyx_kp_u_connectFlag_d, __pyx_k_connectFlag_d, sizeof(__pyx_k_connectFlag_d), 0, 1, 0, 0}, + {&__pyx_kp_u_connectionState_s_d, __pyx_k_connectionState_s_d, sizeof(__pyx_k_connectionState_s_d), 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_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_kp_u_cyca_PyCafe_CyCa, __pyx_k_cyca_PyCafe_CyCa, sizeof(__pyx_k_cyca_PyCafe_CyCa), 0, 1, 0, 0}, + {&__pyx_n_u_cycafe, __pyx_k_cycafe, sizeof(__pyx_k_cycafe), 0, 1, 0, 1}, + {&__pyx_kp_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 0}, + {&__pyx_n_u_d_2, __pyx_k_d_2, sizeof(__pyx_k_d_2), 0, 1, 0, 1}, + {&__pyx_kp_u_dataType_s_d, __pyx_k_dataType_s_d, sizeof(__pyx_k_dataType_s_d), 0, 1, 0, 0}, + {&__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_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, + {&__pyx_kp_u_def_getScalarList, __pyx_k_def_getScalarList, sizeof(__pyx_k_def_getScalarList), 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_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_kp_u_dt_int, __pyx_k_dt_int, sizeof(__pyx_k_dt_int), 0, 1, 0, 0}, + {&__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_ec, __pyx_k_ec, sizeof(__pyx_k_ec), 0, 0, 1, 1}, + {&__pyx_n_s_ei, __pyx_k_ei, sizeof(__pyx_k_ei), 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_kp_u_errorCode, __pyx_k_errorCode, sizeof(__pyx_k_errorCode), 0, 1, 0, 0}, + {&__pyx_kp_u_errorCode_2, __pyx_k_errorCode_2, sizeof(__pyx_k_errorCode_2), 0, 1, 0, 0}, + {&__pyx_kp_u_errorInfo, __pyx_k_errorInfo, sizeof(__pyx_k_errorInfo), 0, 1, 0, 0}, + {&__pyx_kp_u_errorInfo_2, __pyx_k_errorInfo_2, sizeof(__pyx_k_errorInfo_2), 0, 1, 0, 0}, + {&__pyx_kp_u_errorInfo_3, __pyx_k_errorInfo_3, sizeof(__pyx_k_errorInfo_3), 0, 1, 0, 0}, + {&__pyx_kp_u_errorText, __pyx_k_errorText, sizeof(__pyx_k_errorText), 0, 1, 0, 0}, + {&__pyx_kp_u_errorText_2, __pyx_k_errorText_2, sizeof(__pyx_k_errorText_2), 0, 1, 0, 0}, + {&__pyx_n_s_et, __pyx_k_et, sizeof(__pyx_k_et), 0, 0, 1, 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_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_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_n_s_gName, __pyx_k_gName, sizeof(__pyx_k_gName), 0, 0, 1, 1}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_u_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 1, 0, 1}, + {&__pyx_n_s_getAlarmStatusSeverity, __pyx_k_getAlarmStatusSeverity, sizeof(__pyx_k_getAlarmStatusSeverity), 0, 0, 1, 1}, + {&__pyx_n_u_getAlarmStatusSeverity, __pyx_k_getAlarmStatusSeverity, sizeof(__pyx_k_getAlarmStatusSeverity), 0, 1, 0, 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_getChannelInfo, __pyx_k_getChannelInfo, sizeof(__pyx_k_getChannelInfo), 0, 1, 0, 1}, + {&__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_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_getDbrBase, __pyx_k_getDbrBase, sizeof(__pyx_k_getDbrBase), 0, 1, 0, 1}, + {&__pyx_n_u_getEnumFromString, __pyx_k_getEnumFromString, sizeof(__pyx_k_getEnumFromString), 0, 1, 0, 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_getHandlesFromWithinGroup, __pyx_k_getHandlesFromWithinGroup, sizeof(__pyx_k_getHandlesFromWithinGroup), 0, 0, 1, 1}, + {&__pyx_kp_u_getHandlesFromWithinGroup_gHandl, __pyx_k_getHandlesFromWithinGroup_gHandl, sizeof(__pyx_k_getHandlesFromWithinGroup_gHandl), 0, 1, 0, 0}, + {&__pyx_n_s_getList, __pyx_k_getList, sizeof(__pyx_k_getList), 0, 0, 1, 1}, + {&__pyx_kp_u_getList_handlePV_str_dt_native, __pyx_k_getList_handlePV_str_dt_native, sizeof(__pyx_k_getList_handlePV_str_dt_native), 0, 1, 0, 0}, + {&__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_u_getNonBlocking, __pyx_k_getNonBlocking, sizeof(__pyx_k_getNonBlocking), 0, 1, 0, 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_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_u_getStatus, __pyx_k_getStatus, sizeof(__pyx_k_getStatus), 0, 1, 0, 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_u_getTimeStamp, __pyx_k_getTimeStamp, sizeof(__pyx_k_getTimeStamp), 0, 1, 0, 1}, + {&__pyx_n_s_getTimeStampAsDate, __pyx_k_getTimeStampAsDate, sizeof(__pyx_k_getTimeStampAsDate), 0, 0, 1, 1}, + {&__pyx_n_s_getargspec, __pyx_k_getargspec, sizeof(__pyx_k_getargspec), 0, 0, 1, 1}, + {&__pyx_n_u_getimeStampAsDate, __pyx_k_getimeStampAsDate, sizeof(__pyx_k_getimeStampAsDate), 0, 1, 0, 1}, + {&__pyx_n_s_ghandleName, __pyx_k_ghandleName, sizeof(__pyx_k_ghandleName), 0, 0, 1, 1}, + {&__pyx_kp_u_ghandle_groupings_char_gname_lis, __pyx_k_ghandle_groupings_char_gname_lis, sizeof(__pyx_k_ghandle_groupings_char_gname_lis), 0, 1, 0, 0}, + {&__pyx_kp_u_ghandle_groupopen_char_gname, __pyx_k_ghandle_groupopen_char_gname, sizeof(__pyx_k_ghandle_groupopen_char_gname), 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_kp_u_groupMemberList_self_str_gname, __pyx_k_groupMemberList_self_str_gname, sizeof(__pyx_k_groupMemberList_self_str_gname), 0, 1, 0, 0}, + {&__pyx_kp_u_groupMonitorStartWithCBList_ghan, __pyx_k_groupMonitorStartWithCBList_ghan, sizeof(__pyx_k_groupMonitorStartWithCBList_ghan), 0, 1, 0, 0}, + {&__pyx_kp_u_groupMonitorStart_ghandleName_ob, __pyx_k_groupMonitorStart_ghandleName_ob, sizeof(__pyx_k_groupMonitorStart_ghandleName_ob), 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_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_handleList_cafe_defineGroup_gnam, __pyx_k_handleList_cafe_defineGroup_gnam, sizeof(__pyx_k_handleList_cafe_defineGroup_gnam), 0, 1, 0, 0}, + {&__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_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_handleList_cafe_open_pv, __pyx_k_handle_handleList_cafe_open_pv, sizeof(__pyx_k_handle_handleList_cafe_open_pv), 0, 1, 0, 0}, + {&__pyx_n_u_has, __pyx_k_has, sizeof(__pyx_k_has), 0, 1, 0, 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_kp_u_hostName_s, __pyx_k_hostName_s, sizeof(__pyx_k_hostName_s), 0, 1, 0, 0}, + {&__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_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_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_n_u_isConnected, __pyx_k_isConnected, sizeof(__pyx_k_isConnected), 0, 1, 0, 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_kp_u_list_cafe_PVGroupValuesToList_pv, __pyx_k_list_cafe_PVGroupValuesToList_pv, sizeof(__pyx_k_list_cafe_PVGroupValuesToList_pv), 0, 1, 0, 0}, + {&__pyx_n_u_long, __pyx_k_long, sizeof(__pyx_k_long), 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_self_list_valSet_list, __pyx_k_matchMany_self_list_valSet_list, sizeof(__pyx_k_matchMany_self_list_valSet_list), 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_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_kp_u_monitorStart_handlePV_object_cb, __pyx_k_monitorStart_handlePV_object_cb, sizeof(__pyx_k_monitorStart_handlePV_object_cb), 0, 1, 0, 0}, + {&__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_n_s_mpid, __pyx_k_mpid, sizeof(__pyx_k_mpid), 0, 0, 1, 1}, + {&__pyx_kp_u_mpid_cafe_monitorStart_handlePV, __pyx_k_mpid_cafe_monitorStart_handlePV, sizeof(__pyx_k_mpid_cafe_monitorStart_handlePV), 0, 1, 0, 0}, + {&__pyx_n_u_mv, __pyx_k_mv, sizeof(__pyx_k_mv), 0, 1, 0, 1}, + {&__pyx_kp_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 0}, + {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, + {&__pyx_n_s_name_3, __pyx_k_name_3, sizeof(__pyx_k_name_3), 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_kp_u_noEnumStrings_d, __pyx_k_noEnumStrings_d, sizeof(__pyx_k_noEnumStrings_d), 0, 1, 0, 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_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_s_nsec, __pyx_k_nsec, sizeof(__pyx_k_nsec), 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_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_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 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_kp_u_open_pv, __pyx_k_open_pv, sizeof(__pyx_k_open_pv), 0, 1, 0, 0}, + {&__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_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 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_u_printHandle, __pyx_k_printHandle, sizeof(__pyx_k_printHandle), 0, 1, 0, 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_n_s_pv, __pyx_k_pv, sizeof(__pyx_k_pv), 0, 0, 1, 1}, + {&__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_kp_u_pvdataList_status_cafe_getPVGrou, __pyx_k_pvdataList_status_cafe_getPVGrou, sizeof(__pyx_k_pvdataList_status_cafe_getPVGrou), 0, 1, 0, 0}, + {&__pyx_n_s_pvlist, __pyx_k_pvlist, sizeof(__pyx_k_pvlist), 0, 0, 1, 1}, + {&__pyx_n_s_py_cb_handle_get, __pyx_k_py_cb_handle_get, sizeof(__pyx_k_py_cb_handle_get), 0, 0, 1, 1}, + {&__pyx_n_s_py_cb_handle_put, __pyx_k_py_cb_handle_put, sizeof(__pyx_k_py_cb_handle_put), 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_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, + {&__pyx_kp_u_raised_from_CyCafe_method, __pyx_k_raised_from_CyCafe_method, sizeof(__pyx_k_raised_from_CyCafe_method), 0, 1, 0, 0}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 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_secPastEpoch, __pyx_k_secPastEpoch, sizeof(__pyx_k_secPastEpoch), 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_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_u_setDbrBase, __pyx_k_setDbrBase, sizeof(__pyx_k_setDbrBase), 0, 1, 0, 1}, + {&__pyx_n_u_setGetActionWhenMonitorPolicy, __pyx_k_setGetActionWhenMonitorPolicy, sizeof(__pyx_k_setGetActionWhenMonitorPolicy), 0, 1, 0, 1}, + {&__pyx_n_u_setGetCacheWaitPolicy, __pyx_k_setGetCacheWaitPolicy, sizeof(__pyx_k_setGetCacheWaitPolicy), 0, 1, 0, 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_kp_u_setNelemCtrl_self_handlePV_unsig, __pyx_k_setNelemCtrl_self_handlePV_unsig, sizeof(__pyx_k_setNelemCtrl_self_handlePV_unsig), 0, 1, 0, 0}, + {&__pyx_kp_u_setNelemToNative_self_handlePV, __pyx_k_setNelemToNative_self_handlePV, sizeof(__pyx_k_setNelemToNative_self_handlePV), 0, 1, 0, 0}, + {&__pyx_kp_u_setNelemToRetrieveFromCacheToOne, __pyx_k_setNelemToRetrieveFromCacheToOne, sizeof(__pyx_k_setNelemToRetrieveFromCacheToOne), 0, 1, 0, 0}, + {&__pyx_kp_u_setNelem_self_handlePV_unsigned, __pyx_k_setNelem_self_handlePV_unsigned, sizeof(__pyx_k_setNelem_self_handlePV_unsigned), 0, 1, 0, 0}, + {&__pyx_kp_u_setScalarList_handleList_list_va, __pyx_k_setScalarList_handleList_list_va, sizeof(__pyx_k_setScalarList_handleList_list_va), 0, 1, 0, 0}, + {&__pyx_kp_u_set_handlePV_valSet, __pyx_k_set_handlePV_valSet, sizeof(__pyx_k_set_handlePV_valSet), 0, 1, 0, 0}, + {&__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_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_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_statusList, __pyx_k_statusList, sizeof(__pyx_k_statusList), 0, 0, 1, 1}, + {&__pyx_n_s_status_2, __pyx_k_status_2, sizeof(__pyx_k_status_2), 0, 0, 1, 1}, + {&__pyx_kp_u_status_d, __pyx_k_status_d, sizeof(__pyx_k_status_d), 0, 1, 0, 0}, + {&__pyx_kp_u_status_groupClose_gHandleName, __pyx_k_status_groupClose_gHandleName, sizeof(__pyx_k_status_groupClose_gHandleName), 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_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_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 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_tolerance, __pyx_k_tolerance, sizeof(__pyx_k_tolerance), 0, 0, 1, 1}, + {&__pyx_n_s_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 0, 1, 1}, + {&__pyx_kp_u_tsDate, __pyx_k_tsDate, sizeof(__pyx_k_tsDate), 0, 1, 0, 0}, + {&__pyx_n_s_tsDate_2, __pyx_k_tsDate_2, sizeof(__pyx_k_tsDate_2), 0, 0, 1, 1}, + {&__pyx_kp_u_ts_2, __pyx_k_ts_2, sizeof(__pyx_k_ts_2), 0, 1, 0, 0}, + {&__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_u_ulong, __pyx_k_ulong, sizeof(__pyx_k_ulong), 0, 1, 0, 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_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_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_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0}, + {&__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_n_s_value_3, __pyx_k_value_3, sizeof(__pyx_k_value_3), 0, 0, 1, 1}, + {&__pyx_kp_u_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 1, 0, 0}, + {&__pyx_kp_u_values_2, __pyx_k_values_2, sizeof(__pyx_k_values_2), 0, 1, 0, 0}, + {&__pyx_n_s_vectorList, __pyx_k_vectorList, sizeof(__pyx_k_vectorList), 0, 0, 1, 1}, + {&__pyx_kp_u_vectorList_status_statusList_caf, __pyx_k_vectorList_status_statusList_caf, sizeof(__pyx_k_vectorList_status_statusList_caf), 0, 1, 0, 0}, + {&__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_kp_u_waitForGetEvent_handlePV, __pyx_k_waitForGetEvent_handlePV, sizeof(__pyx_k_waitForGetEvent_handlePV), 0, 1, 0, 0}, + {&__pyx_n_s_what, __pyx_k_what, sizeof(__pyx_k_what), 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_withExceptions, __pyx_k_withExceptions, sizeof(__pyx_k_withExceptions), 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}, + {0, 0, 0, 0, 0, 0, 0} +}; +static int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_memoryview = __Pyx_GetBuiltinName(__pyx_n_s_memoryview); if (!__pyx_builtin_memoryview) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + return 0; + __pyx_L1_error:; + return -1; +} + +static int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "PyCafeDefs.pxi":3 + * + * def show(): + * print ("cafe=PyCafe.CyCafe()") # <<<<<<<<<<<<<< + * print ("cyca=PyCafe.CyCa()") + * print ("cafe.init()") + */ + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_cafe_PyCafe_CyCafe); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "PyCafeDefs.pxi":4 + * def show(): + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") # <<<<<<<<<<<<<< + * print ("cafe.init()") + * print ("cafe.openNoWait()") + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_cyca_PyCafe_CyCa); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "PyCafeDefs.pxi":5 + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") + * print ("cafe.init()") # <<<<<<<<<<<<<< + * print ("cafe.openNoWait()") + * print ("=cafe.open()") + */ + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_cafe_init); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "PyCafeDefs.pxi":6 + * print ("cyca=PyCafe.CyCa()") + * print ("cafe.init()") + * print ("cafe.openNoWait()") # <<<<<<<<<<<<<< + * print ("=cafe.open()") + * print ("cafe.openNowAndWait(timeout)") + */ + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_cafe_openNoWait); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "PyCafeDefs.pxi":7 + * print ("cafe.init()") + * print ("cafe.openNoWait()") + * print ("=cafe.open()") # <<<<<<<<<<<<<< + * print ("cafe.openNowAndWait(timeout)") + * print ("cafe.openNow()") + */ + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_handle_handleList_cafe_open_pv); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + + /* "PyCafeDefs.pxi":8 + * print ("cafe.openNoWait()") + * print ("=cafe.open()") + * print ("cafe.openNowAndWait(timeout)") # <<<<<<<<<<<<<< + * print ("cafe.openNow()") + * print ("cafe.close(handlePV=)") + */ + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_cafe_openNowAndWait_timeout); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + + /* "PyCafeDefs.pxi":9 + * print ("=cafe.open()") + * print ("cafe.openNowAndWait(timeout)") + * print ("cafe.openNow()") # <<<<<<<<<<<<<< + * print ("cafe.close(handlePV=)") + * print ("cafe.closeChannels()") + */ + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_cafe_openNow); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + + /* "PyCafeDefs.pxi":10 + * print ("cafe.openNowAndWait(timeout)") + * print ("cafe.openNow()") + * print ("cafe.close(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.closeChannels()") + * print ("cafe.allConnected()") + */ + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_cafe_close_handlePV_handle_pv); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + + /* "PyCafeDefs.pxi":11 + * print ("cafe.openNow()") + * print ("cafe.close(handlePV=)") + * print ("cafe.closeChannels()") # <<<<<<<<<<<<<< + * print ("cafe.allConnected()") + * print ("cafe.isConnected(handlePV=)") + */ + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_cafe_closeChannels); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "PyCafeDefs.pxi":12 + * print ("cafe.close(handlePV=)") + * print ("cafe.closeChannels()") + * print ("cafe.allConnected()") # <<<<<<<<<<<<<< + * print ("cafe.isConnected(handlePV=)") + * print ("cafe.printDisconnected()") + */ + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_cafe_allConnected); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + + /* "PyCafeDefs.pxi":13 + * print ("cafe.closeChannels()") + * print ("cafe.allConnected()") + * print ("cafe.isConnected(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.printDisconnected()") + * print ("cafe.printHandles()") + */ + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_cafe_isConnected_handlePV_handle); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + + /* "PyCafeDefs.pxi":14 + * print ("cafe.allConnected()") + * print ("cafe.isConnected(handlePV=)") + * print ("cafe.printDisconnected()") # <<<<<<<<<<<<<< + * print ("cafe.printHandles()") + * print ("cafe.printHandle(handlePV=)") + */ + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_cafe_printDisconnected); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + + /* "PyCafeDefs.pxi":15 + * print ("cafe.isConnected(handlePV=)") + * print ("cafe.printDisconnected()") + * print ("cafe.printHandles()") # <<<<<<<<<<<<<< + * print ("cafe.printHandle(handlePV=)") + * + */ + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_cafe_printHandles); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + + /* "PyCafeDefs.pxi":16 + * print ("cafe.printDisconnected()") + * print ("cafe.printHandles()") + * print ("cafe.printHandle(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getStatus(handlePV=)") + */ + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_cafe_printHandle_handlePV_handle); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + + /* "PyCafeDefs.pxi":18 + * print ("cafe.printHandle(handlePV=)") + * + * print ("cafe.getStatus(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getAlarmStatusSeverity(handlePV=)") + * print ("cafe.getTimeStamp(handlePV=)") + */ + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_cafe_getStatus_handlePV_handle_p); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + + /* "PyCafeDefs.pxi":19 + * + * print ("cafe.getStatus(handlePV=)") + * print ("cafe.getAlarmStatusSeverity(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getTimeStamp(handlePV=)") + * print ("cafe.getTimeStampDate(handlePV=)") + */ + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_cafe_getAlarmStatusSeverity_hand); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + + /* "PyCafeDefs.pxi":20 + * print ("cafe.getStatus(handlePV=)") + * print ("cafe.getAlarmStatusSeverity(handlePV=)") + * print ("cafe.getTimeStamp(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getTimeStampDate(handlePV=)") + * print ("cafe.checkForHandle()") + */ + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_cafe_getTimeStamp_handlePV_handl); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + + /* "PyCafeDefs.pxi":21 + * print ("cafe.getAlarmStatusSeverity(handlePV=)") + * print ("cafe.getTimeStamp(handlePV=)") + * print ("cafe.getTimeStampDate(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.checkForHandle()") + * print ("cafe.checkForHandleList()") + */ + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_cafe_getTimeStampDate_handlePV_h); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + + /* "PyCafeDefs.pxi":22 + * print ("cafe.getTimeStamp(handlePV=)") + * print ("cafe.getTimeStampDate(handlePV=)") + * print ("cafe.checkForHandle()") # <<<<<<<<<<<<<< + * print ("cafe.checkForHandleList()") + * print ("cafe.checkForGroupHandle()") + */ + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_cafe_checkForHandle_pv); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); + + /* "PyCafeDefs.pxi":23 + * print ("cafe.getTimeStampDate(handlePV=)") + * print ("cafe.checkForHandle()") + * print ("cafe.checkForHandleList()") # <<<<<<<<<<<<<< + * print ("cafe.checkForGroupHandle()") + * print ("cafe.getPVNameFromHandle(int)") + */ + __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_cafe_checkForHandleList_pvList); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + + /* "PyCafeDefs.pxi":24 + * print ("cafe.checkForHandle()") + * print ("cafe.checkForHandleList()") + * print ("cafe.checkForGroupHandle()") # <<<<<<<<<<<<<< + * print ("cafe.getPVNameFromHandle(int)") + * print ("cafe.getHandleFromPVName(str)") + */ + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_cafe_checkForGroupHandle_groupNa); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + + /* "PyCafeDefs.pxi":25 + * print ("cafe.checkForHandleList()") + * print ("cafe.checkForGroupHandle()") + * print ("cafe.getPVNameFromHandle(int)") # <<<<<<<<<<<<<< + * print ("cafe.getHandleFromPVName(str)") + * print ("cafe.getChannelInfo(handlePV=)") + */ + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVNameFromHandle_int); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); + + /* "PyCafeDefs.pxi":26 + * print ("cafe.checkForGroupHandle()") + * print ("cafe.getPVNameFromHandle(int)") + * print ("cafe.getHandleFromPVName(str)") # <<<<<<<<<<<<<< + * print ("cafe.getChannelInfo(handlePV=)") + * print ("cafe.setDbrBase(handlePV=, unsigned int)") #dbrBase.DBR_XXX + */ + __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_cafe_getHandleFromPVName_str); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); + + /* "PyCafeDefs.pxi":27 + * 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=)") + */ + __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_cafe_getChannelInfo_handlePV_han); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__24); + __Pyx_GIVEREF(__pyx_tuple__24); + + /* "PyCafeDefs.pxi":28 + * print ("cafe.getHandleFromPVName(str)") + * print ("cafe.getChannelInfo(handlePV=)") + * print ("cafe.setDbrBase(handlePV=, unsigned int)") #dbrBase.DBR_XXX # <<<<<<<<<<<<<< + * print ("cafe.getDbrBase(handlePV=)") + * + */ + __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_cafe_setDbrBase_handlePV_handle); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); + + /* "PyCafeDefs.pxi":29 + * print ("cafe.getChannelInfo(handlePV=)") + * print ("cafe.setDbrBase(handlePV=, unsigned int)") #dbrBase.DBR_XXX + * print ("cafe.getDbrBase(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getNonBlocking(handlePV=)") #followed by getCache + */ + __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_cafe_getDbrBase_handlePV_handle); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); + + /* "PyCafeDefs.pxi":31 + * 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'>)") + */ + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_cafe_getNonBlocking_handlePV_han); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); + + /* "PyCafeDefs.pxi":32 + * + * 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=)") + */ + __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_cafe_get_handlePV_handle_pv); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); + + /* "PyCafeDefs.pxi":33 + * 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=)") + */ + __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_cafe_get_handlePV_handle_pv_dt_n); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); + + /* "PyCafeDefs.pxi":34 + * 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=)") + */ + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_cafe_getInt_handlePV_handle_pv); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); + + /* "PyCafeDefs.pxi":35 + * print ("cafe.get(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getInt(handlePV=)") + * print ("cafe.getFloathandlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getStr(handlePV=)") + * + */ + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_cafe_getFloathandlePV_handle_pv); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + + /* "PyCafeDefs.pxi":36 + * print ("cafe.getInt(handlePV=)") + * print ("cafe.getFloathandlePV=)") + * print ("cafe.getStr(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getList(handlePV=)") # return List in native type + */ + __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_cafe_getStr_handlePV_handle_pv); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + + /* "PyCafeDefs.pxi":38 + * 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=)") + */ + __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_cafe_getList_handlePV_handle_pv); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + + /* "PyCafeDefs.pxi":39 + * + * 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=)") + */ + __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_cafe_getList_handlePV_handle_pv_2); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); + + /* "PyCafeDefs.pxi":40 + * 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=)") + */ + __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_cafe_getIntList_handlePV_handle); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__35); + __Pyx_GIVEREF(__pyx_tuple__35); + + /* "PyCafeDefs.pxi":41 + * print ("cafe.getList(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getIntList(handlePV=)") + * print ("cafe.getFloatList(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getStrList(handlePV=)") + * + */ + __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_cafe_getFloatList_handlePV_handl); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__36); + __Pyx_GIVEREF(__pyx_tuple__36); + + /* "PyCafeDefs.pxi":42 + * 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 + */ + __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_cafe_getStrList_handlePV_handle); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__37); + __Pyx_GIVEREF(__pyx_tuple__37); + + /* "PyCafeDefs.pxi":46 + * # 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=)") + */ + __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_cafe_getArray_handlePV_handle_pv); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); + + /* "PyCafeDefs.pxi":47 + * # 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=)") + */ + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_cafe_getArray_handlePV_handle_pv_2); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__39); + __Pyx_GIVEREF(__pyx_tuple__39); + + /* "PyCafeDefs.pxi":48 + * print ("cafe.getArray(handlePV=)") + * print ("cafe.getArray(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArray(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * print ("cafe.getFloatArray(handlePV=,asnumpy=)") + * + */ + __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_cafe_getIntArray_handlePV_handle); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__40); + __Pyx_GIVEREF(__pyx_tuple__40); + + /* "PyCafeDefs.pxi":49 + * print ("cafe.getArray(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArray(handlePV=,asnumpy=)") + * print ("cafe.getFloatArray(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_cafe_getFloatArray_handlePV_hand); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + + /* "PyCafeDefs.pxi":52 + * + * + * print ("cafe.getPV(handlePV=)") # return PVData in native type # <<<<<<<<<<<<<< + * print ("cafe.getPV(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVInt(handlePV=)") + */ + __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPV_handlePV_handle_pv); if (unlikely(!__pyx_tuple__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); + + /* "PyCafeDefs.pxi":53 + * + * 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=)") + */ + __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPV_handlePV_handle_pv_dt); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + + /* "PyCafeDefs.pxi":54 + * 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=)") + */ + __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVInt_handlePV_handle_pv); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__44); + __Pyx_GIVEREF(__pyx_tuple__44); + + /* "PyCafeDefs.pxi":55 + * print ("cafe.getPV(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVInt(handlePV=)") + * print ("cafe.getPVFloat(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getPVStr(handlePV=)") + * + */ + __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVFloat_handlePV_handle); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + + /* "PyCafeDefs.pxi":56 + * print ("cafe.getPVInt(handlePV=)") + * print ("cafe.getPVFloat(handlePV=)") + * print ("cafe.getPVStr(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getPVList(handleList=)") # return Array of PVData in native type + */ + __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVStr_handlePV_handle_pv); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); + + /* "PyCafeDefs.pxi":58 + * 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=)") + */ + __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVList_handleList_handle); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__47); + __Pyx_GIVEREF(__pyx_tuple__47); + + /* "PyCafeDefs.pxi":59 + * + * 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=)") + */ + __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVList_handleList_handle_2); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__48); + __Pyx_GIVEREF(__pyx_tuple__48); + + /* "PyCafeDefs.pxi":60 + * 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=)") + */ + __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVIntList_handleList_han); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + + /* "PyCafeDefs.pxi":61 + * print ("cafe.getPVList(handleList=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVIntList(handleList=)") + * print ("cafe.getPVFloatList(handleList=)") # <<<<<<<<<<<<<< + * print ("cafe.getPVStrList(handleList=)") + * + */ + __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVFloatList_handleList_h); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__50); + __Pyx_GIVEREF(__pyx_tuple__50); + + /* "PyCafeDefs.pxi":62 + * print ("cafe.getPVIntList(handleList=)") + * print ("cafe.getPVFloatList(handleList=)") + * print ("cafe.getPVStrList(handleList=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getScalarList(handleList=)") # return List in native type + */ + __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVStrList_handleList_han); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + + /* "PyCafeDefs.pxi":64 + * 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=)") + */ + __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_cafe_getScalarList_handleList_ha); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); + + /* "PyCafeDefs.pxi":65 + * + * 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=)") + */ + __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_cafe_getScalarList_handleList_ha_2); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); + + /* "PyCafeDefs.pxi":66 + * 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=)") + */ + __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_cafe_getIntScalarList_handleList); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__54); + __Pyx_GIVEREF(__pyx_tuple__54); + + /* "PyCafeDefs.pxi":67 + * print ("cafe.getScalarList(handleList=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getIntScalarList(handleList=)") + * print ("cafe.getFloatScalarList(handleList=)") # <<<<<<<<<<<<<< + * print ("cafe.getStrScalarList(handleList=)") + * + */ + __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_cafe_getFloatScalarList_handleLi); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); + + /* "PyCafeDefs.pxi":68 + * print ("cafe.getIntScalarList(handleList=)") + * print ("cafe.getFloatScalarList(handleList=)") + * print ("cafe.getStrScalarList(handleList=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getPVCache(handlePV=)") # return PVData in native type + */ + __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_cafe_getStrScalarList_handleList); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); + + /* "PyCafeDefs.pxi":70 + * 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=)") + */ + __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVCache_handlePV_handle); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); + + /* "PyCafeDefs.pxi":71 + * + * 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=)") + */ + __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVCache_handlePV_handle_2); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + + /* "PyCafeDefs.pxi":72 + * 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=)") + */ + __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVIntCache_handlePV_hand); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__59); + __Pyx_GIVEREF(__pyx_tuple__59); + + /* "PyCafeDefs.pxi":73 + * print ("cafe.getPVCache(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getPVIntCache(handlePV=)") + * print ("cafe.getPVFloatCache(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getPVStrCache(handlePV=)") + * + */ + __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVFloatCache_handlePV_ha); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + + /* "PyCafeDefs.pxi":74 + * print ("cafe.getPVIntCache(handlePV=)") + * print ("cafe.getPVFloatCache(handlePV=)") + * print ("cafe.getPVStrCache(handlePV=)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_cafe_getPVStrCache_handlePV_hand); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__61); + __Pyx_GIVEREF(__pyx_tuple__61); + + /* "PyCafeDefs.pxi":79 + * # 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=)") + */ + __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_cafe_getArrayCache_handlePV_hand); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + + /* "PyCafeDefs.pxi":80 + * # 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=)") + */ + __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_cafe_getArrayCache_handlePV_hand_2); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__63); + __Pyx_GIVEREF(__pyx_tuple__63); + + /* "PyCafeDefs.pxi":81 + * print ("cafe.getArrayCache(handlePV=)") + * print ("cafe.getArrayCache(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArrayCache(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * print ("cafe.getFloatArrayCache(handlePV=,asnumpy=)") + * + */ + __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_u_cafe_getIntArrayCache_handlePV_h); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__64); + __Pyx_GIVEREF(__pyx_tuple__64); + + /* "PyCafeDefs.pxi":82 + * print ("cafe.getArrayCache(handlePV=, dt=<'int','float','str','native'(default)>)") + * print ("cafe.getIntArrayCache(handlePV=,asnumpy=)") + * print ("cafe.getFloatArrayCache(handlePV=,asnumpy=)") # <<<<<<<<<<<<<< + * + * print ("cafe.getCtrl(handlePV=)") + */ + __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_cafe_getFloatArrayCache_handlePV); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__65); + __Pyx_GIVEREF(__pyx_tuple__65); + + /* "PyCafeDefs.pxi":84 + * print ("cafe.getFloatArrayCache(handlePV=,asnumpy=)") + * + * print ("cafe.getCtrl(handlePV=)") # <<<<<<<<<<<<<< + * print ("cafe.getCtrl(handlePV=, dt='native' (default) else <'int','float','str'>)") + * print ("cafe.getCtrlCache(handlePV=)") + */ + __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_u_cafe_getCtrl_handlePV_handle_pv); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__66); + __Pyx_GIVEREF(__pyx_tuple__66); + + /* "PyCafeDefs.pxi":85 + * + * 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'>)") + */ + __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_u_cafe_getCtrl_handlePV_handle_pv_2); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__67); + __Pyx_GIVEREF(__pyx_tuple__67); + + /* "PyCafeDefs.pxi":86 + * 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'>)") + * + */ + __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_u_cafe_getCtrlCache_handlePV_handl); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + + /* "PyCafeDefs.pxi":87 + * 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)") + */ + __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_cafe_getCtrlCache_handlePV_handl_2); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__69); + __Pyx_GIVEREF(__pyx_tuple__69); + + /* "PyCafeDefs.pxi":89 + * 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=)") + */ + __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_mpid_cafe_monitorStart_handlePV); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__70); + __Pyx_GIVEREF(__pyx_tuple__70); + + /* "PyCafeDefs.pxi":90 + * + * 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=)") + * + */ + __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_cafe_monitorStop_handlePV_handle); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__71); + __Pyx_GIVEREF(__pyx_tuple__71); + + /* "PyCafeDefs.pxi":91 + * 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=)") + */ + __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_u_cafe_monitorStopAll_handlePV_han); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__72); + __Pyx_GIVEREF(__pyx_tuple__72); + + /* "PyCafeDefs.pxi":93 + * print ("cafe.monitorStopAll(handlePV=)") + * + * print ("cafe.getNoMonitors(handlePV=)") # <<<<<<<<<<<<<< + * + * print ("cafe.set(handlePV=, valSet)") + */ + __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_u_cafe_getNoMonitors_handlePV_hand); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); + + /* "PyCafeDefs.pxi":95 + * print ("cafe.getNoMonitors(handlePV=)") + * + * print ("cafe.set(handlePV=, valSet)") # <<<<<<<<<<<<<< + * print ("cafe.setScalarList(handleList=, valList)") + * print ("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ + */ + __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_u_cafe_set_handlePV_handle_pv_valS); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__74); + __Pyx_GIVEREF(__pyx_tuple__74); + + /* "PyCafeDefs.pxi":96 + * + * print ("cafe.set(handlePV=, valSet)") + * print ("cafe.setScalarList(handleList=, valList)") # <<<<<<<<<<<<<< + * print ("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ + * tolerance= , timeout=, printFlag=)") + */ + __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_cafe_setScalarList_handleList_ha); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__75); + __Pyx_GIVEREF(__pyx_tuple__75); + + /* "PyCafeDefs.pxi":97 + * print ("cafe.set(handlePV=, valSet)") + * print ("cafe.setScalarList(handleList=, valList)") + * print ("cafe.setAndMatch(handlePVSet=, valSet=, handlePVMatch=, \ # <<<<<<<<<<<<<< + * tolerance= , timeout=, printFlag=)") + * #Synchronous groups + */ + __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_cafe_setAndMatch_handlePVSet_han); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__76); + __Pyx_GIVEREF(__pyx_tuple__76); + + /* "PyCafeDefs.pxi":100 + * tolerance= , timeout=, printFlag=)") + * #Synchronous groups + * print ("ghandle = groupings(char * gname, list _pvlist)") # <<<<<<<<<<<<<< + * print ("ghandle = groupopen(char * gname)") + * print ("status = groupClose()") + */ + __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_ghandle_groupings_char_gname_lis); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + + /* "PyCafeDefs.pxi":101 + * #Synchronous groups + * print ("ghandle = groupings(char * gname, list _pvlist)") + * print ("ghandle = groupopen(char * gname)") # <<<<<<<<<<<<<< + * print ("status = groupClose()") + * print ("handleList[]=cafe.defineGroup(gname, pvList)") + */ + __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_ghandle_groupopen_char_gname); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__78); + __Pyx_GIVEREF(__pyx_tuple__78); + + /* "PyCafeDefs.pxi":102 + * 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)") + */ + __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_status_groupClose_gHandleName); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + + /* "PyCafeDefs.pxi":103 + * 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')") + */ + __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_handleList_cafe_defineGroup_gnam); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__80); + __Pyx_GIVEREF(__pyx_tuple__80); + + /* "PyCafeDefs.pxi":104 + * 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')") + */ + __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_list_cafe_PVGroupValuesToList_pv); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + + /* "PyCafeDefs.pxi":105 + * 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)") + */ + __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_u_vectorList_status_statusList_caf); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__82); + __Pyx_GIVEREF(__pyx_tuple__82); + + /* "PyCafeDefs.pxi":106 + * 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)") + * + */ + __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_u_pvdataList_status_cafe_getPVGrou); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + + /* "PyCafeDefs.pxi":107 + * print ("vectorList,status,statusList = cafe.getGroup(ghandleName, dt='native')") + * print ("pvdataList[],status = cafe.getPVGroup(ghandleName, dt='native')") + * print ("cafe.setGroup(ghandleName, vectorList)") # <<<<<<<<<<<<<< + * + * return + */ + __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_cafe_setGroup_ghandleName_vector); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__84); + __Pyx_GIVEREF(__pyx_tuple__84); + + /* "PyCafeDefs.pxi":604 + * self.channelID=0 + * self.connectFlag=False + * self.hostName=(("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.nelem=0 + * self.dataType=ICAFE_TYPENOTCONN + */ + __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__86); + __Pyx_GIVEREF(__pyx_tuple__86); + + /* "PyCafeDefs.pxi":609 + * self.accessRead=0 + * self.accessWrite=0 + * self.className=(("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.connectionState=ICAFE_CA_OP_CONN_DOWN + * self.cafeConnectionState=ICAFE_CS_NEVER_CONN + */ + __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); + + /* "PyCafeDefs.pxi":612 + * 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') + * + */ + __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__88); + __Pyx_GIVEREF(__pyx_tuple__88); + + /* "PyCafeDefs.pxi":613 + * 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): + */ + __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + + /* "PyCafeDefs.pxi":687 + * self.alarmSeverity=-1 + * self.precision=0 + * self.units=(("")).encode('UTF-8') # <<<<<<<<<<<<<< + * self.noEnumStrings=0 + * self.enumStrings=[] + */ + __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__90); + __Pyx_GIVEREF(__pyx_tuple__90); + + /* "PyCafeDefs.pxi":698 + * self.value=[] + * self.status=1 + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_slice__91 = PySlice_New(__pyx_int_0, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__91); + __Pyx_GIVEREF(__pyx_slice__91); + + /* "PyCafeDefs.pxi":731 + * print ("value =", self.value[0] , end="" ) + * else: + * print ("values = ", end="") # <<<<<<<<<<<<<< + * if self.pythonVersion[0] < 3: + * if isinstance (self.value[0], list): + */ + __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_u_values); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__92); + __Pyx_GIVEREF(__pyx_tuple__92); + + /* "PyCafeDefs.pxi":748 + * print (self.value[i],"[%d]" %i, end=" ") + * + * print ("") # <<<<<<<<<<<<<< + * print ("status = %d" % self.status) + * print ("alarmStatus = %d" % self.alarmStatus) + */ + __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__94); + __Pyx_GIVEREF(__pyx_tuple__94); + + /* "PyCafeDefs.pxi":757 + * + * if self.noEnumStrings > 0: + * print ("enumStrings =",) # <<<<<<<<<<<<<< + * for i in range(0, self.noEnumStrings): + * print (self.enumStrings[i],"[%s]" %i,) + */ + __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_enumStrings); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); + + /* "PyCafeDefs.pxi":760 + * for i in range(0, self.noEnumStrings): + * print (self.enumStrings[i],"[%s]" %i,) + * print ("") # <<<<<<<<<<<<<< + * + * print ("upperDisplayLimit = %f" % self.upperDisplayLimit) + */ + __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__96); + __Pyx_GIVEREF(__pyx_tuple__96); + + /* "PyCafeDefs.pxi":793 + * + * def show(self): + * print ("------CyCafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * print ("raised from CyCafe method:",self.source) + * if (self.handle!=-1): + */ + __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_CyCafeException); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__97); + __Pyx_GIVEREF(__pyx_tuple__97); + + /* "PyCafeDefs.pxi":803 + * else: + * print ("errorInfo:",self.errorInfo) + * print ("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_u__98); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__99); + __Pyx_GIVEREF(__pyx_tuple__99); + + /* "PyCafeDefs.pxi":807 + * + * def reveal(self): + * print ("------CyCafeException-----------------------------------------------------") # <<<<<<<<<<<<<< + * if(self.type): + * print (".type =",self.type) + */ + __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_u_CyCafeException); if (unlikely(!__pyx_tuple__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__100); + __Pyx_GIVEREF(__pyx_tuple__100); + + /* "PyCafeDefs.pxi":820 + * print (".errorText=",self.errorText) + * print (".errorInfo=",self.errorInfo) + * print ("------------------------------------------------------------------------") # <<<<<<<<<<<<<< + * return + * + */ + __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_u__98); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__101); + __Pyx_GIVEREF(__pyx_tuple__101); + + /* "PyCafeDefs.pxi":891 + * self.value=[] + * self.status=1 + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * + * def show(self): + */ + __pyx_slice__102 = PySlice_New(__pyx_int_0, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__102); + __Pyx_GIVEREF(__pyx_slice__102); + + /* "PyCafeDefs.pxi":918 + * print ("value =", self.value[0] ) + * else: + * print ("values = "), # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * for i in range(0, nelem): + */ + __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_u_values_2); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + + /* "PyCafeDefs.pxi":934 + * print ("value =", self.value[0], end="") + * else: + * print ("values = ", end="") # <<<<<<<<<<<<<< + * if isinstance (self.value[0], list): + * for i in range(0, nelem): + */ + __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_u_values_2); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__104); + __Pyx_GIVEREF(__pyx_tuple__104); + + /* "PyCafeDefs.pxi":943 + * + * + * print ("") # <<<<<<<<<<<<<< + * print ("status = %d" % self.status) + * #if self.alarmStatus != -1: + */ + __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__105); + __Pyx_GIVEREF(__pyx_tuple__105); + + /* "PyCafeDefs.pxi":978 + * self.hasAlarm=True + * self.hasTS=True + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * return + * + */ + __pyx_slice__106 = PySlice_New(__pyx_int_0, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__106); + __Pyx_GIVEREF(__pyx_slice__106); + + /* "PyCafeDefs.pxi":987 + * 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 + */ + __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_u_ERROR_GROUP_MEMBER_MISMATCH); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__107); + __Pyx_GIVEREF(__pyx_tuple__107); + + /* "PyCafeDefs.pxi":1018 + * if self.pythonVersion[0] < 3: + * + * print ("values = " ) # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print (self.pvdata[i].value[j],"[%d]"%j ) + */ + __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_u_values_2); if (unlikely(!__pyx_tuple__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__110); + __Pyx_GIVEREF(__pyx_tuple__110); + + /* "PyCafeDefs.pxi":1024 + * else: + * + * print ("values = " ,end="") # <<<<<<<<<<<<<< + * for j in range(0, len(self.pvdata[i].value)): + * print (self.pvdata[i].value[j],"[%d]"%j, end=" ") + */ + __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_u_values_2); if (unlikely(!__pyx_tuple__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__111); + __Pyx_GIVEREF(__pyx_tuple__111); + + /* "PyCafeDefs.pxi":1028 + * print (self.pvdata[i].value[j],"[%d]"%j, end=" ") + * + * print ("") # <<<<<<<<<<<<<< + * print ("status = %d" % self.pvdata[i].status) + * print ("alarmStatus = %d" % self.pvdata[i].alarmStatus) + */ + __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__112); + __Pyx_GIVEREF(__pyx_tuple__112); + + /* "PyCafeDefs.pxi":1036 + * 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__114 = PyTuple_Pack(1, __pyx_kp_u__113); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__114); + __Pyx_GIVEREF(__pyx_tuple__114); + + /* "PyCafeDefs.pxi":1090 + * dtcheck=dtn #need a line here + * else: + * print ("Valid input parameters for data type are: 'int', 'float', 'str', or 'native'") # <<<<<<<<<<<<<< + * print ("Data to be presented in native data type") + * + */ + __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_u_Valid_input_parameters_for_data); if (unlikely(!__pyx_tuple__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__115); + __Pyx_GIVEREF(__pyx_tuple__115); + + /* "PyCafeDefs.pxi":1091 + * else: + * print ("Valid input parameters for data type are: 'int', 'float', 'str', or 'native'") + * print ("Data to be presented in native data type") # <<<<<<<<<<<<<< + * + * return dtcheck + */ + __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_u_Data_to_be_presented_in_native_d); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__116); + __Pyx_GIVEREF(__pyx_tuple__116); + + /* "PyCafe.pyx":73 + * ##self.css=self._c_cafe_getCafeStatusSeverity() + * + * self.pythonVersion=sys.version_info[0:4] # <<<<<<<<<<<<<< + * + * self.haveExceptions=True + */ + __pyx_slice__117 = PySlice_New(__pyx_int_0, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__117)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__117); + __Pyx_GIVEREF(__pyx_slice__117); + + /* "PyCafe.pyx":121 + * 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): + */ + __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__118); + __Pyx_GIVEREF(__pyx_tuple__118); + + /* "PyCafe.pyx":124 + * pvV.push_back( py_string ) + * elif isinstance(pv[i], bytes): + * pvV.push_back( (pv[i]).encode('utf8') ) # <<<<<<<<<<<<<< + * else: + * print ("Unknown type in {}".format(_METHOD_)) + */ + __pyx_tuple__119 = PyTuple_Pack(1, __pyx_n_u_utf8); if (unlikely(!__pyx_tuple__119)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__119); + __Pyx_GIVEREF(__pyx_tuple__119); + + /* "PyCafe.pyx":777 + * 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 + */ + __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_g); if (unlikely(!__pyx_tuple__121)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__121); + __Pyx_GIVEREF(__pyx_tuple__121); + + /* "PyCafe.pyx":829 + * def loadSFGroups(self): + * cdef bytes py_string + * py_string = ('VA').encode('UTF-8') # <<<<<<<<<<<<<< + * #cdef vector[string] gnV + * #gnV.push_back(py_string) + */ + __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__123)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__123); + __Pyx_GIVEREF(__pyx_tuple__123); + + /* "PyCafe.pyx":837 + * 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) + */ + __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_u_UTF_8); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__124); + __Pyx_GIVEREF(__pyx_tuple__124); + + /* "PyCafe.pyx":858 + * #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" ) + */ + __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setDbrBase_ha); if (unlikely(!__pyx_tuple__125)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__125); + __Pyx_GIVEREF(__pyx_tuple__125); + + /* "PyCafe.pyx":859 + * 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 + */ + __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_u_Allowed_DBR_TYPEs_are_DBR_PLAIN); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__126); + __Pyx_GIVEREF(__pyx_tuple__126); + + /* "PyCafe.pyx":901 + * #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" ) + */ + __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa); if (unlikely(!__pyx_tuple__127)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__127); + __Pyx_GIVEREF(__pyx_tuple__127); + + /* "PyCafe.pyx":902 + * 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 + */ + __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetCacheWaitPolic); if (unlikely(!__pyx_tuple__128)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__128); + __Pyx_GIVEREF(__pyx_tuple__128); + + /* "PyCafe.pyx":917 + * #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" ) + */ + __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetCacheWa_2); if (unlikely(!__pyx_tuple__129)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__129); + __Pyx_GIVEREF(__pyx_tuple__129); + + /* "PyCafe.pyx":918 + * 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 + */ + __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetCacheWaitPolic); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__130); + __Pyx_GIVEREF(__pyx_tuple__130); + + /* "PyCafe.pyx":942 + * #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" ) + */ + __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetActionW); if (unlikely(!__pyx_tuple__131)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__131); + __Pyx_GIVEREF(__pyx_tuple__131); + + /* "PyCafe.pyx":943 + * 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 + */ + __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetActionWhenMoni); if (unlikely(!__pyx_tuple__132)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__132); + __Pyx_GIVEREF(__pyx_tuple__132); + + /* "PyCafe.pyx":959 + * #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" ) + */ + __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_u_WARNING_PyCafe_def_setGetActionW_2); if (unlikely(!__pyx_tuple__133)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__133); + __Pyx_GIVEREF(__pyx_tuple__133); + + /* "PyCafe.pyx":960 + * 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 + */ + __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_u_Allowed_ChannelGetActionWhenMoni); if (unlikely(!__pyx_tuple__134)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__134); + __Pyx_GIVEREF(__pyx_tuple__134); + + /* "PyCafe.pyx":1110 + * return self.valInt + * else: + * print ("This line in PyCafe def get should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_get_shou); if (unlikely(!__pyx_tuple__135)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__135); + __Pyx_GIVEREF(__pyx_tuple__135); + + /* "PyCafe.pyx":1286 + * return None + * else: + * print ("This line in PyCafe def getAsList should never appear!") # <<<<<<<<<<<<<< + * return None + * + */ + __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_getAsLis); if (unlikely(!__pyx_tuple__136)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__136); + __Pyx_GIVEREF(__pyx_tuple__136); + + /* "PyCafe.pyx":1462 + * + * 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') + */ + __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_u_PyCafe_pyx_getArray_array_type_d); if (unlikely(!__pyx_tuple__137)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__137); + __Pyx_GIVEREF(__pyx_tuple__137); + + /* "PyCafe.pyx":1474 + * 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 + */ + __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_u_utf_8); if (unlikely(!__pyx_tuple__138)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__138); + __Pyx_GIVEREF(__pyx_tuple__138); + + /* "PyCafe.pyx":1480 + * 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') + */ + __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__139)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__139); + __Pyx_GIVEREF(__pyx_tuple__139); + + /* "PyCafe.pyx":1481 + * 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): + */ + __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__140)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__140); + __Pyx_GIVEREF(__pyx_tuple__140); + + /* "PyCafe.pyx":1524 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(i16val[ij]) + */ + __pyx_tuple__141 = PyTuple_Pack(1, __pyx_n_u_h); if (unlikely(!__pyx_tuple__141)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__141); + __Pyx_GIVEREF(__pyx_tuple__141); + + /* "PyCafe.pyx":1539 + * 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') + */ + __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__142)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__142); + __Pyx_GIVEREF(__pyx_tuple__142); + + /* "PyCafe.pyx":1540 + * 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): + */ + __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__143)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__143); + __Pyx_GIVEREF(__pyx_tuple__143); + + /* "PyCafe.pyx":1576 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(ival[ij]) + */ + __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_u_h); if (unlikely(!__pyx_tuple__144)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__144); + __Pyx_GIVEREF(__pyx_tuple__144); + + /* "PyCafe.pyx":1591 + * 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') + */ + __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__145)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__145); + __Pyx_GIVEREF(__pyx_tuple__145); + + /* "PyCafe.pyx":1592 + * 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): + */ + __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__146)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__146); + __Pyx_GIVEREF(__pyx_tuple__146); + + /* "PyCafe.pyx":1657 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('f') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(fval[ij]) + */ + __pyx_tuple__147 = PyTuple_Pack(1, __pyx_n_u_f); if (unlikely(!__pyx_tuple__147)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__147); + __Pyx_GIVEREF(__pyx_tuple__147); + + /* "PyCafe.pyx":1672 + * 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) + */ + __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__148)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__148); + __Pyx_GIVEREF(__pyx_tuple__148); + + /* "PyCafe.pyx":1673 + * 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): + */ + __pyx_tuple__149 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__149)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__149); + __Pyx_GIVEREF(__pyx_tuple__149); + + /* "PyCafe.pyx":1717 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemMethod): + * arrayArray.append(dval[ij]) + */ + __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_u_d_2); if (unlikely(!__pyx_tuple__150)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__150); + __Pyx_GIVEREF(__pyx_tuple__150); + + /* "PyCafe.pyx":1734 + * 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) + */ + __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__151)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__151); + __Pyx_GIVEREF(__pyx_tuple__151); + + /* "PyCafe.pyx":1735 + * 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): + */ + __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__152)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__152); + __Pyx_GIVEREF(__pyx_tuple__152); + + /* "PyCafe.pyx":1887 + * 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_tuple__153 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__153)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__153); + __Pyx_GIVEREF(__pyx_tuple__153); + + /* "PyCafe.pyx":2070 + * if (status!=ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * print ("Error/Warning from def getAsyn: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * + */ + __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_u_Error_Warning_from_def_getAsyn); if (unlikely(!__pyx_tuple__154)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__154); + __Pyx_GIVEREF(__pyx_tuple__154); + + /* "PyCafe.pyx":2115 + * + * 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__155 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w); if (unlikely(!__pyx_tuple__155)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__155); + __Pyx_GIVEREF(__pyx_tuple__155); + + /* "PyCafe.pyx":2121 + * 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") + * + */ + __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_w_2); if (unlikely(!__pyx_tuple__156)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__156); + __Pyx_GIVEREF(__pyx_tuple__156); + + /* "PyCafe.pyx":2138 + * 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__157 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_waitForBundledEvent); if (unlikely(!__pyx_tuple__157)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__157); + __Pyx_GIVEREF(__pyx_tuple__157); + + /* "PyCafe.pyx":2170 + * + * 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__158 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g); if (unlikely(!__pyx_tuple__158)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__158); + __Pyx_GIVEREF(__pyx_tuple__158); + + /* "PyCafe.pyx":2176 + * 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") + * + */ + __pyx_tuple__159 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_2); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__159); + __Pyx_GIVEREF(__pyx_tuple__159); + + /* "PyCafe.pyx":2229 + * if (statusBundle!=ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * print ("Error in def getScalarList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__160 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getScalarList); if (unlikely(!__pyx_tuple__160)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__160); + __Pyx_GIVEREF(__pyx_tuple__160); + + /* "PyCafe.pyx":2394 + * 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__161 = PyTuple_Pack(1, __pyx_kp_u_def_getScalarList); if (unlikely(!__pyx_tuple__161)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2394; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__161); + __Pyx_GIVEREF(__pyx_tuple__161); + + /* "PyCafe.pyx":2418 + * 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__162 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_3); if (unlikely(!__pyx_tuple__162)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2418; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__162); + __Pyx_GIVEREF(__pyx_tuple__162); + + /* "PyCafe.pyx":2424 + * 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") + * + */ + __pyx_tuple__163 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_4); if (unlikely(!__pyx_tuple__163)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__163); + __Pyx_GIVEREF(__pyx_tuple__163); + + /* "PyCafe.pyx":2462 + * if (statusBundle!=ICAFE_NORMAL): + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * print ("Error in def getCompoundList: ") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(statusBundle) + * + */ + __pyx_tuple__164 = PyTuple_Pack(1, __pyx_kp_u_Error_in_def_getCompoundList); if (unlikely(!__pyx_tuple__164)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__164); + __Pyx_GIVEREF(__pyx_tuple__164); + + /* "PyCafe.pyx":2616 + * else: + * + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCompoundPVGroup. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if group handle, else if group name") + * + */ + __pyx_tuple__165 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_5); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__165); + __Pyx_GIVEREF(__pyx_tuple__165); + + /* "PyCafe.pyx":2730 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + __pyx_tuple__166 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_6); if (unlikely(!__pyx_tuple__166)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__166); + __Pyx_GIVEREF(__pyx_tuple__166); + + /* "PyCafe.pyx":2800 + * 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__167 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_getCache); if (unlikely(!__pyx_tuple__167)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__167); + __Pyx_GIVEREF(__pyx_tuple__167); + + /* "PyCafe.pyx":2801 + * if status == ICAFE_NORMAL: + * print ("This line in PyCafe def getCache should never appear!") + * print ("Datatype unknown, returning value 0") # <<<<<<<<<<<<<< + * return 0 + * + */ + __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_u_Datatype_unknown_returning_value); if (unlikely(!__pyx_tuple__168)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__168); + __Pyx_GIVEREF(__pyx_tuple__168); + + /* "PyCafe.pyx":2961 + * + * 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__169 = PyTuple_Pack(1, __pyx_kp_u_PyCafe_pyx_getArray_array_type_d); if (unlikely(!__pyx_tuple__169)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__169); + __Pyx_GIVEREF(__pyx_tuple__169); + + /* "PyCafe.pyx":2973 + * 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 + */ + __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_u_utf_8); if (unlikely(!__pyx_tuple__170)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__170); + __Pyx_GIVEREF(__pyx_tuple__170); + + /* "PyCafe.pyx":2979 + * 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') + */ + __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__171)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__171); + __Pyx_GIVEREF(__pyx_tuple__171); + + /* "PyCafe.pyx":2980 + * 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): + */ + __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__172)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__172); + __Pyx_GIVEREF(__pyx_tuple__172); + + /* "PyCafe.pyx":3019 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(i16val[ij]) + */ + __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_u_h); if (unlikely(!__pyx_tuple__173)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__173); + __Pyx_GIVEREF(__pyx_tuple__173); + + /* "PyCafe.pyx":3034 + * 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') + */ + __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__174)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__174); + __Pyx_GIVEREF(__pyx_tuple__174); + + /* "PyCafe.pyx":3035 + * 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): + */ + __pyx_tuple__175 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__175)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__175); + __Pyx_GIVEREF(__pyx_tuple__175); + + /* "PyCafe.pyx":3068 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('h') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(ival[ij]) + */ + __pyx_tuple__176 = PyTuple_Pack(1, __pyx_n_u_h); if (unlikely(!__pyx_tuple__176)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__176); + __Pyx_GIVEREF(__pyx_tuple__176); + + /* "PyCafe.pyx":3083 + * 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') + */ + __pyx_tuple__177 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__177)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__177); + __Pyx_GIVEREF(__pyx_tuple__177); + + /* "PyCafe.pyx":3084 + * 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): + */ + __pyx_tuple__178 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__178)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__178); + __Pyx_GIVEREF(__pyx_tuple__178); + + /* "PyCafe.pyx":3136 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('f') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(fval[ij]) + */ + __pyx_tuple__179 = PyTuple_Pack(1, __pyx_n_u_f); if (unlikely(!__pyx_tuple__179)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__179); + __Pyx_GIVEREF(__pyx_tuple__179); + + /* "PyCafe.pyx":3151 + * 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) + */ + __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__180)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__180); + __Pyx_GIVEREF(__pyx_tuple__180); + + /* "PyCafe.pyx":3152 + * 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): + */ + __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__181)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__181); + __Pyx_GIVEREF(__pyx_tuple__181); + + /* "PyCafe.pyx":3189 + * + * elif art in ['array','array.array']: + * arrayArray=array.array('d') # <<<<<<<<<<<<<< + * for ij in range(0, nelemToRetrieveFromCache): + * arrayArray.append(dval[ij]) + */ + __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_u_d_2); if (unlikely(!__pyx_tuple__182)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__182); + __Pyx_GIVEREF(__pyx_tuple__182); + + /* "PyCafe.pyx":3204 + * 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) + */ + __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_u_memoryview_numpy_array_ctypes); if (unlikely(!__pyx_tuple__183)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__183); + __Pyx_GIVEREF(__pyx_tuple__183); + + /* "PyCafe.pyx":3205 + * 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): + */ + __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_u_Returning_memoryview); if (unlikely(!__pyx_tuple__184)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__184); + __Pyx_GIVEREF(__pyx_tuple__184); + + /* "PyCafe.pyx":3258 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getPVCache. \n \ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_7); if (unlikely(!__pyx_tuple__185)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__185); + __Pyx_GIVEREF(__pyx_tuple__185); + + /* "PyCafe.pyx":3303 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCtrl. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_8); if (unlikely(!__pyx_tuple__186)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__186); + __Pyx_GIVEREF(__pyx_tuple__186); + + /* "PyCafe.pyx":3348 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def getCtrlCache. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_9); if (unlikely(!__pyx_tuple__187)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__187); + __Pyx_GIVEREF(__pyx_tuple__187); + + /* "PyCafe.pyx":3426 + * 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") + * + */ + __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_10); if (unlikely(!__pyx_tuple__188)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3426; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__188); + __Pyx_GIVEREF(__pyx_tuple__188); + + /* "PyCafe.pyx":3487 + * 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 + */ + __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_u_dbr_base_type_should_be_one_of_D); if (unlikely(!__pyx_tuple__191)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3487; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__191); + __Pyx_GIVEREF(__pyx_tuple__191); + + /* "PyCafe.pyx":3488 + * 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 + * + */ + __pyx_tuple__192 = PyTuple_Pack(1, __pyx_kp_u_Assuming_DBR_TIME); if (unlikely(!__pyx_tuple__192)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__192); + __Pyx_GIVEREF(__pyx_tuple__192); + + /* "PyCafe.pyx":3560 + * 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 + */ + __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_u_dbr_base_type_should_be_one_of_D); if (unlikely(!__pyx_tuple__195)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__195); + __Pyx_GIVEREF(__pyx_tuple__195); + + /* "PyCafe.pyx":3561 + * 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 + * + */ + __pyx_tuple__196 = PyTuple_Pack(1, __pyx_kp_u_Assuming_DBR_TIME); if (unlikely(!__pyx_tuple__196)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__196); + __Pyx_GIVEREF(__pyx_tuple__196); + + /* "PyCafe.pyx":3565 + * + * 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__197 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_11); if (unlikely(!__pyx_tuple__197)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__197); + __Pyx_GIVEREF(__pyx_tuple__197); + + /* "PyCafe.pyx":3580 + * 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") + * + */ + __pyx_tuple__198 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_g_12); if (unlikely(!__pyx_tuple__198)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3580; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__198); + __Pyx_GIVEREF(__pyx_tuple__198); + + /* "PyCafe.pyx":3664 + * + * if status == ECA_TIMEOUT : + * print ("======================================================") # <<<<<<<<<<<<<< + * self._c_cafe.printStatusMessage(status) + * print ("TIMEOUT in getGroup; swithing to getCompoundList") + */ + __pyx_tuple__200 = PyTuple_Pack(1, __pyx_kp_u__199); if (unlikely(!__pyx_tuple__200)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__200); + __Pyx_GIVEREF(__pyx_tuple__200); + + /* "PyCafe.pyx":3666 + * print ("======================================================") + * self._c_cafe.printStatusMessage(status) + * print ("TIMEOUT in getGroup; swithing to getCompoundList") # <<<<<<<<<<<<<< + * print ("======================================================") + * return self.getCompoundList(pvg.getNameAsString(), dt) + */ + __pyx_tuple__201 = PyTuple_Pack(1, __pyx_kp_u_TIMEOUT_in_getGroup_swithing_to); if (unlikely(!__pyx_tuple__201)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__201); + __Pyx_GIVEREF(__pyx_tuple__201); + + /* "PyCafe.pyx":3667 + * self._c_cafe.printStatusMessage(status) + * print ("TIMEOUT in getGroup; swithing to getCompoundList") + * print ("======================================================") # <<<<<<<<<<<<<< + * return self.getCompoundList(pvg.getNameAsString(), dt) + * + */ + __pyx_tuple__202 = PyTuple_Pack(1, __pyx_kp_u__199); if (unlikely(!__pyx_tuple__202)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__202); + __Pyx_GIVEREF(__pyx_tuple__202); + + /* "PyCafe.pyx":3925 + * + * if status == ECA_TIMEOUT: + * print ("======================================================") # <<<<<<<<<<<<<< + * print ("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print ("======================================================") + */ + __pyx_tuple__203 = PyTuple_Pack(1, __pyx_kp_u__199); if (unlikely(!__pyx_tuple__203)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__203); + __Pyx_GIVEREF(__pyx_tuple__203); + + /* "PyCafe.pyx":3926 + * if status == ECA_TIMEOUT: + * print ("======================================================") + * print ("TIMEOUT in getGroup; swithing to getCompoundPVGroup") # <<<<<<<<<<<<<< + * print ("======================================================") + * return self.getCompoundPVGroup(ghandle,dt) + */ + __pyx_tuple__204 = PyTuple_Pack(1, __pyx_kp_u_TIMEOUT_in_getGroup_swithing_to_2); if (unlikely(!__pyx_tuple__204)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__204); + __Pyx_GIVEREF(__pyx_tuple__204); + + /* "PyCafe.pyx":3927 + * print ("======================================================") + * print ("TIMEOUT in getGroup; swithing to getCompoundPVGroup") + * print ("======================================================") # <<<<<<<<<<<<<< + * return self.getCompoundPVGroup(ghandle,dt) + * + */ + __pyx_tuple__205 = PyTuple_Pack(1, __pyx_kp_u__199); if (unlikely(!__pyx_tuple__205)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__205); + __Pyx_GIVEREF(__pyx_tuple__205); + + /* "PyCafe.pyx":3982 + * with nogil: + * self._c_cafe.groupAttach(ghandle, pvg) + * print ("==============" ) # <<<<<<<<<<<<<< + * print (_METHOD_) + * pvg.showMax(1) + */ + __pyx_tuple__207 = PyTuple_Pack(1, __pyx_kp_u__206); if (unlikely(!__pyx_tuple__207)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__207); + __Pyx_GIVEREF(__pyx_tuple__207); + + /* "PyCafe.pyx":3990 + * status=self._c_cafe.groupGetCache(ghandle, pvg) + * pvg.showMax(1) + * print ("==============" ) # <<<<<<<<<<<<<< + * print(status, pvg.getStatusGroup() ) + * print ("==============" ) + */ + __pyx_tuple__208 = PyTuple_Pack(1, __pyx_kp_u__206); if (unlikely(!__pyx_tuple__208)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__208); + __Pyx_GIVEREF(__pyx_tuple__208); + + /* "PyCafe.pyx":3992 + * print ("==============" ) + * print(status, pvg.getStatusGroup() ) + * print ("==============" ) # <<<<<<<<<<<<<< + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + */ + __pyx_tuple__209 = PyTuple_Pack(1, __pyx_kp_u__206); if (unlikely(!__pyx_tuple__209)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__209); + __Pyx_GIVEREF(__pyx_tuple__209); + + /* "PyCafe.pyx":4109 + * 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_tuple__210 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__210)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__210); + __Pyx_GIVEREF(__pyx_tuple__210); + + /* "PyCafe.pyx":4112 + * 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__211 = PyTuple_Pack(1, __pyx_kp_u_Analysing_statusList); if (unlikely(!__pyx_tuple__211)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__211); + __Pyx_GIVEREF(__pyx_tuple__211); + + /* "PyCafe.pyx":4117 + * print ("PV", _pvlist[i], "[",i,"]", " has error: ") + * self._c_cafe.printStatusMessage(statusList[i]) + * print ("") # <<<<<<<<<<<<<< + * return ghandle + * + */ + __pyx_tuple__214 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__214)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__214); + __Pyx_GIVEREF(__pyx_tuple__214); + + /* "PyCafe.pyx":4286 + * 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()); + */ + __pyx_tuple__217 = PyTuple_Pack(1, __pyx_kp_u_dbr_base_type_should_be_one_of_D); if (unlikely(!__pyx_tuple__217)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__217); + __Pyx_GIVEREF(__pyx_tuple__217); + + /* "PyCafe.pyx":4287 + * 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) + */ + __pyx_tuple__218 = PyTuple_Pack(1, __pyx_kp_u_Assuming_DBR_TIME); if (unlikely(!__pyx_tuple__218)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__218); + __Pyx_GIVEREF(__pyx_tuple__218); + + /* "PyCafe.pyx":4331 + * #Need this to allow a fraction of a second for the callback fn to be called + * #if setPyHandler is used + * time.sleep(0.01); # <<<<<<<<<<<<<< + * if status !=ICAFE_NORMAL: + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + */ + __pyx_tuple__219 = PyTuple_Pack(1, __pyx_float_0_01); if (unlikely(!__pyx_tuple__219)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__219); + __Pyx_GIVEREF(__pyx_tuple__219); + + /* "PyCafe.pyx":4369 + * with nogil: + * status=self._c_cafe.monitorStopWithID(handle, mpidUI) + * time.sleep(0.01) # <<<<<<<<<<<<<< + * + * if (status==ICAFE_NORMAL): + */ + __pyx_tuple__220 = PyTuple_Pack(1, __pyx_float_0_01); if (unlikely(!__pyx_tuple__220)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4369; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__220); + __Pyx_GIVEREF(__pyx_tuple__220); + + /* "PyCafe.pyx":4383 + * + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def monitorStop. \n\ # <<<<<<<<<<<<<< + * monitorPolicy ID (mpid) should be ") + * else: + */ + __pyx_tuple__221 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m); if (unlikely(!__pyx_tuple__221)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4383; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__221); + __Pyx_GIVEREF(__pyx_tuple__221); + + /* "PyCafe.pyx":4388 + * with nogil: + * status=self._c_cafe.monitorStop(handle) + * time.sleep(0.01) # <<<<<<<<<<<<<< + * + * if (status==ICAFE_NORMAL): + */ + __pyx_tuple__222 = PyTuple_Pack(1, __pyx_float_0_01); if (unlikely(!__pyx_tuple__222)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4388; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__222); + __Pyx_GIVEREF(__pyx_tuple__222); + + /* "PyCafe.pyx":4440 + * #del self.moncbList[:] + * #self.monDict.clear() + * time.sleep(0.5) # <<<<<<<<<<<<<< + * monDictGlobal.clear() + * + */ + __pyx_tuple__223 = PyTuple_Pack(1, __pyx_float_0_5); if (unlikely(!__pyx_tuple__223)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__223); + __Pyx_GIVEREF(__pyx_tuple__223); + + /* "PyCafe.pyx":4752 + * elif isinstance(valSet, (bytes,bytearray)): + * #print("bytes,bytearray") + * valSetS=valSet.decode('utf8') # <<<<<<<<<<<<<< + * with nogil: + * status=self._c_cafe.setString(handle, valSetS) + */ + __pyx_tuple__224 = PyTuple_Pack(1, __pyx_n_u_utf8); if (unlikely(!__pyx_tuple__224)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4752; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__224); + __Pyx_GIVEREF(__pyx_tuple__224); + + /* "PyCafe.pyx":4761 + * 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 ") + */ + __pyx_tuple__225 = PyTuple_Pack(1, __pyx_kp_u_PyCafe_def_set_WARNING_DATA_TYPE); if (unlikely(!__pyx_tuple__225)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__225); + __Pyx_GIVEREF(__pyx_tuple__225); + + /* "PyCafe.pyx":4762 + * 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) + */ + __pyx_tuple__226 = PyTuple_Pack(1, __pyx_kp_u_Input_data_whether_within_a_list); if (unlikely(!__pyx_tuple__226)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__226); + __Pyx_GIVEREF(__pyx_tuple__226); + + /* "PyCafe.pyx":4790 + * + * if not isinstance(handleList, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setScalarList. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__227 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s); if (unlikely(!__pyx_tuple__227)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__227); + __Pyx_GIVEREF(__pyx_tuple__227); + + /* "PyCafe.pyx":4796 + * 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") + * + */ + __pyx_tuple__228 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_2); if (unlikely(!__pyx_tuple__228)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__228); + __Pyx_GIVEREF(__pyx_tuple__228); + + /* "PyCafe.pyx":4842 + * pvd[i].setInt(valList[i]) + * else: + * print ("This line in PyCafe def setScalarList should never appear!") # <<<<<<<<<<<<<< + * + * cdef int status=ICAFE_NORMAL + */ + __pyx_tuple__229 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_setScala); if (unlikely(!__pyx_tuple__229)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__229); + __Pyx_GIVEREF(__pyx_tuple__229); + + /* "PyCafe.pyx":4864 + * print ("with error status=", pvd[i].getStatus()) + * self._c_cafe.printStatusMessage(pvd[i].getStatus()) + * print ("") # <<<<<<<<<<<<<< + * statusList.append(pvd[i].getStatus()) + * + */ + __pyx_tuple__230 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__230)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__230); + __Pyx_GIVEREF(__pyx_tuple__230); + + /* "PyCafe.pyx":4885 + * 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__231 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_4); if (unlikely(!__pyx_tuple__231)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__231); + __Pyx_GIVEREF(__pyx_tuple__231); + + /* "PyCafe.pyx":4891 + * 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") + * + */ + __pyx_tuple__232 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_5); if (unlikely(!__pyx_tuple__232)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__232); + __Pyx_GIVEREF(__pyx_tuple__232); + + /* "PyCafe.pyx":4952 + * + * 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 , , , ") + */ + __pyx_tuple__233 = PyTuple_Pack(1, __pyx_kp_u_This_line_in_PyCafe_def_setCompo); if (unlikely(!__pyx_tuple__233)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__233); + __Pyx_GIVEREF(__pyx_tuple__233); + + /* "PyCafe.pyx":4953 + * 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 , , , ") + * + */ + __pyx_tuple__234 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_7); if (unlikely(!__pyx_tuple__234)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__234); + __Pyx_GIVEREF(__pyx_tuple__234); + + /* "PyCafe.pyx":4974 + * 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_tuple__235 = PyTuple_Pack(1, __pyx_kp_u__85); if (unlikely(!__pyx_tuple__235)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__235); + __Pyx_GIVEREF(__pyx_tuple__235); + + /* "PyCafe.pyx":5053 + * + * 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 , , , ") + * + */ + __pyx_tuple__237 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_8); if (unlikely(!__pyx_tuple__237)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__237); + __Pyx_GIVEREF(__pyx_tuple__237); + + /* "PyCafe.pyx":5093 + * + * if not isinstance(handlePVSet, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * First input argument, should be of handles or PVs") + * + */ + __pyx_tuple__238 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_9); if (unlikely(!__pyx_tuple__238)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__238); + __Pyx_GIVEREF(__pyx_tuple__238); + + /* "PyCafe.pyx":5097 + * + * if not isinstance(valSet, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Second input argument, should be of scalar values") + * + */ + __pyx_tuple__239 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_10); if (unlikely(!__pyx_tuple__239)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__239); + __Pyx_GIVEREF(__pyx_tuple__239); + + /* "PyCafe.pyx":5101 + * + * if not isinstance(handlePVMatch, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def setAndMatchMany. \n\ # <<<<<<<<<<<<<< + * Third input argument, should be of handles or PVs") + * + */ + __pyx_tuple__240 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_11); if (unlikely(!__pyx_tuple__240)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__240); + __Pyx_GIVEREF(__pyx_tuple__240); + + /* "PyCafe.pyx":5105 + * + * 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__241 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_12); if (unlikely(!__pyx_tuple__241)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__241); + __Pyx_GIVEREF(__pyx_tuple__241); + + /* "PyCafe.pyx":5109 + * + * 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__242 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_13); if (unlikely(!__pyx_tuple__242)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__242); + __Pyx_GIVEREF(__pyx_tuple__242); + + /* "PyCafe.pyx":5204 + * + * if not isinstance(valSet, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def matchMany. \n\ # <<<<<<<<<<<<<< + * Second input argument, should be of scalar values") + * + */ + __pyx_tuple__243 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_2); if (unlikely(!__pyx_tuple__243)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__243); + __Pyx_GIVEREF(__pyx_tuple__243); + + /* "PyCafe.pyx":5208 + * + * if not isinstance(handlePVMatch, (list)): + * raise Exception ("EXCEPTION RAISED IN PyCafe def matchMany. \n\ # <<<<<<<<<<<<<< + * Third input argument, should be of handles or PVs") + * + */ + __pyx_tuple__244 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_3); if (unlikely(!__pyx_tuple__244)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__244); + __Pyx_GIVEREF(__pyx_tuple__244); + + /* "PyCafe.pyx":5212 + * + * 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__245 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_m_4); if (unlikely(!__pyx_tuple__245)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__245); + __Pyx_GIVEREF(__pyx_tuple__245); + + /* "PyCafe.pyx":5295 + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") # <<<<<<<<<<<<<< + * + * #returns nelem + */ + __pyx_tuple__246 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__246)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__246); + __Pyx_GIVEREF(__pyx_tuple__246); + + /* "PyCafe.pyx":5320 + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") # <<<<<<<<<<<<<< + * + * #returns nelem + */ + __pyx_tuple__247 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__247)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__247); + __Pyx_GIVEREF(__pyx_tuple__247); + + /* "PyCafe.pyx":5342 + * if PYCAFE_PRINT_LEVEL>=PYCAFE_PRINT_LOW: + * self._c_cafe.printStatusMessage(ECAFE_INVALID_HANDLE) + * raise Exception("EXCEPTION RAISED in PyCafe def setNelemToRetrieveFromCacheToOne") # <<<<<<<<<<<<<< + * + * #returns nelem + */ + __pyx_tuple__248 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__248)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__248); + __Pyx_GIVEREF(__pyx_tuple__248); + + /* "PyCafe.pyx":5365 + * 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 + */ + __pyx_tuple__249 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__249)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__249); + __Pyx_GIVEREF(__pyx_tuple__249); + + /* "PyCafe.pyx":5378 + * handle=self.checkForHandle(handlePV) + * else: + * raise Exception ("EXCEPTION RAISED IN PyCafe def set. \n\ # <<<<<<<<<<<<<< + * First input argument, should be if handle, else if PV") + * + */ + __pyx_tuple__250 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_IN_PyCafe_def_s_14); if (unlikely(!__pyx_tuple__250)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__250); + __Pyx_GIVEREF(__pyx_tuple__250); + + /* "PyCafe.pyx":5385 + * 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 + */ + __pyx_tuple__251 = PyTuple_Pack(1, __pyx_kp_u_EXCEPTION_RAISED_in_PyCafe_def_s_3); if (unlikely(!__pyx_tuple__251)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__251); + __Pyx_GIVEREF(__pyx_tuple__251); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":218 + * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< + * + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + */ + __pyx_tuple__252 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__252)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__252); + __Pyx_GIVEREF(__pyx_tuple__252); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":222 + * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) + * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * + * info.buf = PyArray_DATA(self) + */ + __pyx_tuple__253 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__253)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__253); + __Pyx_GIVEREF(__pyx_tuple__253); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":259 + * 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__254 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__254)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__254); + __Pyx_GIVEREF(__pyx_tuple__254); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":799 + * + * 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__255 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__255)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__255); + __Pyx_GIVEREF(__pyx_tuple__255); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":803 + * 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_tuple__256 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__256)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__256); + __Pyx_GIVEREF(__pyx_tuple__256); + + /* "../../../../../../../../opt/gfa/python-3.5/latest/lib/python3.5/site-packages/Cython/Includes/numpy/__init__.pxd":823 + * 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__257 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__257)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__257); + __Pyx_GIVEREF(__pyx_tuple__257); + + /* "View.MemoryView":129 + * + * if not self.ndim: + * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<< + * + * if itemsize <= 0: + */ + __pyx_tuple__258 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__258)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__258); + __Pyx_GIVEREF(__pyx_tuple__258); + + /* "View.MemoryView":132 + * + * if itemsize <= 0: + * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<< + * + * if not isinstance(format, bytes): + */ + __pyx_tuple__259 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__259)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__259); + __Pyx_GIVEREF(__pyx_tuple__259); + + /* "View.MemoryView":135 + * + * if not isinstance(format, bytes): + * format = format.encode('ASCII') # <<<<<<<<<<<<<< + * self._format = format # keep a reference to the byte string + * self.format = self._format + */ + __pyx_tuple__260 = PyTuple_Pack(1, __pyx_n_s_ASCII); if (unlikely(!__pyx_tuple__260)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__260); + __Pyx_GIVEREF(__pyx_tuple__260); + + /* "View.MemoryView":144 + * + * if not self._shape: + * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__261 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__261)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__261); + __Pyx_GIVEREF(__pyx_tuple__261); + + /* "View.MemoryView":172 + * self.data = malloc(self.len) + * if not self.data: + * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<< + * + * if self.dtype_is_object: + */ + __pyx_tuple__262 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__262)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__262); + __Pyx_GIVEREF(__pyx_tuple__262); + + /* "View.MemoryView":188 + * 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__263 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__263)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__263); + __Pyx_GIVEREF(__pyx_tuple__263); + + /* "View.MemoryView":447 + * 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__264 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__264)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__264); + __Pyx_GIVEREF(__pyx_tuple__264); + + /* "View.MemoryView":523 + * 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__265 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__265)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__265); + __Pyx_GIVEREF(__pyx_tuple__265); + + /* "View.MemoryView":531 + * def __get__(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__266 = PyTuple_New(1); if (unlikely(!__pyx_tuple__266)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__266); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_tuple__266, 0, __pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_tuple__266); + + /* "View.MemoryView":640 + * if item is Ellipsis: + * if not seen_ellipsis: + * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<< + * seen_ellipsis = True + * else: + */ + __pyx_slice__267 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__267)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__267); + __Pyx_GIVEREF(__pyx_slice__267); + + /* "View.MemoryView":643 + * seen_ellipsis = True + * else: + * result.append(slice(None)) # <<<<<<<<<<<<<< + * have_slices = True + * else: + */ + __pyx_slice__268 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__268)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__268); + __Pyx_GIVEREF(__pyx_slice__268); + + /* "View.MemoryView":654 + * nslices = ndim - len(result) + * if nslices: + * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<< + * + * return have_slices or nslices, tuple(result) + */ + __pyx_slice__269 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__269)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__269); + __Pyx_GIVEREF(__pyx_slice__269); + + /* "View.MemoryView":661 + * for suboffset in suboffsets[:ndim]: + * if suboffset >= 0: + * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__270 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__270)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__270); + __Pyx_GIVEREF(__pyx_tuple__270); + + /* "FromPyStructUtility":19 + * value = obj['secPastEpoch'] + * except KeyError: + * raise ValueError("No value specified for struct attribute 'secPastEpoch'") # <<<<<<<<<<<<<< + * result.secPastEpoch = value + * try: + */ + __pyx_tuple__271 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at); if (unlikely(!__pyx_tuple__271)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__271); + __Pyx_GIVEREF(__pyx_tuple__271); + + /* "FromPyStructUtility":24 + * value = obj['nsec'] + * except KeyError: + * raise ValueError("No value specified for struct attribute 'nsec'") # <<<<<<<<<<<<<< + * result.nsec = value + * return result + */ + __pyx_tuple__272 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_2); if (unlikely(!__pyx_tuple__272)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__272); + __Pyx_GIVEREF(__pyx_tuple__272); + + /* "PyCafeDefs.pxi":2 + * + * def show(): # <<<<<<<<<<<<<< + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") + */ + __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_afs_psi_ch_project_cafe_gitwork, __pyx_n_s_show, 2, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "View.MemoryView":278 + * return self.name + * + * cdef generic = Enum("") # <<<<<<<<<<<<<< + * cdef strided = Enum("") # default + * cdef indirect = Enum("") + */ + __pyx_tuple__274 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__274)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__274); + __Pyx_GIVEREF(__pyx_tuple__274); + + /* "View.MemoryView":279 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * + */ + __pyx_tuple__275 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__275)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__275); + __Pyx_GIVEREF(__pyx_tuple__275); + + /* "View.MemoryView":280 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__276 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__276)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__276); + __Pyx_GIVEREF(__pyx_tuple__276); + + /* "View.MemoryView":283 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * + */ + __pyx_tuple__277 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__277)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__277); + __Pyx_GIVEREF(__pyx_tuple__277); + + /* "View.MemoryView":284 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__278 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__278)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__278); + __Pyx_GIVEREF(__pyx_tuple__278); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + return 0; + __pyx_L1_error:; + return -1; +} + +#if PY_MAJOR_VERSION < 3 +PyMODINIT_FUNC initPyCafe(void); /*proto*/ +PyMODINIT_FUNC initPyCafe(void) +#else +PyMODINIT_FUNC PyInit_PyCafe(void); /*proto*/ +PyMODINIT_FUNC PyInit_PyCafe(void) +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #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("PyMODINIT_FUNC PyInit_PyCafe(void)", 0); + if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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 PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("PyCafe", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if CYTHON_COMPILING_IN_PYPY + Py_INCREF(__pyx_b); + #endif + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + if (__pyx_module_is_main_PyCafe) { + if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!PyDict_GetItemString(modules, "PyCafe")) { + if (unlikely(PyDict_SetItemString(modules, "PyCafe", __pyx_m) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Global init code ---*/ + __pyx_v_6PyCafe_py_cb = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_py_cb_handle = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_py_cb_ctrl = Py_None; Py_INCREF(Py_None); + __pyx_v_6PyCafe_monDictGlobal = ((PyObject*)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); + /*--- Variable export code ---*/ + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("py_cb_wrapper", (void (*)(void))__pyx_f_6PyCafe_py_cb_wrapper, "void (PVDataHolder, unsigned int, std::string)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("py_cb_ctrl_wrapper", (void (*)(void))__pyx_f_6PyCafe_py_cb_ctrl_wrapper, "void (PVCtrlHolder, unsigned int, std::string)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("py_cb_handle_wrapper", (void (*)(void))__pyx_f_6PyCafe_py_cb_handle_wrapper, "void (unsigned int)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("py_cb_handle_monid_wrapper", (void (*)(void))__pyx_f_6PyCafe_py_cb_handle_monid_wrapper, "void (unsigned int, unsigned long)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("py_cb_handle_get_wrapper", (void (*)(void))__pyx_f_6PyCafe_py_cb_handle_get_wrapper, "void (unsigned int)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("py_cb_handle_put_wrapper", (void (*)(void))__pyx_f_6PyCafe_py_cb_handle_put_wrapper, "void (unsigned int)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_6PyCafe__finalizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe__finalizer.tp_print = 0; + if (PyObject_SetAttrString(__pyx_m, "_finalizer", (PyObject *)&__pyx_type_6PyCafe__finalizer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe__finalizer = &__pyx_type_6PyCafe__finalizer; + if (PyType_Ready(&__pyx_type_6PyCafe_CyCa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_CyCa.tp_print = 0; + if (PyObject_SetAttrString(__pyx_m, "CyCa", (PyObject *)&__pyx_type_6PyCafe_CyCa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe_CyCa = &__pyx_type_6PyCafe_CyCa; + if (PyType_Ready(&__pyx_type_6PyCafe_channelInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_channelInfo.tp_print = 0; + if (PyObject_SetAttrString(__pyx_m, "channelInfo", (PyObject *)&__pyx_type_6PyCafe_channelInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe_channelInfo = &__pyx_type_6PyCafe_channelInfo; + if (PyType_Ready(&__pyx_type_6PyCafe__epicsTimeStampAsDate) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe__epicsTimeStampAsDate.tp_print = 0; + if (PyObject_SetAttrString(__pyx_m, "_epicsTimeStampAsDate", (PyObject *)&__pyx_type_6PyCafe__epicsTimeStampAsDate) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe__epicsTimeStampAsDate = &__pyx_type_6PyCafe__epicsTimeStampAsDate; + __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_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_pvctrl.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvctrl.tp_dict, __pyx_vtabptr_6PyCafe_pvctrl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "pvctrl", (PyObject *)&__pyx_type_6PyCafe_pvctrl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe_pvctrl = &__pyx_type_6PyCafe_pvctrl; + if (PyType_Ready(&__pyx_type_6PyCafe_CyCafeException) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_CyCafeException.tp_print = 0; + if (PyObject_SetAttrString(__pyx_m, "CyCafeException", (PyObject *)&__pyx_type_6PyCafe_CyCafeException) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe_CyCafeException = &__pyx_type_6PyCafe_CyCafeException; + if (PyType_Ready(&__pyx_type_6PyCafe_monitorpolicy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_monitorpolicy.tp_print = 0; + if (PyObject_SetAttrString(__pyx_m, "monitorpolicy", (PyObject *)&__pyx_type_6PyCafe_monitorpolicy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_pvdata.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvdata.tp_dict, __pyx_vtabptr_6PyCafe_pvdata) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "pvdata", (PyObject *)&__pyx_type_6PyCafe_pvdata) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_pvgroup.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type_6PyCafe_pvgroup.tp_dict, __pyx_vtabptr_6PyCafe_pvgroup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "pvgroup", (PyObject *)&__pyx_type_6PyCafe_pvgroup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe_pvgroup = &__pyx_type_6PyCafe_pvgroup; + __pyx_vtabptr_6PyCafe_CyCafe = &__pyx_vtable_6PyCafe_CyCafe; + __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_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_6PyCafe_CyCafe.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type_6PyCafe_CyCafe.tp_dict, __pyx_vtabptr_6PyCafe_CyCafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "CyCafe", (PyObject *)&__pyx_type_6PyCafe_CyCafe) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_6PyCafe_CyCafe = &__pyx_type_6PyCafe_CyCafe; + if (PyType_Ready(&__pyx_type___pyx_array) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type___pyx_array.tp_print = 0; + __pyx_array_type = &__pyx_type___pyx_array; + if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type___pyx_MemviewEnum.tp_print = 0; + __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_filename = __pyx_f[3]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type___pyx_memoryview.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[3]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type___pyx_memoryviewslice.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice; + /*--- Type import code ---*/ + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", + #if CYTHON_COMPILING_IN_PYPY + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*--- Variable import code ---*/ + /*--- Function import code ---*/ + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + + /* "PyCafe.pyx":5 + * + * cimport PyCafe as ccafe + * import numpy as np # <<<<<<<<<<<<<< + * cimport numpy as cnp + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":8 + * cimport numpy as cnp + * + * import array # <<<<<<<<<<<<<< + * from cython.view cimport array as cvarray + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_array, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":14 + * from cython.operator cimport dereference as deref + * from cython cimport view + * import ctypes # <<<<<<<<<<<<<< + * import time + * import timeit + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ctypes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":15 + * from cython cimport view + * import ctypes + * import time # <<<<<<<<<<<<<< + * import timeit + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":16 + * import ctypes + * import time + * import timeit # <<<<<<<<<<<<<< + * + * import os + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_timeit, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_timeit, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":18 + * import timeit + * + * import os # <<<<<<<<<<<<<< + * import cython + * import inspect + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":20 + * import os + * import cython + * import inspect # <<<<<<<<<<<<<< + * import sys + * + */ + __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":21 + * import cython + * import inspect + * import sys # <<<<<<<<<<<<<< + * + * #from libcpp.string cimport string + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":25 + * #from libcpp.string cimport string + * + * import Cython.Compiler.Options # <<<<<<<<<<<<<< + * Cython.Compiler.Options.annotate=True + * + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_Cython_Compiler_Options, 0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Cython, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafe.pyx":26 + * + * import Cython.Compiler.Options + * Cython.Compiler.Options.annotate=True # <<<<<<<<<<<<<< + * + * include "PyCafeDefs.pxi" + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Cython); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Compiler); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __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_Options); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_annotate, Py_True) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":2 + * + * def show(): # <<<<<<<<<<<<<< + * print ("cafe=PyCafe.CyCafe()") + * print ("cyca=PyCafe.CyCa()") + */ + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6PyCafe_1show, NULL, __pyx_n_s_PyCafe); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_show, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "PyCafeDefs.pxi":112 + * + * #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":113 + * #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_MED = 5; + + /* "PyCafeDefs.pxi":114 + * 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 + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_LOW = 1; + + /* "PyCafeDefs.pxi":116 + * cdef int PYCAFE_PRINT_LOW=1 + * + * cdef int PYCAFE_PRINT_LEVEL=PYCAFE_PRINT_MED # <<<<<<<<<<<<<< + * + * ctypedef shared_ptr[vector [double]] vdouble_ptr + */ + __pyx_v_6PyCafe_PYCAFE_PRINT_LEVEL = __pyx_v_6PyCafe_PYCAFE_PRINT_MED; + + /* "PyCafeDefs.pxi":121 + * ctypedef shared_ptr[vector [float]] vfloat_ptr + * + * cdef object py_cb = None # <<<<<<<<<<<<<< + * cdef object py_cb_handle = None + * cdef object py_cb_ctrl = None + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafeDefs.pxi":122 + * + * cdef object py_cb = None + * cdef object py_cb_handle = None # <<<<<<<<<<<<<< + * cdef object py_cb_ctrl = 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.pxi":123 + * cdef object py_cb = None + * cdef object py_cb_handle = None + * cdef object py_cb_ctrl = None # <<<<<<<<<<<<<< + * + * + */ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_6PyCafe_py_cb_ctrl); + __Pyx_DECREF_SET(__pyx_v_6PyCafe_py_cb_ctrl, Py_None); + __Pyx_GIVEREF(Py_None); + + /* "PyCafe.pyx":30 + * include "PyCafeDefs.pxi" + * + * cdef dict monDictGlobal={} # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __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":3467 + * + * ################################################################################## + * 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)" + */ + __pyx_k__189 = DBR_TIME; + __pyx_k__190 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":3540 + * + * ################################################################################## + * 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)" + */ + __pyx_k__193 = DBR_TIME; + __pyx_k__194 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":4231 + * + * ########################################################################################## + * 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)" + * + */ + __pyx_k__215 = DBR_TIME; + __pyx_k__216 = ((DBE_VALUE | DBE_LOG) | DBE_ALARM); + + /* "PyCafe.pyx":1 + * #distutils: language = c++ # <<<<<<<<<<<<<< + * # file: PyCafe.pyx + * + */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "View.MemoryView":205 + * 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)), __pyx_k_getbuffer_obj_view_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_array_type); + + /* "View.MemoryView":278 + * 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__274, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __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":279 + * + * cdef generic = Enum("") + * cdef strided = Enum("") # default # <<<<<<<<<<<<<< + * cdef indirect = Enum("") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__275, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __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":280 + * cdef generic = Enum("") + * cdef strided = Enum("") # default + * cdef indirect = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__276, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __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":283 + * + * + * cdef contiguous = Enum("") # <<<<<<<<<<<<<< + * cdef indirect_contiguous = Enum("") + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__277, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __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":284 + * + * cdef contiguous = Enum("") + * cdef indirect_contiguous = Enum("") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__278, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __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":498 + * info.obj = self + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), __pyx_k_getbuffer_obj_view_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_memoryview_type); + + /* "View.MemoryView":954 + * return self.from_object + * + * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), __pyx_k_getbuffer_obj_view_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyType_Modified(__pyx_memoryviewslice_type); + + /* "vector.from_py":49 + * + * @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: + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init PyCafe", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_DECREF(__pyx_m); __pyx_m = 0; + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init PyCafe"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if PY_MAJOR_VERSION < 3 + return; + #else + return __pyx_m; + #endif +} + +/* --- Runtime support code --- */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule((char *)modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +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; +} + +#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 + +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + 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); +#else + PyErr_Restore(type, value, tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(type, value, tb); +#endif +} + +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; +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#endif + __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 +} + +#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 + +#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) { +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { +#else + if (likely(PyCFunction_Check(func))) { +#endif + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); + } + } + 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 + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON + result = PyDict_GetItem(__pyx_d, name); + if (likely(result)) { + Py_INCREF(result); + } else { +#else + result = PyObject_GetItem(__pyx_d, name); + if (!result) { + PyErr_Clear(); +#endif + result = __Pyx_GetBuiltinName(name); + } + return result; +} + +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); +} + +static CYTHON_INLINE 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_CheckExact(key)) && 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; +} + +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 +} + +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; +} + +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { +#if CYTHON_COMPILING_IN_CPYTHON + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Clear(); + else + goto bad; + } + } + return ms->sq_slice(obj, cstart, cstop); + } +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_COMPILING_IN_CPYTHON + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + PyErr_Format(PyExc_TypeError, + "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); +bad: + return NULL; +} + +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" +#endif + +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int 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 && PY_MAJOR_VERSION >= 3 + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a; + 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; + } + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } + 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; + } + 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; + } + 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; + } + 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; + } + #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 + default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); + #else + default: Py_RETURN_FALSE; + #endif + } + } + if (a == b) { + 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); +} +#endif + +static CYTHON_INLINE 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_COMPILING_IN_CPYTHON + if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, 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_COMPILING_IN_CPYTHON + if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, 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_COMPILING_IN_CPYTHON + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely((n >= 0) & (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((n >= 0) & (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)) + PyErr_Clear(); + else + return NULL; + } + } + 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)); +} + +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 = 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 +} + +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; + } + 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_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 +} + +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + PyObject *method, *result = NULL; + method = __Pyx_PyObject_GetAttrStr(obj, method_name); + if (unlikely(!method)) goto bad; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(PyMethod_Check(method))) { + PyObject *self = PyMethod_GET_SELF(method); + if (likely(self)) { + PyObject *args; + PyObject *function = PyMethod_GET_FUNCTION(method); + 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); + Py_INCREF(function); + Py_DECREF(method); method = NULL; + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); + return result; + } + } +#endif + result = __Pyx_PyObject_CallOneArg(method, arg); +bad: + Py_XDECREF(method); + return result; +} + +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; +} + +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +#else + PyErr_GetExcInfo(type, value, tb); +#endif +} +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + 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; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(type, value, tb); +#endif +} + +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + 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_COMPILING_IN_CPYTHON + 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_COMPILING_IN_CPYTHON + 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; + 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; +} + +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + 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_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 PY_VERSION_HEX >= 0x03030000 + if (cause) { +#else + if (cause && cause != Py_None) { +#endif + 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 = PyThreadState_GET(); + 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 + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { +#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 + +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + 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; +#else + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); +#endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} + +static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); +} +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, + const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (none_allowed && obj == Py_None) return 1; + else if (exact) { + if (likely(Py_TYPE(obj) == type)) return 1; + #if PY_MAJOR_VERSION == 2 + else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(PyObject_TypeCheck(obj, type))) return 1; + } + __Pyx_RaiseArgumentTypeInvalid(name, obj, type); + return 0; +} + +static CYTHON_INLINE 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_COMPILING_IN_CPYTHON + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((!boundscheck) || likely((n >= 0) & (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)) + PyErr_Clear(); + else + return -1; + } + } + 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); +} + +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { + unsigned int n = 1; + return *(unsigned char*)(&n) != 0; +} +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 CYTHON_INLINE 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_IsLittleEndian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_IsLittleEndian()) { + 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; + } + 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; + } + 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; + } + } + } +} +static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} +static CYTHON_INLINE int __Pyx_GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + if (obj == Py_None || obj == NULL) { + __Pyx_ZeroBuffer(buf); + return 0; + } + buf->buf = NULL; + if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; + if (buf->ndim != nd) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); + goto fail; + } + if (!cast) { + __Pyx_BufFmt_Context ctx; + __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 "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; + return 0; +fail:; + __Pyx_ZeroBuffer(buf); + return -1; +} +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (info->buf == NULL) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); +} + +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; +} +static CYTHON_INLINE void __pyx_fatalerror(const char *fmt, ...) { + va_list vargs; + char msg[200]; +#ifdef HAVE_STDARG_PROTOTYPES + va_start(vargs, fmt); +#else + va_start(vargs); +#endif + vsnprintf(msg, 200, fmt, vargs); + Py_FatalError(msg); + va_end(vargs); +} +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; + } +} + +#if CYTHON_COMPILING_IN_CPYTHON +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 && PY_MAJOR_VERSION >= 3 + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; + 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; + } 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; + } + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } 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; + } + 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; + } 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; + } + 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; + } 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; + } + 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; + } 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; + } + 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; + } 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; + } + default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + } + x = a - b; + return PyLong_FromLong(x); + long_long: + llx = lla - llb; + return PyLong_FromLongLong(llx); + } + #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 + +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); +} + +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"); +} + +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(exc_type == PyExc_StopIteration) || 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 +} + +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; +} + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(PyObject_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +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; +} + +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_COMPILING_IN_CPYTHON +#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); +} + +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); + } +} + +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_VERSION_HEX < 0x03030000 + 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, '.')) { + #if PY_VERSION_HEX < 0x03030000 + PyObject *py_level = PyInt_FromLong(1); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + #endif + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_VERSION_HEX < 0x03030000 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_VERSION_HEX < 0x03030000 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +#if CYTHON_COMPILING_IN_CPYTHON +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 && PY_MAJOR_VERSION >= 3 + if (likely(PyLong_CheckExact(op1))) { + const long b = intval; + long a, x; + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; + 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; + } 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; + } + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + } 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; + } + 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; + } 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; + } + 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; + } 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; + } + 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; + } 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; + } + 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; + } 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; + } + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); + } + #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 + +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +static CYTHON_INLINE long __Pyx_div_long(long a, long b) { + long q = a / b; + long r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return q; +} + +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; +} + +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; +} + +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; +} + +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); +} + +#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; + 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( + PyThreadState_GET(), /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + py_frame->f_lineno = py_line; + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DBR_TYPE(DBR_TYPE value) { + const DBR_TYPE neg_one = (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); + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(DBR_TYPE) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(DBR_TYPE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +#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 (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); + if (PyObject_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags); + if (PyObject_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 (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; } + Py_DECREF(obj); + view->obj = NULL; +} +#endif + + + #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;\ + } + +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { + const unsigned int neg_one = (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)) + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE ChannelWhenToFlushSendBufferPolicyKind __Pyx_PyInt_As_ChannelWhenToFlushSendBufferPolicyKind(PyObject *x) { + const ChannelWhenToFlushSendBufferPolicyKind neg_one = (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)) + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(ChannelWhenToFlushSendBufferPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWhenToFlushSendBufferPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE ChannelWaitForResponsePolicyKind __Pyx_PyInt_As_ChannelWaitForResponsePolicyKind(PyObject *x) { + const ChannelWaitForResponsePolicyKind neg_one = (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)) + } else if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(ChannelWaitForResponsePolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelWaitForResponsePolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE ChannelRequestPolicyKind __Pyx_PyInt_As_ChannelRequestPolicyKind(PyObject *x) { + const ChannelRequestPolicyKind neg_one = (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)) + } else if (sizeof(ChannelRequestPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(ChannelRequestPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelRequestPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (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)) + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE DBR_TYPE __Pyx_PyInt_As_DBR_TYPE(PyObject *x) { + const DBR_TYPE neg_one = (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)) + } else if (sizeof(DBR_TYPE) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(DBR_TYPE) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(DBR_TYPE, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE ChannelGetCacheWaitPolicyKind __Pyx_PyInt_As_ChannelGetCacheWaitPolicyKind(PyObject *x) { + const ChannelGetCacheWaitPolicyKind neg_one = (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)) + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetCacheWaitPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE ChannelGetActionWhenMonitorPolicyKind __Pyx_PyInt_As_ChannelGetActionWhenMonitorPolicyKind(PyObject *x) { + const ChannelGetActionWhenMonitorPolicyKind neg_one = (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)) + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(ChannelGetActionWhenMonitorPolicyKind, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { + const unsigned int neg_one = (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); + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) { + const unsigned long neg_one = (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); + } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(unsigned long) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (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); + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (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); + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) { + const unsigned short neg_one = (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); + } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(unsigned short) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_chtype(chtype value) { + const chtype neg_one = (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); + } else if (sizeof(chtype) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(chtype) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(chtype) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(chtype), + little, !is_unsigned); + } +} + +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (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)) + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { + const short neg_one = (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); + } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(short) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(short), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetCacheWaitPolicyKind(ChannelGetCacheWaitPolicyKind value) { + const ChannelGetCacheWaitPolicyKind neg_one = (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); + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelGetCacheWaitPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelGetCacheWaitPolicyKind), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ChannelGetActionWhenMonitorPolicyKind(ChannelGetActionWhenMonitorPolicyKind value) { + const ChannelGetActionWhenMonitorPolicyKind neg_one = (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); + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(ChannelGetActionWhenMonitorPolicyKind) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(ChannelGetActionWhenMonitorPolicyKind), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CAFE_CFT_STATE(CAFE_CFT_STATE value) { + const CAFE_CFT_STATE neg_one = (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); + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(CAFE_CFT_STATE) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(CAFE_CFT_STATE) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int16(npy_int16 value) { + const npy_int16 neg_one = (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); + } else if (sizeof(npy_int16) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(npy_int16) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int16) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *x) { + const npy_int16 neg_one = (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)) + } else if (sizeof(npy_int16) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(npy_int16) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(npy_int16, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static 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 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; +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value) { + const npy_int32 neg_one = (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); + } else if (sizeof(npy_int32) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(npy_int32) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(npy_int32) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static PyObject *__pyx_memview_get_int(const char *itemp) { + return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp); +} +static 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; +} + +static PyObject *__pyx_memview_get_float(const char *itemp) { + return (PyObject *) PyFloat_FromDouble(*(float *) itemp); +} +static 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; +} + +static PyObject *__pyx_memview_get_double(const char *itemp) { + return (PyObject *) PyFloat_FromDouble(*(double *) itemp); +} +static 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; +} + +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { + const size_t neg_one = (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)) + } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_dbr_long_t(dbr_long_t value) { + const dbr_long_t neg_one = (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); + } else if (sizeof(dbr_long_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(dbr_long_t) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(dbr_long_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value) { + const unsigned char neg_one = (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); + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(unsigned char) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +static CYTHON_INLINE dbr_long_t __Pyx_PyInt_As_dbr_long_t(PyObject *x) { + const dbr_long_t neg_one = (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)) + } 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)) + } + } 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) 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)) + } else if (sizeof(dbr_long_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_long_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) { + const short neg_one = (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)) + } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(short, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *x) { + const unsigned short neg_one = (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)) + } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned short, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE dbr_char_t __Pyx_PyInt_As_dbr_char_t(PyObject *x) { + const dbr_char_t neg_one = (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)) + } 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)) + } + } 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) 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)) + } else if (sizeof(dbr_char_t) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(dbr_char_t, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) { + const PY_LONG_LONG neg_one = (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)) + } 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)) + } + } 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) 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)) + } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) { + const unsigned char neg_one = (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)) + } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +#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 + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eqf(__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_sumf(__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_difff(__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_prodf(__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; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__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_zerof(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__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_absf(__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_powf(__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_prodf(a, a); + return __Pyx_c_prodf(a, a); + case 3: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(z, a); + case 4: + z = __Pyx_c_prodf(a, a); + return __Pyx_c_prodf(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } + r = a.real; + theta = 0; + } else { + r = __Pyx_c_absf(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 + +#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 + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq(__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(__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(__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(__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; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__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(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__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(__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(__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(a, a); + return __Pyx_c_prod(a, a); + case 3: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(z, a); + case 4: + z = __Pyx_c_prod(a, a); + return __Pyx_c_prod(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } + r = a.real; + theta = 0; + } else { + r = __Pyx_c_abs(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 + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { + const enum NPY_TYPES neg_one = (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); + } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); + } + } else { + if (sizeof(enum NPY_TYPES) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); + } + } + { + 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); + } +} + +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; +} + +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); +} + +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; +} + +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; +} + +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { + const char neg_one = (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)) + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) + } + } 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) 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)) + } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) + } + } + { +#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_Int(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_Int(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; +} + +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; +} + +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; +} + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn___pyx_t_5numpy_int16_t(PyObject *obj) { + __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 | PyBUF_WRITABLE), 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; +} + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *obj) { + __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 | PyBUF_WRITABLE), 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; +} + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *obj) { + __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 | PyBUF_WRITABLE), 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; +} + +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *obj) { + __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 | PyBUF_WRITABLE), 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; +} + +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; +} + +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; +#if PY_VERSION_HEX >= 0x02070000 + cobj = PyCapsule_New(tmp.p, sig, 0); +#else + cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); +#endif + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +#ifndef __PYX_HAVE_RT_ImportModule +#define __PYX_HAVE_RT_ImportModule +static PyObject *__Pyx_ImportModule(const char *name) { + PyObject *py_name = 0; + PyObject *py_module = 0; + py_name = __Pyx_PyIdentifier_FromString(name); + if (!py_name) + goto bad; + py_module = PyImport_Import(py_name); + Py_DECREF(py_name); + return py_module; +bad: + Py_XDECREF(py_name); + return 0; +} +#endif + +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, + size_t size, int strict) +{ + PyObject *py_module = 0; + PyObject *result = 0; + PyObject *py_name = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + py_module = __Pyx_ImportModule(module_name); + if (!py_module) + goto bad; + py_name = __Pyx_PyIdentifier_FromString(class_name); + if (!py_name) + goto bad; + result = PyObject_GetAttr(py_module, py_name); + Py_DECREF(py_name); + py_name = 0; + Py_DECREF(py_module); + py_module = 0; + 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 (!strict && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility", + module_name, class_name); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + else if ((size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s has the wrong size, try recompiling", + module_name, class_name); + goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(py_module); + Py_XDECREF(result); + return NULL; +} +#endif + +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; + ++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 char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if CYTHON_COMPILING_IN_CPYTHON && (__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)) { +#if PY_VERSION_HEX < 0x03030000 + 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 + if (__Pyx_PyUnicode_READY(o) == -1) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (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 + } 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 PyObject* __Pyx_PyNumber_Int(PyObject* x) { + PyNumberMethods *m; + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (PyInt_Check(x) || PyLong_Check(x)) +#else + if (PyLong_Check(x)) +#endif + return __Pyx_NewRef(x); + m = Py_TYPE(x)->tp_as_number; +#if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = PyNumber_Long(x); + } +#else + if (m && m->nb_int) { + name = "int"; + res = PyNumber_Long(x); + } +#endif + if (res) { +#if PY_MAJOR_VERSION < 3 + if (!PyInt_Check(res) && !PyLong_Check(res)) { +#else + if (!PyLong_Check(res)) { +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + name, name, Py_TYPE(res)->tp_name); + Py_DECREF(res); + return NULL; + } + } + 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(x); + } +#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_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/src/cafe.cpp b/src/cafe.cpp new file mode 100644 index 0000000..bfb480a --- /dev/null +++ b/src/cafe.cpp @@ -0,0 +1,3919 @@ +/// +/// \file cafe.cc +/// \author Jan Chrin, PSI +/// \date Release: June, 2015 +/// \version CAFE 1.0.0 +/// +/// Copyright 2014, Jan Chrin, PSI +/// +/// This program is free software: it may be redistributed and modifified +/// under the terms of the GNU General Public License as published by +/// the Free Software Foundation, under License version 3 or later. +/// +/// This program is distributed in the hope that it will be useful, +/// but WITHOUT ANY WARRANTY; without even the implied warranty of +/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +/// GNU General Public License for more details. +/// +/// The GNU General Public License can be gotten from +/// http://www.gnu.org/licenses/. +/// + +#include "cafe.h" +#include "conduitGroup.h" +#include + +bool MUTEX=true; +bool CHECK_CONSISTENCY_CA_STATE=true; + +epicsMutex cafeMutex; + +cafeConduit_set cs; +cafeGroup_set gs; + +vector PVGroupV; +vector PVGroupPseudo; +vector deviceCollectionV; + +vector globalChannelList; + +map, string> groupPseudoMap; + + +#include "cafeEnum.h" +#include "enumStrings.h" + + +/** + * \brief Set an array of handles with long long(s) + * \param handleArray input: array of handles + * \param nelem input: number of elements defining size of array + * \param _val input: array of long longs + * \param statusArray output: array of corresponding status + * \return ECA_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::set(const unsigned int *handleArray, const unsigned int nelem, const long long * _val, int *statusArray) { + //what is the highest native type? + chtype chtMax=DBF_CHAR; + + ChannelRegalia channelInfo; + unsigned short nbyteChType=1; + unsigned short nbyteMax=nbyteChType; + + for (unsigned int i=0; inbyteMax && channelInfo.getDataType()< CAFE_NO_ACCESS) { + chtMax=channelInfo.getDataType(); + nbyteMax=4; + } + + } + } + + int _status=ICAFE_NORMAL; + + if ( chtMax == DBF_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nelem]; + for (unsigned int i=0; i < nelem; ++i) { + std::stringstream ss; + ss.clear(); + ss << _val[i]; + strcpy(_sVal[i] , ss.str().c_str()); + } + _status=CAFE::set (handleArray, nelem, _sVal, statusArray); + + delete [] _sVal; + } + else if ( chtMax == DBF_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nelem]; + for (unsigned int i=0; i < nelem; ++i) { + _dVal[i] = (double) _val[i]; + } + _status=CAFE::set (handleArray, nelem, _dVal, statusArray); + + delete [] _dVal; + } + else if ( chtMax == DBF_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nelem]; + for (unsigned int i=0; i < nelem; ++i) { + _fVal[i] = (float) _val[i]; + } + _status=CAFE::set (handleArray, nelem, _fVal, statusArray); + + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nelem]; + for (unsigned int i=0; i < nelem; ++i) { + _lVal[i] = (dbr_long_t) _val[i]; + } + _status=CAFE::set (handleArray, nelem, _lVal, statusArray); + + delete [] _lVal; + } + return _status; + + +} + +//5+ long long +/** + * Get long long(s), alarms and timeStamp + * \param handle input: handle to conduit object + * \param _val output: array of long longs + * \param alarmStatus output: alarm status + * \param alarmSeverity output: alarm Severity + * \param ts output: epicsTimeStamp + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::get(const unsigned int handle, long long * _val, \ + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { +#define __METHOD__ \ + "CAFE::get(const unsigned int handle, long long * _val, \ + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)" + + ChannelRegalia channelInfo; + CAFE::getChannelInfo(handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + status=ICAFE_NORMAL; + unsigned int nn=handleHelper.getNelemNative(handle); + + + if ( channelInfo.getDataType() == DBR_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nn]; + status=cafeSoluble.get (handle, DBR_TIME_STRING, _sVal, alarmStatus, alarmSeverity, ts); + if (status!=ICAFE_NORMAL) { delete [] _sVal; return status;} + istringstream ss; + + for (unsigned short i=0; i>l; + + if ( !ss.fail()) { + _val[i] = (long long) l; + std::string strInput=_sVal[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << nn << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << _sVal[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << "Returning value 0 for element " << i << endl; + _val[i]=0; + } + } + + delete [] _sVal; + } + + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nn]; + status=cafeDoppio.get (handle, DBR_TIME_DOUBLE, _dVal, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _dVal[i]; + } + delete [] _dVal; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nn]; + status=cafeFrappuccino.get (handle, DBR_TIME_FLOAT, _fVal, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _fVal[i]; + } + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nn]; + status=cafeLatte.get (handle, DBR_TIME_LONG, _lVal, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _lVal[i]; + } + delete [] _lVal; + } + return status; +#undef __METHOD__ +}; + +/** + * Get long long(s) and alarms + * \param handle input: handle to conduit object + * \param _val output: array of long longs + * \param alarmStatus output: alarm Status + * \param alarmSeverity output: alarm Severity + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::get(const unsigned int handle, long long * _val, \ + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { +#define __METHOD__ \ +"CAFE::get(unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)" + ChannelRegalia channelInfo; + CAFE::getChannelInfo(handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + int _status=ICAFE_NORMAL; + unsigned int nn=handleHelper.getNelemNative(handle); + + + if ( channelInfo.getDataType() == DBR_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nn]; + _status=cafeSoluble.get (handle, DBR_STS_STRING, _sVal, alarmStatus, alarmSeverity); + if (_status!=ICAFE_NORMAL) { delete [] _sVal; return _status;} + istringstream ss; + + for (unsigned short i=0; i>l; + + if ( !ss.fail()) { + _val[i] = (long long) l; + std::string strInput=_sVal[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << nn << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << _sVal[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << "Returning value 0 for element " << i << endl; + _val[i]=0; + } + } + + delete [] _sVal; + } + + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nn]; + _status=cafeDoppio.get (handle, DBR_STS_DOUBLE, _dVal, alarmStatus, alarmSeverity); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _dVal[i]; + } + delete [] _dVal; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nn]; + _status=cafeFrappuccino.get (handle, DBR_STS_FLOAT, _fVal, alarmStatus, alarmSeverity); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _fVal[i]; + } + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nn]; + _status=cafeLatte.get (handle, DBR_STS_LONG, _lVal, alarmStatus, alarmSeverity); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _lVal[i]; + } + delete [] _lVal; + } + return _status; + #undef __METHOD__ +}; + +/** + * Get long long(s) + * \param handle input: handle + * \param _val output: array of long longs + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::get(const unsigned int handle, long long * _val){ +#define __METHOD__ \ + "CAFE::get(const unsigned int handle, long long * _val)" + + ChannelRegalia channelInfo; + CAFE::getChannelInfo(handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + int _status=ICAFE_NORMAL; + unsigned int nn=handleHelper.getNelemNative(handle); + + if ( channelInfo.getDataType() == DBR_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nn]; + _status=cafeSoluble.get (handle, DBR_STRING, _sVal); + if (_status!=ICAFE_NORMAL) { delete [] _sVal; return _status;} + istringstream ss; + + for (unsigned short i=0; i>l; + + if ( !ss.fail()) { + _val[i] = (long long) l; + std::string strInput=_sVal[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << nn << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << _sVal[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << "Returning value 0 for element " << i << endl; + _val[i]=0; + } + } + + delete [] _sVal; + } + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nn]; + _status=cafeDoppio.get (handle, DBR_DOUBLE, _dVal); + if (_status!=ICAFE_NORMAL) { delete [] _dVal; return _status;} + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _dVal[i]; + } + delete [] _dVal; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nn]; + _status=cafeFrappuccino.get (handle, DBR_FLOAT, _fVal); + if (_status!=ICAFE_NORMAL) { delete [] _fVal; return _status;} + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _fVal[i]; + } + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nn]; + _status=cafeLatte.get (handle, DBR_LONG, _lVal); + if (_status!=ICAFE_NORMAL) { delete [] _lVal; return _status;} + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _lVal[i]; + } + delete [] _lVal; + } + return _status; + +#undef __METHOD__ +}; + + + +/** + * Sends ca_get message to IOC and returns without waiting, i.e. non-blocking \n + * To be followed by a getCache method + * \param handle input: handle to conduit object + * \return ICAFE_NORMAL if all OK else ICAFE_WAITING_FOR_PREV_CALLBACK or other; + */ +int CAFE::get(const unsigned int handle) { +#define __METHOD__ "CAFE::get(unsigned int handle)" + + status=ICAFE_NORMAL; + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + chtype dbrtype= (*it_handle).getChannelRequestMetaDataClient().getDbrDataType(); + + //Find Native DataType + if ( (status=cafeGranules.channelVerifyGet(handle, dbrtype)) + != ICAFE_NORMAL) { + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}//unlock + cout << __METHOD__ << "//" << __LINE__ + << " for handle/pv=" << handle <<"/" << (*it_handle).getPV() < (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + + //Use Native DataType + if ( (status=cafeGranules.channelVerifyGetCtrl(handle, + dbf_type_to_DBR_CTRL((*it_handle).getChannelRegalia().getDataType()))) + != ICAFE_NORMAL) { + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}; //unlock + cout << __METHOD__ << "//" << __LINE__ + << " for handle/pv=" << handle <<"/" << (*it_handle).getPV() < (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + if ( (*it_handle).getChannelGetActionWhenMonitorPolicy().getActionKind() == CAFENUM::GET_FROM_CACHE) { + if ( handleHelper.getNmonitorData(handle) >0){ + + bool doGetCache=true; + + vector mpV; + handleHelper.getMonitorPolicyVector(handle, mpV); + //loop + for (unsigned int n=0; n (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) { + return cafeGranules.waitForGetEvent(handle, (*it_handle).getChannelTimeoutPolicyGet().getTimeout()); + } + else {return ECAFE_INVALID_HANDLE;} +}; + + + + + +/** + * Waits until all handle callbacks have reported or timed out + * \param handleV input: Vector of handles to Conduit objects + * \param vRB output: vector of Bundled responses (reporting whether callback was completed) + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::waitForBundledEvents(vector handleV, vector &vRB){ +#define __METHOD__ \ +"int CAFE::waitForBundledEvents(vector handleV, vector vRB) " + +return waitForBundledEvents(&handleV[0], handleV.size(), vRB); + +/* + int statusBundle=ICAFE_NORMAL; + + map bundleResponse; + map::iterator pos; + + unsigned int nHandles=handleV.size(); + vRB.clear(); + vRB.reserve(nHandles); + + std::set uniqueHandles; + std::set::iterator uniquePos; + + //std::vector handleArrayV(handleV); + + + //Remove duplicate handles + for (unsigned int i=0; isecond); + //cout << "handle " << pos->first << " status " << pos->second << " [" << i << "] "<< endl; + if(pos->second != ICAFE_NORMAL) { + cout << resetCallbackGet(pos->first) << endl; + } + } + } + + //for (unsigned int i=0; i vRB) " + int statusBundle=ICAFE_NORMAL; + + map bundleResponse; + map::iterator pos; + + vRB.clear(); + vRB.reserve(nHandles); + + std::vector handleArrayV; + handleArrayV.reserve(nHandles); + handleArrayV.insert(handleArrayV.end(), &handleArray[0], &handleArray[nHandles]); + + std::set uniqueHandles; + std::set::iterator uniquePos; + + + //Remove duplicate handles + for (unsigned int i=0; isecond); + if(pos->second != ICAFE_NORMAL) { + cout << resetCallbackGet(pos->first) << endl; + } + } + } + + //for (unsigned int i=0; i0) { + vector mpV; + handleHelper.getMonitorPolicyVector(handleArray[i], mpV); + //loop + for (unsigned int n=0; n " << pos->second << endl; + //} + + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + channelRequestMetaCtrlClient= (*it_handle).getChannelRequestMetaCtrlClient(); + + if (pvc.getNelem() != channelRequestMetaCtrlClient.getNelem()) { + channelRequestMetaCtrlClient.setNelem(pvc.getNelem()); + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaCtrlClient(channelRequestMetaCtrlClient)); + if(MUTEX){cafeMutex.unlock();} //unlock + } + + //Use Native DataType + if ( (status=cafeGranules.channelVerifyGetCtrl(handle, + dbf_type_to_DBR_CTRL((*it_handle).getChannelRegalia().getDataType()))) + != ICAFE_NORMAL) { + (*it_handle).getPVCtrlHolder(pvc); + pvc.status=status; + return status; + } + if ( (status=cafeGranules.channelPrepareGetCtrl(handle)) != ICAFE_NORMAL) { + (*it_handle).getPVCtrlHolder(pvc); + pvc.status=status; + return status; + } + if ( (status=cafeGranules.channelExecuteGetCtrl(handle)) != ICAFE_NORMAL) { + (*it_handle).getPVCtrlHolder(pvc); + pvc.status=status; + return status; + } + (*it_handle).getPVCtrlHolder(pvc); + + handleHelper.setNelemToRetrieveFromCtrlCache(handle,pvc.nelem); + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + pvc.status=ECAFE_INVALID_HANDLE; + } + return ECAFE_INVALID_HANDLE; + } + + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}; //unlock + + return status; +#undef __METHOD__ +}; + +/** + * Retrieves data, packaged into an array of PVCtrlHolder class' + * \param handleArray input: Array of handles to Conduit object + * \param nelem input: No of array elements + * \param pvcArray output: Array of PVCtrlHolder + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::getCtrl(const unsigned int * handleArray, unsigned int nelem, \ + PVCtrlHolder * pvcArray) { +#define __METHOD__ \ +"CAFE::getCtrl(unsigned int * handleArray, unsigned int nelem, PVCtrlHolder * pvcArray)" + + int overallStatus=ICAFE_NORMAL; bool isGood=true; + for (unsigned int i=0; i &statusV) { + int overallStatus=ICAFE_NORMAL; + bool isGood=true; + + statusV.clear(); + statusV.reserve(nHandles); + + for (unsigned int i=0; i0) { + statusV.push_back(ICAFE_NORMAL); //ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE); + } + else { + statusV.push_back(get(handleArray[i])); + } + if ( (statusV[i] != ICAFE_NORMAL) && isGood) { + overallStatus=statusV[i]; + isGood=false; + } + } + //ca_flush_io(); + return overallStatus; // report first failure in return statement +} + + +/** + * Sends ca_get messages to IOC and waits until the end before flushing.\n + * To be followed by a getCache method + * \param handleArray input: Array of handles to conduit object + * \param nelem input: Size of array + * \param statusArray output: Status array reporting from each get(handle) + * \return overallStatus ICAFE_NORMAL if all OK else the first ECAFE error encountered + */ +int CAFE::get(const unsigned int *handleArray, unsigned int nelem, \ + int *statusArray) { +#define __METHOD__ "CAFE::get(unsigned int * handleArray, unsigned int nelem)" + int overallStatus=ICAFE_NORMAL; bool isGood=true; + for (unsigned int i=0; i0) { + statusArray[i]=ICAFE_NORMAL; //ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE; + } + else { + statusArray[i]=get(handleArray[i]); + } + + if ( (statusArray[i] != ICAFE_NORMAL) && isGood) { + overallStatus=statusArray[i]; + isGood=false; + } + } + // flush now! + //ca_flush_io(); //flush in get + + return overallStatus; // report first failure in return statement +#undef __METHOD__ +}; + + + +/** + * Sets data as packaged in the PVDataHolder class + * \param pv input: pv name + * \param pvd in/output: PVDataHolder + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, PVDataHolder & pvd) { +#define __METHOD__ "CAFE::set(const char *, PVDataHolder & pvd)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) {status= CAFE::set(handle, pvd);} + return status; +#undef __METHOD__ +} + + + +/** + * Sets data as packaged in the PVDataHolder class + * \param handle input: handle to Conduit object + * \param pvd input/output: PVDataHolder containing data + * \return ICAFE_NORMAL if all OK + */ +int CAFE::set(const unsigned int handle, PVDataHolder & pvd) { +#define __METHOD__ "CAFE::set(unsigned int handle, PVDataHolder & pvd)" + + status=ICAFE_NORMAL; + + bool changeNelemFlag=false; + unsigned int nelemPrevious=1; + + pvd.alarmStatus=-1; + pvd.alarmSeverity=-1; + pvd.ts.secPastEpoch=0; + pvd.ts.nsec=0; + pvd.status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + + channelRequestMetaDataClient= (*it_handle).getChannelRequestMetaDataClient(); + + //cout << __METHOD__ << " pvd.getNelem() " << pvd.getNelem() << endl; + //cout << " channelRequestMetaDataClient.getNelem() " << channelRequestMetaDataClient.getNelem() << endl; + //cout << " channelRequestMetaDataClient.getOffset() " << channelRequestMetaDataClient.getOffset() << endl; + + if (pvd.getNelem() != + (channelRequestMetaDataClient.getNelem() - channelRequestMetaDataClient.getOffset() )) { + + nelemPrevious=channelRequestMetaDataClient.getNelem(); + + //Do NOT*** add offset to this! + //This will extend the buffer to beyond the alloted size. Offsets are for READ only! + channelRequestMetaDataClient.setNelem(pvd.getNelem()); // +channelRequestMetaDataClient.getOffset()); No offset as this is for put!!! + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaDataClient(channelRequestMetaDataClient)); + if(MUTEX){cafeMutex.unlock();} //unlock + changeNelemFlag=true; + } + + + bool soFarSoGood=true; + + //Find Native DataType + if ( soFarSoGood && (status=cafeGranules.channelVerifyPut(handle, pvd.dataType)) + != ICAFE_NORMAL) { + pvd.status=status; + soFarSoGood=false; + } + if ( soFarSoGood && (status=cafeGranules.channelPreparePut(handle)) != ICAFE_NORMAL) { + pvd.status=status; + soFarSoGood=false; + } + + if (!soFarSoGood) { + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}; //unlock + + if(changeNelemFlag) { + channelRequestMetaDataClient.setNelem(nelemPrevious); //handleHelper.getNelemNative(handle)); + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaDataClient(channelRequestMetaDataClient)); + if(MUTEX){cafeMutex.unlock();} //unlock + } + return status; + } + + + pvd.dbrDataType= + ((*it_handle).getChannelRequestMetaPrimitive().getDbrDataType()); + + switch ((*it_handle).getChannelRequestMetaPrimitive().getDbrDataType()) { + + case DBR_STRING: + status=renderString.putString(handle, pvd.val.get()); + break; + case DBR_SHORT: + status=renderShort.put(handle, pvd.val.get(), pvd.dataType); + break; + case DBR_FLOAT: + status=renderFloat.put(handle, pvd.val.get(), pvd.dataType); + break; + case DBR_ENUM: + status=renderEnum.put (handle, pvd.val.get(), pvd.dataType); + break; + case DBR_CHAR: + status=renderChar.put (handle, pvd.val.get(), pvd.dataType); + break; + case DBR_LONG: + status=renderLong.put (handle, pvd.val.get(), pvd.dataType); + break; + case DBR_DOUBLE: + status=renderDouble.put(handle, pvd.val.get(), pvd.dataType); + break; + default: + cout << "ERROR: " << __FILE__ << "//" << __LINE__ << "//" + << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_SWITCH_CASE); + cout << "SWITCH STATMENT NOT MEANT FOR CAFE DATATYPE=" << + pvd.dataType < (); + cafeConduit_set_by_handle::iterator it_handle; + + + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) { + + unsigned int c=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + unsigned int n=(*it_handle).getChannelRegalia().getNelem(); + + //cout << "c: " << c << " n: " << n << endl; + + dbr_char_t * val = new dbr_char_t[min(c,n)]; + //dbr_char_t * val = new dbr_char_t[n]; + status=cafeCappuccino.get(handle, DBR_CHAR, val); + psWF = ""; + + chtype cdt; + handleHelper.getDataTypeNative(handle, cdt); + + + unsigned int r=(*it_handle).getChannelRequestMetaData().getNelem(); + + if (cdt==DBR_CHAR) { + + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) { + + unsigned int c=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + + unsigned int n=(*it_handle).getChannelRegalia().getNelem(); + + + unsigned int r =min( (*it_handle).getChannelRequestMetaData().getNelemCache(), + ((*it_handle).getChannelRequestMetaData().getNelem()-(*it_handle).getChannelRequestMetaData().getOffset()) ) ; + + + //cout << "Cache c: " << c << " r: " << r << " n: " << n << endl; + + dbr_char_t * val = new dbr_char_t[min(r,n)]; + //dbr_char_t * val = new dbr_char_t[n]; + status=cafeCappuccino.getCache(handle, DBR_CHAR, val); + psWF = ""; + + chtype cdt; + handleHelper.getDataTypeNative(handle, cdt); + + //unsigned int r=(*it_handle).getChannelRequestMetaData().getNelem(); + //r=(*it_handle).getNelemToRetrieveFromCache(); + + + if (cdt==DBR_CHAR) { + + for (unsigned int i=0; i1) { + nelemRequestedCheck = handleHelper.setNelemToRetrieveFromCache(handle,nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + return nelemPrevious; +#undef __METHOD__ +} +/** + * Helper function to methods calling scalars + * Sets number of elements to retrieve from cache to the "previous" number + * \param handle input: handle to Conduit object + * \param nelemPrevious input: nelem to set + * \return nelements actually set (should equal nelemPrevious) + */ +unsigned int CAFE::setNelemToRetrieveFromCacheToPrevious(const unsigned int handle, \ + unsigned int nelemPrevious) { +#define __METHOD__ \ +"int CAFE::setNelemToRetrieveFromCacheToPrevious(unsigned int handle, unsigned int nelemPrevious)" + unsigned int nelemPreviousCheck=0; + unsigned int nelemRequested=1; + //Switch back to previous value + if (nelemPrevious>0) { + nelemPreviousCheck= handleHelper.setNelemToRetrieveFromCache(handle,nelemPrevious); + if (nelemPreviousCheck != nelemPrevious) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to re-set the no. elements from: " + << nelemRequested << endl; + cout << "to the previous: " << nelemPrevious << " but got instead: " + << nelemPreviousCheck << endl; + } + } + return nelemPreviousCheck; +#undef __METHOD__ +} +/** + * Helper function to methods calling scalars + * Sets number of elements to one + * \param handle input: handle to Conduit object + * \return nelements previous to the set + */ +unsigned int CAFE::setNelemToOne(const unsigned int handle) { +#define __METHOD__ "int CAFE::setNelemToOne(const unsigned int handle)" + unsigned int nelemPrevious, nelemRequestedCheck=0; + unsigned int nelemRequested=1; + nelemPrevious=handleHelper.getNelemClient(handle); + + //Check the number of elements requested? + if (nelemPrevious>1) { + nelemRequestedCheck = handleHelper.setNelem(handle,nelemRequested); + if (nelemRequestedCheck != nelemRequested) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to set the no. elements from: " + << nelemPrevious << endl; + cout << "to: " << nelemRequested << " but got instead: " + << nelemRequestedCheck << endl; + } + } + return nelemPrevious; +#undef __METHOD__ +} +/** + * \brief Helper function to methods calling scalars + * Sets number of elements to the "previous" number + * \param handle input: handle to Conduit object + * \param nelemPrevious input: nelem to set + * \return nelements actually set (should equal nelemPrevious) + */ +unsigned int CAFE::setNelemToPrevious(const unsigned int handle, \ + unsigned int nelemPrevious) { +#define __METHOD__ \ + "int CAFE::setNelemToPrevious(unsigned int handle, unsigned int nelemPrevious)" + unsigned int nelemPreviousCheck=nelemPrevious; + unsigned int nelemRequested=1; + + //Switch back to previous value + //if (nelemPrevious>1) { + //Apr 2015: Change from getNelemRequest(handle) to getNelemClient + //This is because nelemClient(handle) also used by set methods! + if(handleHelper.getNelemClient(handle)!= nelemPrevious) { + nelemPreviousCheck= handleHelper.setNelem(handle,nelemPrevious); + if (nelemPreviousCheck != nelemPrevious) { + if (nelemPreviousCheck != handleHelper.getNelemNative(handle)) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Internal CAFE FUNNY: Wanted to re-set the no. elements from: " + << nelemRequested << endl; + cout << "to the previous: " << nelemPrevious << " but got instead: " + << nelemPreviousCheck << endl; + cout << "No of native elements is " << handleHelper.getNelemNative(handle) << endl; + } + } + } + return nelemPreviousCheck; +#undef __METHOD__ +} + + +/** + * Set long long + * \param handle input: handle to Conduit object + * \param val input: array of double + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(unsigned int handle, const long long * val) { //5+ long long +#define __METHOD__ \ + "CAFE::set(unsigned int handle, const long long * _val)" + + ChannelRegalia channelInfo; + CAFE::getChannelInfo(handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + int _status=ICAFE_NORMAL; + unsigned int nn=handleHelper.getNelemNative(handle); + + if ( channelInfo.getDataType() == DBR_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nn]; + + //Convert long long to string; + for (unsigned int i=0; i < handleHelper.getNelemClient(handle); ++i) { + std::stringstream ss; + ss.clear(); + ss << val[i]; + strcpy(_sVal[i] , ss.str().c_str()); + } + _status=cafeSoluble.set (handle, DBR_STRING, _sVal); + + delete [] _sVal; + } + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nn]; + for (unsigned int i=0; i < handleHelper.getNelemClient(handle); ++i) { + _dVal[i] = (double) val[i]; + } + _status=cafeDoppio.set (handle, DBR_DOUBLE, _dVal); + + delete [] _dVal; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nn]; + for (unsigned int i=0; i < handleHelper.getNelemClient(handle); ++i) { + _fVal[i] = (float) val[i]; + } + _status=cafeFrappuccino.set (handle, DBR_FLOAT, _fVal); + + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nn]; + for (unsigned int i=0; i < handleHelper.getNelemClient(handle); ++i) { + _lVal[i] = (dbr_long_t) val[i]; + } + _status=cafeLatte.set (handle, DBR_LONG, _lVal); + + delete [] _lVal; + } + return _status; +#undef __METHOD__ +} + +/** + * Set double(s) + * \param pv input: pv name + * \param val input: array of double + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_double_t * val) { //6 +#define __METHOD__ "CAFE::set(const char *, dbr_double_t * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::cafeDoppio.set((const unsigned int) handle, DBR_DOUBLE, val);} + return status; +#undef __METHOD__ +} +/** + * Set long long(s) + * \param pv input: pv name + * \param val input: array of long long + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const long long * val) { //5+ long long +#define __METHOD__ "CAFE::set(const char *, long long * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::set((const unsigned int) handle, val);} + return status; +#undef __METHOD__ +} +/** + * Set dbr_long_t(s) + * \param pv input: pv name + * \param val input: array of dbr_long_t + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_long_t * val) { //5 +#define __METHOD__ "CAFE::set(const char *, dbr_long_t * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::cafeLatte.set((const unsigned int) handle, DBR_LONG, val);} + return status; +#undef __METHOD__ +} +/** + * Set unsigned char(s) + * \param pv input: pv name + * \param val input: array of dbr_char_t (unsigned char) + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_char_t * val) { //4 +#define __METHOD__ "CAFE::set(const char *, dbr_char_t * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::cafeCappuccino.set((const unsigned int) handle, DBR_CHAR, val);} + return status; +#undef __METHOD__ +} +/** + * Set dbr_enum_t(s) + * \param pv input: pv name + * \param val input: array ofdbr_enum_t (unsigned short) + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_enum_t * val) { //3 +#define __METHOD__ "CAFE::set(const char *, dbr_enum_t * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::cafeEspresso.set((const unsigned int) handle, DBR_ENUM, val);} + return status; +#undef __METHOD__ +} +/** + * Set float(s) + * \param pv input: pv name + * \param val input: array of float + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_float_t * val) { //2 +#define __METHOD__ "CAFE::set(const char *, dbr_float_t * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::cafeFrappuccino.set((const unsigned int) handle, DBR_FLOAT, val);} + return status; +#undef __METHOD__ +} +/** + * Set short(s) + * \param pv input: pv name + * \param val input: array of dbr_short_t (signed short) + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_short_t * val) { //1 +#define __METHOD__ "CAFE::set(const char *, dbr_short_t * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::cafeSchale.set((const unsigned int) handle, DBR_SHORT, val);} + return status; +#undef __METHOD__ +} +/** + * Set dbr_string_t(s) + * \param pv input: pv name + * \param val input: array of dbr_string_t (char[40]) + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_string_t * val) { //0 +#define __METHOD__ "CAFE::set(const char *, dbr_string_t * val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { + status=CAFE::cafeSoluble.set((const unsigned int) handle, DBR_STRING, val);} + return status; +#undef __METHOD__ +} +/** + * Set dbr_double_t + * \param pv input: pv name + * \param _val input: dbr_double_t + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_double_t _val) { //6 +#define __METHOD__ "CAFE::set(const char *, dbr_double_t val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_double_t val[1]; val[0]= _val; + status=CAFE::cafeDoppio.set((const unsigned int) handle, DBR_DOUBLE, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} +/** + * Set long long + * \param pv input: pv name + * \param _val input:long long + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const long long _val) { //5+ long long +#define __METHOD__ "CAFE::set(const char *, long long val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_long_t val[1]; val[0]= _val; + status=CAFE::set((const unsigned int) handle, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} +/** + * Set dbr_long_t + * \param pv input: pv name + * \param _val input: dbr_long_t + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_long_t _val) { //5 +#define __METHOD__ "CAFE::set(const char *, dbr_long_t val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_long_t val[1]; val[0]= _val; + status=CAFE::cafeLatte.set((const unsigned int) handle, DBR_LONG, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} +/** + * Set dbr_char_t (unsigned char) + * \param pv input: pv name + * \param _val input: dbr_char_t + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_char_t _val) { //34 +#define __METHOD__ "CAFE::set(const char *, dbr_char_t val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_char_t val[1]; val[0]= _val; + status=CAFE::cafeCappuccino.set((const unsigned int) handle, DBR_CHAR, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} +/** + * Set dbr_enum_t (unsigned short) + * \param pv input: pv name + * \param _val input: dbr_enum_t + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_enum_t _val) { //3 +#define __METHOD__ "CAFE::set(const char *, dbr_enum_t val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_enum_t val[1]; val[0]= _val; + status=CAFE::cafeEspresso.set((const unsigned int) handle, DBR_ENUM, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} +/** + * Set dbr_float_t + * \param pv input: pv name + * \param _val input: dbr_float_t + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_float_t _val) { //1 +#define __METHOD__ "CAFE::set(const char *, dbr_float_t val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_float_t val[1]; val[0]= _val; + status=CAFE::cafeFrappuccino.set((const unsigned int) handle, DBR_FLOAT, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} +/** + * Set dbr_short_t + * \param pv input: pv name + * \param _val input: dbr_short_t + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_short_t _val) { //0 +#define __METHOD__ "CAFE::set(const char *, dbr_short_t val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_short_t val[1]; val[0]= _val; + status=CAFE::cafeSchale.set((const unsigned int) handle, DBR_SHORT, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} +/** + * Set dbr_string_t + * \param pv input: pv name + * \param _val input: dbr_string_t (char[40]) + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::set(const char * pv, const dbr_string_t _val) { //0 +#define __METHOD__ "CAFE::set(const char *, dbr_string_t val)" + unsigned int handle; status=ICAFE_NORMAL; + try {status = open(pv, handle);} + catch (CAFEException_open & e) {return e.pvEx.statusCode;} + if (status == ICAFE_NORMAL) { unsigned int nelemPrevious=CAFE::setNelemToOne(handle); + dbr_string_t val[1]; sprintf(val[0],"%s", _val); + status=CAFE::cafeSoluble.set((const unsigned int) handle, DBR_STRING, val); + CAFE::setNelemToPrevious(handle, nelemPrevious); + } + return status; +#undef __METHOD__ +} + +/** + * waitForPut + * \param h input: Array of hanldes + * \param nelem input:No of elements in Array + * \return ECA_NORMAL if all OK else ECAFE error + */ +int CAFE::waitForPut(const unsigned int *h, const unsigned int nelem) { + + ca_flush_io(); + status=ICAFE_NORMAL; bool isGood=true; + int overallStatus=status; + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + ChannelTimeoutPolicy channelTimeoutPolicyPut; + for (unsigned int i=0; i reporting from: void CAFE::loadSFGroups(string suff) <--- " << endl; + + //Test for file directory + string fName=""; + char * p= NULL; + char const* d = "OMC.py"; + + bool isFile=false; + ifstream ifile; + + + if(std::getenv("SFEL_LAYOUT_PYTHONPATH") == NULL){ + cout << "SFEL_LAYOUT_PYTHONPATH is not defined, thus may be missing from PYTHONPATH" << endl; + //putenv((char *) "SFEL_LAYOUT_PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/scripts/VA"); + //putenv((char *) "PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/scripts/VA"); + } + + + //if(std::getenv("PYTHONPATH") != NULL){ + // char * pp= std::getenv("PYTHONPATH"); + // cout << "PYTHONPATH=" << pp << endl; + //} + //if(std::getenv("SFEL_LAYOUT_PYTHONPATH") != NULL){ + // char * ll= std::getenv("PYTHONPATH"); + // cout << "SFEL_LAYOUT_PYTHONPATH=" << ll << endl; + //} + + + if(std::getenv("SFEL_OMC_PYTHONPATH") != NULL){ + p = std::getenv("SFEL_OMC_PYTHONPATH"); + } + + if (p != NULL) { + + fName.append(p); + fName.append("/"); + fName.append(d); + + ifile.open(fName.c_str(),ios::in); + + if (ifile.good()) { + ifile.close(); + isFile=true; + } + + } + + if (!isFile) { + fName=""; + fName.append("/afs/psi.ch/intranet/SF/Applications/on-line_model/default/PythonModule") ; + std::cout << "Did not find file in $SFEL_OMC_PYTHONPATH " << std::endl; + std::cout << "therefore using the following default directory: " << std::endl; + std::cout << fName.c_str() << std::endl; + + fName.append("/"); + fName.append(d); + + ifile.open(fName.c_str(),ios::in); + + if (ifile.good()) { + ifile.close(); + isFile=true; + } + else { + std::cout << "Error opening default file: " << fName.c_str() << std::endl; + } + } + + // No luck with finding OMC.py + if (!isFile) { return;} + + if (! Py_IsInitialized () ) { + cout << "INITIALIZING PY IN CAFE" << endl; + Py_Initialize(); + } + + + //Py_Initialize(); + //PyEval_InitThreads(); + + globalChannelList.clear(); + globalChannelList.reserve(9000); + + PyObject* psys = PyImport_ImportModule( "sys" ); + + if (psys==NULL) { + cout << "PSYS IS NULL " << endl; + } + + PyObject* psys_path = PyObject_GetAttrString( psys, "path" ); + + if (psys_path==NULL) { + cout << "PSYS PATH IS NULL " << endl; + } + + PyObject* folder_path = PyUnicode_FromString( fName.c_str()); //"/afs/psi.ch/intranet/SF/Applications/Development/OnlineModel/PythonModule" ); + + if (folder_path==NULL) { + cout << "FOLDER PATH IS NULL " << endl; + } + + PyList_Append( psys_path, folder_path ); + + //Py_DECREF(folder_path); + + + // Load module, class and object + PyObject *mymod, *pclass, *pobject; + + //cout << fName.c_str() << endl; + //cout << " PY VERSION " << PY_MAJOR_VERSION << endl; + + mymod = PyImport_ImportModule("OMC"); + + + if (mymod==NULL) { + cout << " MYMOD IS NULL. Printing Error: " << endl; + PyErr_Print() ; + return; + } + + pclass = PyObject_GetAttrString(mymod, "OMC"); + + if (pclass==NULL) { + cout << " pClass IS NULL " << endl; + PyErr_Print() ; + return; + } + + PyObject *pmethod, *pargs, *pret; + pargs=NULL; + + //pobject = PyEval_CallObject(pclass,pargs); + pobject = PyObject_CallObject(pclass,pargs); + + if (pobject==NULL) { + cout << " pobject IS NULL " << endl; + PyErr_Print() ; + return; + } + + pmethod = PyObject_GetAttrString(pobject, "initFunction"); + + if (pmethod==NULL) { + cout << " pobject IS NULL " << endl; + PyErr_Print() ; + return; + } + + + //Required for Python3 + pargs=Py_BuildValue("(s)", suff.c_str()); + //pargs=Py_BuildValue("s",(suff.c_str())); + + if (pargs==NULL) { + cout << " pargs IS NULL " << endl; + PyErr_Print() ; + } + + + // PyObject * temp = PyUnicode_AsEncodedString(pargs, "ASCII", "strict"); + //PyObject * my_pargs = PyBytes_AS_STRING(temp); // Borrowed pointer + //my_pargs = strdup(my_pargs); + + //pret=PyEval_CallObject(pmethod,PyObject(pargs)); + + + //pret=PyObject_CallFunction(pmethod, "s", suff.c_str()); + pret=PyObject_CallObject(pmethod, pargs); + + + if (pret==NULL) { + cout << " pret IS NULL / " << endl; + PyErr_Print() ; + return; + } + + + //if (PyTuple_Check(pret)) { + // cout << "pret ia a TUPLE " << endl; + //} + + string GroupName; + vector ChannelList; + + PyObject *plist1, *plist2, *plist3, *plist4; + int i,j,li; + long lj; + + //cout << "PyArg_ParseTuple(pret, 'iOOO', &li,&plist1, &plist2, &plist3);" << endl; + if (!PyArg_ParseTuple(pret, "iOOO", &li,&plist1, &plist2, &plist3)) { + cout << "is NULL " << endl; + return; + } + + /* + if (PyUnicode_Check(plist2)) { + // Convert string to bytes. + // strdup() bytes into my_result. + cout << "UNICODE " << endl; + } else if (PyBytes_Check(plist2)) { + // strdup() bytes into my_result. + cout << "BYTES " << endl; + + } else if (PyTuple_Check(plist2)) { + + cout << "TUPLE " << endl; + } else if (PyList_Check(plist2)) { + + cout << "List " << endl; + } + else if (PyByteArray_Check(plist2)) { + + cout << "PyByteArray " << endl; + } + + else if (PyDict_Check(plist2)) { + + cout << "PyDict " << endl; + } + else if (PyDictKeys_Check(plist2)) { + + cout << "PyDict_Keys " << endl; + } + + else if (PyMemoryView_Check(plist2)) { + + cout << "PymemoryView " << endl; + } + else if (PyModule_Check(plist2)) { + + cout << "PyModule " << endl; + } + + + else if (PyCell_Check(plist2)) { + // strdup() bytes into my_result. + cout << "PyCell " << endl; + } + + else { + // Convert into your favorite string representation. + // Convert string to bytes if it is not already. + // strdup() bytes into my_result. + cout << "SOMEOT ELSE " << endl; + } + + + if (PyList_Check(plist1)) { + // strdup() bytes into my_result. + cout << "PyList check for plist1 is OK " << endl; + } + + if (PyDictValues_Check(plist3)) { + // strdup() bytes into my_result. + cout << "PyList check for plist1 is OK " << endl; + } + */ + + //Py_ssize_t pli; + //pli=PyList_Size(plist1); // This causes segfault for some reason... + //printf("length%i\n",li); + PyObject *ps, *pyi; + string mystr; + + //Check type of pList1 etc... + + if (plist1 == NULL ) { + cout << "pList1 is NULL" << endl; + } + if (plist2 == NULL ) { + cout << "pList2 is NULL" << endl; + } + if (plist3 == NULL ) { + cout << "pList3 is NULL" << endl; + } + +//if HAVE_LIBQTXML + CAFE::openGroupXMLFile("/tmp/test.xml"); +//endif + + //cout << PY_MAJOR_VERSION << endl; + + + + for (i=0; i= 3 + mystr=PyUnicode_AsUTF8(ps); + #elif PY_MAJOR_VERSION < 3 + mystr=PyString_AsString(ps); + #endif + + //printf("Channel Name: %s\n",mystr.c_str()); + //printf("Channel %d Name: %s\n",j, mystr.c_str()); + ChannelList.push_back (mystr); + globalChannelList.push_back(mystr); + + } + //cafefunction.grouping(GroupName,ChannelList); + status=CAFE::groupDefine(GroupName.c_str(), ChannelList); + if (status != ICAFE_NORMAL) { + CAFE::printStatusMessage(status); + } +//if HAVE_LIBQTXML + CAFE::group2XML(GroupName.c_str(), "/tmp/test.xml"); +//endif + } + +//if HAVE_LIBQTXML + CAFE::closeGroupXMLFile("/tmp/test.xml"); +//endif + /* + cout << "psys = " << (psys->ob_refcnt) << endl; + cout << "psys_path = " << (psys_path->ob_refcnt) << endl; + cout << "folder_path = " << (folder_path->ob_refcnt) << endl; + + cout << "mymod = " << (mymod->ob_refcnt) << endl; + cout << "pclass = " <<(pclass->ob_refcnt) << endl; + cout << "pobject = " << (pobject->ob_refcnt) << endl; + + cout << "pmethod = " << (pmethod->ob_refcnt) << endl; + cout << "pargs = " << (pargs->ob_refcnt) << endl; + cout << "pret = " <<(pret->ob_refcnt) << endl; + + cout << "plist1 = " << (plist1->ob_refcnt) << endl; + cout << "plist2 = " << (plist2->ob_refcnt) << endl; + cout << "plist3 = " << (plist3->ob_refcnt) << endl; + + cout << "plist4 = " << (plist4->ob_refcnt) << endl; + cout << "ps = " << (ps->ob_refcnt) << endl; + cout << "pyi = " << (pyi->ob_refcnt) << endl; + + */ + + + + Py_DECREF(psys); + Py_DECREF(psys_path); + Py_DECREF(folder_path); + + + Py_DECREF(mymod); + Py_DECREF(pclass); + Py_DECREF(pobject); + + + + + if (pargs !=NULL) { + Py_DECREF(pargs); + } + + + Py_DECREF(pret); + + + //Cannot Py_DECREF(pmethod) in Python3 ! + //if (pmethod !=NULL) { + // Py_DECREF(pmethod); + //} + + + //Py_DECREF(plist1); + //Py_DECREF(plist2); + //Py_DECREF(plist3); + + //Py_DECREF(plist4); //RELATED TO PLIST3 + //Py_DECREF(ps); //RELATED TO PLIST2 + //Py_DECREF(pyi); //related to plist1 + + + //Py_Finalize(); // No! + + /* + //Note some of these objects will no longer exist after decref + cout << "psys = " << (psys->ob_refcnt) << endl; + cout << "psys_path = " << (psys_path->ob_refcnt) << endl; + cout << "folder_path = " << (folder_path->ob_refcnt) << endl; + + cout << "mymod = " << (mymod->ob_refcnt) << endl; + cout << "pclass = " <<(pclass->ob_refcnt) << endl; + cout << "pobject = " << (pobject->ob_refcnt) << endl; + + cout << "pmethod = " << (pmethod->ob_refcnt) << endl; + cout << "pargs = " << (pargs->ob_refcnt) << endl; + cout << "pret = " <<(pret->ob_refcnt) << endl; + + cout << "plist1 = " << (plist1->ob_refcnt) << endl; + cout << "plist2 = " << (plist2->ob_refcnt) << endl; + cout << "plist3 = " << (plist3->ob_refcnt) << endl; + + cout << "plist4 = " << (plist4->ob_refcnt) << endl; + cout << "ps = " << (ps->ob_refcnt) << endl; + cout << "pyi = " << (pyi->ob_refcnt) << endl; +*/ + + + return; +} +#endif + + + +/* +#if HAVE_PYTHON_H +void CAFE::loadSFGroups(string suff) { + + Py_Initialize(); + PyEval_InitThreads(); + + cout << " HERE " << endl; + + PyObject* psys = PyImport_ImportModule( "sys" ); + // cout << " HERE2a " << endl; + PyObject* psys_path = PyObject_GetAttrString( psys, "path" ); + PyObject* folder_path = PyUnicode_FromString( "/afs/psi.ch/intranet/SF/Applications/Development/OnlineModel/PythonModule" ); + //PyObject* folder_path = PyUnicode_FromString( "/afs/psi.ch/intranet/SF/Applications/Development/Masa/git/PythonModule" ); + PyList_Append( psys_path, folder_path ); + + // Load module, class and object + PyObject *mymod, *pclass, *pobject; + cout << " HERE2b " << endl; + mymod = PyImport_ImportModule("OMC"); + + cout << " HERE2c " << endl; + pclass = PyObject_GetAttrString(mymod, "OMC"); + cout << " HERE2d " << endl; + PyObject *pmethod, *pargs, *pret; + pargs=NULL; + pobject = PyEval_CallObject(pclass,pargs); + cout << " HERE3 " << endl; + pmethod = PyObject_GetAttrString(pobject, "initFunction"); + pargs=Py_BuildValue("(s)", suff.c_str()); + // cout << " HERE4 " << endl; + pret=PyEval_CallObject(pmethod,pargs); + // cout << " HERE5 " << endl; + string GroupName; + vector ChannelList; + + PyObject *plist1, *plist2, *plist3, *plist4; + int i,j,li; + long lj; + PyArg_ParseTuple(pret, "iOOO", &li,&plist1, &plist2, &plist3); + // cout << " HERE6 " << endl; + //Py_ssize_t pli; + //pli=PyList_Size(plist1); // This causes segfault for some reason... + //printf("length%i\n",li); + PyObject *ps, *pyi; + string mystr; + + + + CAFE::openGroupXMLFile("/tmp/test.xml"); + //cout << " HERE7 " << endl; + for (i=0; inbyteMax && channelInfo.getDataType()< CAFE_NO_ACCESS) { + chtMax=channelInfo.getDataType(); + nbyteMax=4; + } + } + } + + switch (chtMax) { + case DBR_STRING:{ + dbr_string_t * _sVal = new dbr_string_t[nelem]; + status=cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, _sVal, statusArray, + alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) { + istringstream ss; + for (unsigned int i=0; i < nelem; ++i) { + long long l=0; + ss.clear(); + ss.str(_sVal[i]); + ss>>l; + + if ( !ss.fail()) { + val[i] = (long long) l; + std::string strInput=_sVal[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << _sVal[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << "Returning value 0 for element " << i << endl; + cout << "Status value is ECAFE_NO_CONVERT for element " << i << endl; + val[i]=0; + statusArray[i]=ECAFE_NO_CONVERT; + } + } + } + delete [] _sVal; + break; + } + case DBR_DOUBLE:{ + dbr_double_t * _dVal = new dbr_double_t[nelem]; + status=cafeDoppio.getCache(handleArray, nelem, DBR_TIME_DOUBLE, _dVal, statusArray, + alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) { + for (unsigned int i=0; i < nelem; ++i) { + val[i] = (long long) _dVal[i]; + } + } + delete [] _dVal; + break; + } + case DBR_FLOAT: { + dbr_float_t * _fVal = new dbr_float_t[nelem]; + status=cafeFrappuccino.getCache(handleArray, nelem, DBR_TIME_FLOAT, _fVal, statusArray, + alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) { + for (unsigned int i=0; i < nelem; ++i) { + val[i] = (long long) _fVal[i]; + } + } + delete [] _fVal; + break; + } + case DBR_LONG: { + dbr_long_t * _lVal = new dbr_long_t[nelem]; + status=cafeLatte.getCache(handleArray, nelem, DBR_TIME_LONG, _lVal, statusArray, + alarmStatus, alarmSeverity, ts); + if (status==ICAFE_NORMAL) { + for (unsigned int i=0; i < nelem; ++i) { + val[i] = (long long) _lVal[i]; + } + } + delete [] _lVal; + break; + } + + }//switch + + for (unsigned int i=0; i < nelem; ++i) { + CAFE::setNelemToRetrieveFromCacheToPrevious(handleArray[i],nelemPrevious[i]); + } + + return status; +#undef __METHOD__ +}; + +/** \fn int CAFE::getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, + * int *statusArray, dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) + * \brief Retrieves data (long long) from cache + * \param handleArray input: Array of handles to Conduit object + * \param nelem input: No. of array elements + * \param val output: Array of long longs containing cached data + * \param statusArray output: Array of status' + * \param alarmStatus output: Alarm Status + * \param alarmSeverity output: Corresponding severity of alarm + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, + int *statusArray, dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity) { + epicsTimeStamp *ts = new epicsTimeStamp[nelem]; + status=CAFE::getCache(handleArray, nelem, val, statusArray, alarmStatus, alarmSeverity, ts); + delete [] ts; + return status; +}; + +/** + * \brief Retrieves data (long long) from cache + * \param handleArray input: Array of handles to Conduit object + * \param nelem input: No of array elements + * \param val output: Array of long longs containing cached data + * \param statusArray output: Array of status' + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::getCache (const unsigned int *handleArray, unsigned int nelem, long long * val, + int *statusArray) { + dbr_short_t *alarmStatus; dbr_short_t *alarmSeverity; epicsTimeStamp *ts; + ts = new epicsTimeStamp[nelem]; + alarmStatus = new dbr_short_t[nelem]; + alarmSeverity = new dbr_short_t[nelem]; + status=CAFE::getCache(handleArray, nelem, val, statusArray, alarmStatus, alarmSeverity, ts); + delete [] ts; delete [] alarmStatus; delete [] alarmSeverity; + return status; +} + +/** + * \brief Retrieves data (long long) from cache + * \param handle input: Handle Conduit object + * \param _val output: Array of long longs containing cached data + * \param alarmStatus output: Alarm Status + * \param alarmSeverity output: Corresponding severity of alarm + * \param ts output: epics timestamp struct + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +//5+ long long getCache +int CAFE::getCache(const unsigned int handle, long long * _val, \ + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) { +#define __METHOD__ \ + "CAFE::getCache(const unsigned int handle, long long * _val, \ + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)" + + ChannelRegalia channelInfo; + CAFE::getChannelInfo(handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + int _status=ICAFE_NORMAL; + unsigned int nn=handleHelper.getNelemRequest(handle); + + + if ( channelInfo.getDataType() == DBR_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nn]; + _status=cafeSoluble.getCache (handle, DBR_TIME_STRING, _sVal, alarmStatus, alarmSeverity, ts); + if (_status!=ICAFE_NORMAL) { delete [] _sVal; return _status;} + istringstream ss; + + for (unsigned short i=0; i>l; + + if ( !ss.fail()) { + _val[i] = (long long) l; + std::string strInput=_sVal[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << nn << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << _sVal[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << "Returning value 0 for element " << i << endl; + _val[i]=0; + } + } + + delete [] _sVal; + } + + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nn]; + _status=cafeDoppio.getCache (handle, DBR_TIME_DOUBLE, _dVal, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _dVal[i]; + } + delete [] _dVal; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nn]; + _status=cafeFrappuccino.getCache (handle, DBR_TIME_FLOAT, _fVal, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _fVal[i]; + } + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nn]; + _status=cafeLatte.getCache (handle, DBR_TIME_LONG, _lVal, alarmStatus, alarmSeverity, ts); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _lVal[i]; + } + delete [] _lVal; + } + return _status; +#undef __METHOD__ +}; + +/** + * \brief Retrieves data (long long) from cache + * \param handle input: Handle Conduit object + * \param _val output: Array of long longs containing cached data + * \param alarmStatus output: Alarm Status + * \param alarmSeverity output: Corresponding severity of alarm + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::getCache(const unsigned int handle, long long * _val, \ + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) { +#define __METHOD__ \ + "CAFE::getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, \ + dbr_short_t &alarmSeverity)" + ChannelRegalia channelInfo; + CAFE::getChannelInfo(handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + int _status=ICAFE_NORMAL; + unsigned int nn=handleHelper.getNelemRequest(handle); + + + if ( channelInfo.getDataType() == DBR_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nn]; + _status=cafeSoluble.getCache (handle, DBR_STS_STRING, _sVal, alarmStatus, alarmSeverity); + if (_status!=ICAFE_NORMAL) { delete [] _sVal; return _status;} + istringstream ss; + + for (unsigned short i=0; i>l; + + if ( !ss.fail()) { + _val[i] = (long long) l; + std::string strInput=_sVal[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << nn << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << _sVal[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << "Returning value 0 for element " << i << endl; + _val[i]=0; + } + } + + delete [] _sVal; + } + + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nn]; + _status=cafeDoppio.getCache(handle, DBR_STS_DOUBLE, _dVal, alarmStatus, alarmSeverity); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _dVal[i]; + } + delete [] _dVal; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nn]; + _status=cafeFrappuccino.getCache (handle, DBR_STS_FLOAT, _fVal, alarmStatus, alarmSeverity); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _fVal[i]; + } + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nn]; + _status=cafeLatte.getCache (handle, DBR_STS_LONG, _lVal, alarmStatus, alarmSeverity); + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _lVal[i]; + } + delete [] _lVal; + } + return _status; + #undef __METHOD__ +}; + + +/** + * \brief Retrieves data (long long) from cache + * \param handle input: Handle Conduit object + * \param _val output: Array of long longs containing cached data + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::getCache(const unsigned int handle, long long * _val){ +#define __METHOD__ \ + "CAFE::get(const unsigned int handle, long long * _val)" + + ChannelRegalia channelInfo; + CAFE::getChannelInfo(handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + int _status=ICAFE_NORMAL; + unsigned int nn=handleHelper.getNelemRequest(handle); + + if ( channelInfo.getDataType() == DBR_STRING) { + dbr_string_t * _sVal = new dbr_string_t[nn]; + _status=cafeSoluble.getCache (handle, DBR_STRING, _sVal); + if (_status!=ICAFE_NORMAL) { delete [] _sVal; return _status;} + istringstream ss; + + for (unsigned short i=0; i>l; + + if ( !ss.fail()) { + _val[i] = (long long) l; + std::string strInput=_sVal[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << nn << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << _sVal[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << "Returning value 0 for element " << i << endl; + _val[i]=0; + } + } + + delete [] _sVal; + } + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + dbr_double_t * _dVal = new dbr_double_t[nn]; + _status=cafeDoppio.getCache (handle, DBR_DOUBLE, _dVal); + if (_status!=ICAFE_NORMAL) { delete [] _dVal; return _status;} + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _dVal[i]; + } + delete [] _dVal; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + dbr_float_t * _fVal = new dbr_float_t[nn]; + _status=cafeFrappuccino.getCache (handle, DBR_FLOAT, _fVal); + if (_status!=ICAFE_NORMAL) { delete [] _fVal; return _status;} + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _fVal[i]; + } + delete [] _fVal; + } + else { + dbr_long_t * _lVal = new dbr_long_t[nn]; + _status=cafeLatte.getCache (handle, DBR_LONG, _lVal); + if (_status!=ICAFE_NORMAL) { delete [] _lVal; return _status;} + for (unsigned int i=0; i < handleHelper.getNelemRequest(handle); ++i) { + _val[i] = (long long) _lVal[i]; + } + delete [] _lVal; + } + return _status; + +#undef __METHOD__ +}; + + + + + +/** + * \brief Retrieves data from cache, packaged into the PVDataHolder class + * \param handleArray input: Array of handles to Conduit object + * \param nelem input: No of array elements + * \param pvdArray outout: Array of PVDataHolder containing cached data + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::getCache(const unsigned int * handleArray, unsigned int nelem, PVDataHolder * pvdArray){ +#define __METHOD__ \ + "CAFE::getCache(unsigned int * handleArray, unsigned int nelem, PVDataHolder * pvdArray)" + + int overallStatus=ICAFE_NORMAL; bool isGood=true; + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + //meant for use in callbacks in monitors! + if ( (*it_handle).getChannelGetCacheWaitPolicy().getWaitKind() == CAFENUM::GET_CACHE_NO_CHECK) { + (*it_handle).getPVDataHolder(pvd); + return status; + } + + //Whatever is already there! + chtype dbrtype= (*it_handle).getChannelRequestMetaData().getDbrDataType(); + + //Find Native DataType + if ( (status=cafeGranules.channelVerifyGet(handle, dbrtype)) != ICAFE_NORMAL) { + (*it_handle).getPVDataHolder(pvd); + return status; + } + + + //Add CAFENUM::WITH_CALLBACK_USER_SUPPLIED + if ((*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() == CAFENUM::PENDING + && handleHelper.getNmonitorData(handle)==0 + && (*it_handle).getChannelRequestPolicyGet().getMethodKind() + != CAFENUM::WITH_CALLBACK_USER_SUPPLIED + && (*it_handle).getChannelGetCacheWaitPolicy().getWaitKind() == CAFENUM::GET_CACHE_WAIT + && (*it_handle).isConnected() ) { + + ChannelTimeoutPolicy channelTimeoutPolicyGet = (*it_handle).getChannelTimeoutPolicyGet(); + + ca_poll(); + + status=cafeGranules.waitForGetEvent(handle, + channelTimeoutPolicyGet.getTimeout() ); + + if (status==ECAFE_TIMEOUT && channelTimeoutPolicyGet.getSelfGoverningTimeout()) { + unsigned short ntries=0; + + while (status==ECAFE_TIMEOUT && ntries (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + if(MUTEX){cafeMutex.lock();} //lock + ChannelRequestStatus channelRequestStatusPut = (*it_handle).getChannelRequestStatusPut(); + channelRequestStatusPut.setCallbackStatus (status); + channelRequestStatusPut.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + + handle_index.modify(it_handle, + change_channelRequestStatusPut(channelRequestStatusPut)); + + if(MUTEX){cafeMutex.unlock();}//unlock + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + } + + return ECAFE_INVALID_HANDLE; + } + +#undef __METHOD__ +} + + + +/** + * \brief reset callback for get operation to NOT_INITIATED / NOT_TRIGGERED + * \param handle input: handle to Conduit object + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int CAFE::resetCallbackGet(const unsigned int handle) { +#define __METHOD__ "CAFE::resetCallbackGet(unsigned int)" + status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + if(MUTEX){cafeMutex.lock();} //lock + ChannelRequestStatus channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackStatus (status); + channelRequestStatusGet.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + + handle_index.modify(it_handle, + change_channelRequestStatusGet(channelRequestStatusGet)); + + if(MUTEX){cafeMutex.unlock();}//unlock + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + } + return ECAFE_INVALID_HANDLE; + } + +#undef __METHOD__ +} + + +/** + * \brief Retrieves data from cache, packaged into the PVDataHolder class + * \param handle input: handle to Conduit object + * \param pvd outout: PVDataHolder containing cached data + * \return ICAFE_NORMAL if all OK + */ +int CAFE::getCacheNoWait(const unsigned int handle, PVDataHolder & pvd) { +#define __METHOD__ "CAFE::getCacheNoWait(unsigned int handle, PVDataHolder & pvd)" + + //status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + //Whatever is already there! + chtype dbrtype= (*it_handle).getChannelRequestMetaData().getDbrDataType(); + + //Find Native DataType + if ( (status=cafeGranules.channelVerifyGet(handle, dbrtype)) != ICAFE_NORMAL) { + (*it_handle).getPVDataHolder(pvd); + return status; + } + + + if (!(*it_handle).isConnected() ) { + + if(MUTEX){cafeMutex.lock();} //lock + ChannelRequestStatus channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackStatus (status); + channelRequestStatusGet.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + + handle_index.modify(it_handle, + change_channelRequestStatusGet(channelRequestStatusGet)); + + handle_index.modify(it_handle, change_status(ICAFE_CS_DISCONN)); + if(MUTEX){cafeMutex.unlock();}//unlock + + (*it_handle).getPVDataHolder(pvd); + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ICAFE_CS_DISCONN); + return ICAFE_CS_DISCONN; + + } + + + + (*it_handle).getPVDataHolder(pvd); + + //cout << __METHOD__ << " pvd.getStatus() STATUS ===> " << pvd.getStatus() << endl; + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + } + pvd.status=ECAFE_INVALID_HANDLE; + return ECAFE_INVALID_HANDLE; + } + + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}; //unlock + + return pvd.getStatus(); +#undef __METHOD__ +}; + + + +/** + * \brief Retrieves PV DBR_CTRL data from cache, packaged into the PVCtrlHolder class + * \param handleArray input: Array of handles to Conduit object + * \param nelem input: No of array elements + * \param pvcArray outout: Array of PVCtrlHolder containing cached data + * \return overallStatus: ICAFE_NORMAL if all OK else first ECAFE error encountered + */ +int CAFE::getCtrlCache(const unsigned int * handleArray, unsigned int nelem, PVCtrlHolder * pvcArray){ +#define __METHOD__ \ + "CAFE::getCtrlCache(unsigned int * handleArray, unsigned int nelem, PVCtrlHolder * pvcArray)" + + int overallStatus=ICAFE_NORMAL; bool isGood=true; + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + //Whatever is already there! + chtype dbrtype= (*it_handle).getChannelRequestMetaData().getDbrDataType(); + + //Use Native DataType + if ( (status=cafeGranules.channelVerifyGetCtrl(handle, dbrtype)) != ICAFE_NORMAL) { + (*it_handle).getPVCtrlHolder(pvc); + pvc.status=status; + return status; + } + + if ((*it_handle).getChannelRequestStatusGetCtrl().getCallbackProgressKind() == CAFENUM::PENDING + && handleHelper.getNmonitorCtrl(handle)==0 + && (*it_handle).getChannelRequestPolicyGetCtrl().getMethodKind() + != CAFENUM::WITH_CALLBACK_USER_SUPPLIED + && (*it_handle).getChannelGetCacheWaitPolicy().getWaitKind() == CAFENUM::GET_CACHE_WAIT + && (*it_handle).isConnected() ) { + + ChannelTimeoutPolicy channelTimeoutPolicyGet=(*it_handle).getChannelTimeoutPolicyGet(); + + ca_poll(); + status=cafeGranules.waitForGetCtrlEvent(handle, + channelTimeoutPolicyGet.getTimeout() ); + + if (status==ECAFE_TIMEOUT && channelTimeoutPolicyGet.getSelfGoverningTimeout() + && (*it_handle).isConnected() ) { + unsigned short ntries=0; + while (status==ECAFE_TIMEOUT && ntries char const * enumStrings::data[] += {"CAFENUM::WAIT", "CAFENUM::NO_WAIT"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::NATIVE_DATATYPE", "CAFENUM::LOWEST_DATATYPE"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::WITH_FLUSH_IO","CAFENUM::WITH_PEND_IO","CAFENUM::WITH_PEND_EVENT", "CAFENUM::WITH_POLL"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::FLUSH_AFTER_EACH_MESSAGE","CAFENUM::FLUSH_DESIGNATED_TO_CLIENT"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::WITHOUT_CALLBACK","CAFENUM::WITH_CALLBACK_DEFAULT","CAFENUM::WITH_CALLBACK_USER_SUPPLIED"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::DBR_PRIMITIVE","CAFENUM::DBR_STS","CAFENUM::DBR_TIME", "CAFENUM::DBR_GR", + "CAFENUM::DBR_CTRL","CAFENUM::DBR_PUT", "CAFENUM::DBR_STSACK","CAFENUM::DBR_CLASS", + "CAFENUM::DBR_OTHER"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::NO_MESSAGE","CAFENUM::PRE_REQUEST","CAFENUM::FROM_REQUEST","CAFENUM::FROM_PEND", + "CAFENUM::FROM_CALLBACK"}; + +template<> char const * enumStrings::data[] += {"CAFENUM::NOT_INITIATED","CAFENUM::PENDING","CAFENUM::COMPLETE"}; + + diff --git a/src/cafeGroup.cpp b/src/cafeGroup.cpp new file mode 100644 index 0000000..28be55a --- /dev/null +++ b/src/cafeGroup.cpp @@ -0,0 +1,1528 @@ + +/// +/// \file cafeGroup.cc +/// +/// \author Jan Chrin, PSI +/// \date January 2016 +/// \version CAFE 1.0.0 +/// +#include "cafe.h" + + +//// Groups + +/** + * Fills the PVGroup object indentified by the groupHandle from memory.\n + * Does NOT do a "get". Method used to fill the PVGroup class with meta-data. + * \param _groupHandle input: handle to the group object + * \param pvgroup output: data pertaining to the object + * \return statusGroup + */ +int CAFE::groupFetch(const unsigned int _groupHandle, PVGroup &pvgroup) { +#define __METHOD__ "groupFetch( _groupHandle, &pvgroup)" + + string s = handleHelper.getGroupNameFromGroupHandle(_groupHandle); + + if (s!="") { + bool groupExists=false; + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, s.c_str()) == 0) { + pvgroup = PVGroupV[i]; + pvgroup.groupHandle=_groupHandle; + groupExists=true; + break; + } + } + if (!groupExists) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_UNKNOWN_GROUP); + return ECAFE_UNKNOWN_GROUP; + } + } + else { + return ECAFE_UNKNOWN_GROUP; + } + return ICAFE_NORMAL; +#undef __METHOD__ +}; + +/** + * Fills the PVGroup object indentified by the groupHandle from memory.\n + * Method used to fill the PVGroup class both with meta-data and actual data + * (from hash table) + * \param _groupHandle input: handle to the group object + * \param pvgroup output: data pertaining to the object + * \return statusGroup + */ +int CAFE::groupAttach(const unsigned int _groupHandle, PVGroup &pvgroup) { +#define __METHOD__ "groupAttach(_groupHandle, &pvgroup)" + + string s = handleHelper.getGroupNameFromGroupHandle(_groupHandle); + + + + unsigned int iIdx; + + if (s!="") { + bool groupExists=false; + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, s.c_str()) == 0) { + pvgroup = PVGroupV[i]; + iIdx=i; + groupExists=true; + break; + } + } + + if (!groupExists) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_UNKNOWN_GROUP); + return ECAFE_UNKNOWN_GROUP; + } + } + else { + return ECAFE_UNKNOWN_GROUP; + } + + //Fill group from current data in hash table: + pvgroup.statusGroup=ICAFE_NORMAL; + + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_groupHandle); + + + if (it_groupHandle != groupHandle_index.end()) { + + unsigned int nGroupMember = (*it_groupHandle).getNMember(); + + if (pvgroup.npv != (*it_groupHandle).getNMember()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "A MISMATCH IN THE NUMBER OF GROUP MEMBERS DETECTED " << endl; + cout << "CLIENT (pvgroup.npv) CLAIMS " << pvgroup.npv + << " CONDUITGROUP OBJECT CLAIMS " << (*it_groupHandle).getNMember() << endl; + nGroupMember = min(pvgroup.npv,(*it_groupHandle).getNMember()); + cout << "TAKING SMALLER OF THE TWO NUMBERS " << endl; + } + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + + for (unsigned int iMember = 0; iMember < nGroupMember; ++iMember) { + + bool hf=false; + //reset + pvgroup.pvdata[iMember].alarmStatus =-1; + pvgroup.pvdata[iMember].alarmSeverity =-1; + pvgroup.pvdata[iMember].ts.secPastEpoch=0; + pvgroup.pvdata[iMember].ts.nsec=0; + pvgroup.pvdata[iMember].hasAlarm=true; + pvgroup.pvdata[iMember].hasTS=true; + pvgroup.pvdata[iMember].rule=true; + pvgroup.pvdata[iMember].status=ICAFE_NORMAL; + + it_handle = handle_index.find((*it_groupHandle).mHandle[iMember]); + + if (it_handle != handle_index.end()) { + hf=true; + } + + if (!hf) { + pvgroup.pvdata[iMember].status=ECAFE_INVALID_HANDLE; + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Invalid handle = " << (*it_groupHandle).mHandle[iMember] + << " for groupMember [" << iMember << "] " << endl; + + pvgroup.statusGroup=ECAFE_INVALID_HANDLE; + continue; + } + + if (!(*it_handle).getChannelRegalia().getConnectFlag()) { + + if (pvgroup.statusGroup==ICAFE_NORMAL) { + pvgroup.statusGroup=(*it_handle).getChannelRegalia().getCafeConnectionState(); + } + } + + //this sets size and nelem to 1 if not connected + //unsigned int a= + pvgroup.pvdata[iMember].setNelem( (*it_handle).getChannelRegalia().getNelem() ); + + //set Device, Attribute for handle + + ChannelDeviceAttribute channelDeviceAttribute; + channelDeviceAttribute.init((*it_handle).pv, deviceAttributeDeliminator); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelDeviceAttribute( + channelDeviceAttribute)); + if(MUTEX){cafeMutex.unlock();} + + //Above lines replace need for handleHelper + // handleHelper.setChannelDeviceAttribute(deviceAttributeDeliminator); + + + (*it_handle).getPVDataHolder(pvgroup.pvdata[iMember]); + + } //for + + + PVGroupV[iIdx]=pvgroup; + pvgroup.groupHandle=_groupHandle; + + return pvgroup.statusGroup; + } else { + return ECAFE_INVALID_GROUP_HANDLE; + } +#undef __METHOD__ +}; + + +/** + * Fills the PVGroup object indentified by pvgroup.groupHandle \n + * \param pvgroup input/output: data pertaining to the object + * \return statusGroup + */ +int CAFE::groupSet(PVGroup &pvgroup) { +#define __METHOD__ "groupSet(&pvgroup)" + + return CAFE::groupSet(pvgroup.groupHandle, pvgroup); + +#undef __METHOD__ +}; + +/** + * Fills the PVGroup object indentified by the groupHandle \n + * \param _groupHandle input: handle to the group object + * \param pvgroup input/output: data pertaining to the object + * \return statusGroup + */ +int CAFE::groupSet(const unsigned int _groupHandle, PVGroup &pvgroup) { +#define __METHOD__ "groupSet( _groupHandle, &pvgroup)" + + if (pvgroup.npv==0) { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_EMPTY_GROUP); + return ECAFE_EMPTY_GROUP; + } + else if (pvgroup.groupHandle!=_groupHandle) { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Input groupHandle " << _groupHandle << " does not match that within pvgroup " + << pvgroup.groupHandle << endl; + cout << "groupSet operation NOT attempted. Client clarification required! " << endl; + cafeStatus.report(ECAFE_PVGROUP_GROUPHANDLE_MISMATCH); + return ECAFE_PVGROUP_GROUPHANDLE_MISMATCH; + } + + int gStatus=ICAFE_NORMAL; + + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + + unsigned int nGroupMember = (*it_groupHandle).getNMember(); + + if (pvgroup.npv != (*it_groupHandle).getNMember()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "A MISMATCH IN THE NUMBER OF GROUP MEMBERS DETECTED " << endl; + cout << "CLIENT (pvgroup.npv) CLAIMS " << pvgroup.npv + << " CONDUITGROUP OBJECT CLAIMS " << (*it_groupHandle).getNMember() << endl; + nGroupMember = min(pvgroup.npv,(*it_groupHandle).getNMember()); + cout << "TAKING SMALLER OF THE TWO NUMBERS " << endl; + } + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + bool * nelemPreviousFlag = new bool [nGroupMember]; + unsigned int * nelemPrevious = new unsigned int [nGroupMember]; + + + for (unsigned int iMember = 0; iMember < nGroupMember; ++iMember) { + + bool hf=false; + //reset + pvgroup.pvdata[iMember].alarmStatus=-1; + pvgroup.pvdata[iMember].alarmSeverity=-1; + pvgroup.pvdata[iMember].ts.secPastEpoch=0; + pvgroup.pvdata[iMember].ts.nsec=0; + pvgroup.pvdata[iMember].status=ICAFE_NORMAL; + + it_handle = handle_index.find((*it_groupHandle).mHandle[iMember]); + + if (it_handle != handle_index.end()) { + hf=true; + + if (pvgroup.pvdata[iMember].getRule() != (*it_groupHandle).getRule(iMember)) { + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_rule(pvgroup.pvdata[iMember].rule, iMember)); + if(MUTEX){cafeMutex.unlock();} + } + if (!pvgroup.pvdata[iMember].getRule() ) { + pvgroup.pvdata[iMember].status=ICAFE_RULE_FALSE; + } + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + } + + if (!hf) { + + nelemPrevious[iMember]=0; + nelemPreviousFlag[iMember]=false; + + pvgroup.pvdata[iMember].status=ECAFE_INVALID_HANDLE; + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Invalid handle = " << (*it_groupHandle).mHandle[iMember] + << " for groupMember [" << iMember << "] " << endl; + continue; + } + + unsigned int handle=(*it_groupHandle).mHandle[iMember]; + + + nelemPrevious[iMember]=handleHelper.getNelemClient(handle); + nelemPreviousFlag[iMember]=false; + + //Find Native DataType + if ( (pvgroup.pvdata[iMember].status=cafeGranules.channelVerifyPut(handle, + pvgroup.pvdata[iMember].dataType)) != ICAFE_NORMAL) { + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "CHANNEL: " << pvgroup.pvdata[iMember].pv << endl; + cafeStatus.report(pvgroup.pvdata[iMember].status); + + continue; + } + + + + + // Examine No of elements and set accordingly.... + if (handleHelper.getNelemClient(handle) != pvgroup.pvdata[iMember].getNelem()) { + + nelemPreviousFlag[iMember]=true; + handleHelper.setNelem(handle, pvgroup.pvdata[iMember].getNelem()); + //cout << "INFO: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Changing handleHelper.getNelemClient(handle) to that given in pvgroup.pvdata[iMember].nelem " << endl; + //cout << "i.e., To: " << pvgroup.pvdata[iMember].nelem << " From: " << handleHelper.getNelemClient(handle) << endl; + + } + + + + if ( (pvgroup.pvdata[iMember].status=cafeGranules.channelPreparePut(handle)) + != ICAFE_NORMAL) { + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(pvgroup.pvdata[iMember].status); + continue; + } + + pvgroup.pvdata[iMember].dbrDataType= + ((*it_handle).getChannelRequestMetaPrimitive().getDbrDataType()); + + + switch ((*it_handle).getChannelRequestMetaPrimitive().getDbrDataType()) { + + case DBR_STRING: + renderString.putString(handle, pvgroup.pvdata[iMember].val.get()); + break; + case DBR_SHORT: + renderShort.put(handle, pvgroup.pvdata[iMember].val.get(), pvgroup.pvdata[iMember].dataType); + break; + case DBR_FLOAT: + renderFloat.put(handle, pvgroup.pvdata[iMember].val.get(), pvgroup.pvdata[iMember].dataType); + break; + case DBR_ENUM: + renderEnum.put(handle, pvgroup.pvdata[iMember].val.get(), pvgroup.pvdata[iMember].dataType); + break; + case DBR_CHAR: + renderChar.put(handle, pvgroup.pvdata[iMember].val.get(), pvgroup.pvdata[iMember].dataType); + break; + case DBR_LONG: + renderLong.put(handle, pvgroup.pvdata[iMember].val.get(), pvgroup.pvdata[iMember].dataType); + break; + case DBR_DOUBLE: + renderDouble.put(handle, pvgroup.pvdata[iMember].val.get(), pvgroup.pvdata[iMember].dataType); + break; + default: + cout << "ERROR: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_SWITCH_CASE); + cout << "SWITCH STATMENT NOT MEANT FOR CAFE DATATYPE=" << + pvgroup.pvdata[iMember].dataType <0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Changed SG PUT from intitial " << originalTimeOut << " to: " << + (originalTimeOut + + channelTimeoutPolicySGPut.getDeltaTimeout()*ntries) + << " seconds after " << ntries << " sg_put calls " < &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::set(CAFE::getHandlesFromWithinGroupV(_groupHandle)[9],8.88); + + status=CAFE::groupGet(_groupHandle, pvgroup); + + + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + cout << pvgroup.pvdata[iMember].getAsString(0) + << " ts " << pvgroup.pvdata[iMember].ts.secPastEpoch << " " << pvgroup.pvdata[iMember].ts.nsec + << " STATUS " << pvgroup.pvdata[iMember].status + << " iMember" << iMember << endl; + valV.push_back(pvgroup.pvdata[iMember].getAsString(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + + + if (pvgroup.statusGroup==ECA_TIMEOUT) { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECA_TIMEOUT); + cout << "SG TIMEOUT OCCURRED. REVERTING TO ASYNCHRNOUS GET" << endl; + return CAFE::getScalars(CAFE::getHandlesFromWithinGroupV(_groupHandle), valV, statusV); + } + else { + return pvgroup.statusGroup; + } + + + +#undef __METHOD__ +} + + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of double values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsDouble(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of float values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsFloat(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of short values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsShort(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of long values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsLong(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of long long values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsLongLong(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of unsigned short values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsUShort(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of unsigned char values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsUChar(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param valV output: vector of char values + * \param statusV output: vector of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, vector &valV, vector &statusV) { +#define __METHOD__ "groupGetScalar( _groupHandle, vector &valV, vector &statusV)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + valV.reserve(pvgroup.npv); statusV.reserve(pvgroup.npv); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + valV.push_back(pvgroup.pvdata[iMember].getAsChar(0)); + statusV.push_back(pvgroup.pvdata[iMember].status); + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of string values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, string * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, string * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsString(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of double values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, double * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, double * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsDouble(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of float values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, float * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, float * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsFloat(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of short values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, short * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, short * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsShort(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of long values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, long * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, long * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsLong(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of long long values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, long long * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, long long * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsLongLong(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of unsigned short values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, unsigned short * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, unsigned short * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsUShort(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of unsigned char values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, unsigned char * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, unsigned char * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsUChar(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + + //Asynchronous get + //get() + //waitForBundleEvents + //getCache + + + return pvgroup.statusGroup; +#undef __METHOD__ +} + +/** + * + * Retrieves scalar value from the PVGroup object indentified by the group handle \n + * \param _groupHandle input: handle to the group object + * \param val output: array of char values + * \param statusArray output: array of int values reporting the status + * \return statusGroup + */ +int CAFE::groupGetScalar(const unsigned int _groupHandle, char * val, int * statusArray) { +#define __METHOD__ "groupGetScalar( _groupHandle, char * val, int * statusArray)" + PVGroup pvgroup; + + CAFE::groupAttach(_groupHandle, pvgroup); + pvgroup.setHasAlarm(false); + pvgroup.setHasTS(false); + + CAFE::groupGet(_groupHandle, pvgroup); + for (unsigned int iMember = 0; iMember < pvgroup.npv; ++iMember) { + val[iMember]=pvgroup.pvdata[iMember].getAsChar(0); + statusArray[iMember]=pvgroup.pvdata[iMember].status; + } + return pvgroup.statusGroup; +#undef __METHOD__ +} + + +/** + * + * Fills the PVGroup object indentified by the pvgroup.groupHandle \n + * \param pvgroup input/output: data pertaining to the object + * \return statusGroup + */ +int CAFE::groupGet(PVGroup &pvgroup) { +#define __METHOD__ "groupGet(&pvgroup)" + + return CAFE::groupGet(pvgroup.groupHandle, pvgroup); + +#undef __METHOD__ +} + + +/** + * Fills the PVGroup object indentified by the groupHandle \n + * \param _groupHandle input: handle to the group object + * \param pvgroup output: data pertaining to the object + * \return statusGroup + */ +int CAFE::groupGet(const unsigned int _groupHandle, PVGroup &pvgroup) { +#define __METHOD__ "groupGet( _groupHandle, &pvgroup)" + + + int gStatus=ICAFE_NORMAL; + + if (pvgroup.npv==0 || pvgroup.groupHandle==0) { + gStatus=groupAttach(_groupHandle, pvgroup); + if (gStatus != ICAFE_NORMAL) {return gStatus;} + }; + + if (pvgroup.groupHandle != _groupHandle) { + return ECAFE_PVGROUP_GROUPHANDLE_MISMATCH; + } + + + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + + unsigned int nGroupMember = (*it_groupHandle).getNMember(); + + if (pvgroup.npv != (*it_groupHandle).getNMember()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "A MISMATCH IN THE NUMBER OF GROUP MEMBERS DETECTED " << endl; + cout << "CLIENT (pvgroup.npv) CLAIMS " << pvgroup.npv + << " CONDUITGROUP OBJECT CLAIMS " << (*it_groupHandle).getNMember() << endl; + nGroupMember = min(pvgroup.npv,(*it_groupHandle).getNMember()); + cout << "TAKING SMALLER OF THE TWO NUMBERS " << endl; + } + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + for (unsigned int iMember = 0; iMember < nGroupMember; ++iMember) { + + bool hf=false; + //reset + pvgroup.pvdata[iMember].alarmStatus=-1; + pvgroup.pvdata[iMember].alarmSeverity=-1; + pvgroup.pvdata[iMember].ts.secPastEpoch=0; + pvgroup.pvdata[iMember].ts.nsec=0; + pvgroup.pvdata[iMember].status=ICAFE_NORMAL; + + + it_handle = handle_index.find((*it_groupHandle).mHandle[iMember]); + + if (it_handle != handle_index.end()) { + hf=true; + if (pvgroup.pvdata[iMember].getRule() != (*it_groupHandle).getRule(iMember)) { + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_rule(pvgroup.pvdata[iMember].rule, iMember)); + if(MUTEX){cafeMutex.unlock();} + } + if (!pvgroup.pvdata[iMember].getRule() ) { + pvgroup.pvdata[iMember].status=ICAFE_RULE_FALSE; + } + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + } + + if (!hf) { + pvgroup.pvdata[iMember].status=ECAFE_INVALID_HANDLE; + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Invalid handle = " << (*it_groupHandle).mHandle[iMember] + << " for groupMember [" << iMember << "] " << endl; + continue; + } + + unsigned int handle=(*it_groupHandle).mHandle[iMember]; + + //May happen that channel has just connected and native datatype not yet entered + + CAFE_DATATYPE cdt = pvgroup.pvdata[iMember].dataType; + + //Check groupDataType + if (pvgroup.pvdata[iMember].dataTypeCAFE_DOUBLE) { + cdt=CAFE_STRING; + } + + + + //Let us take a look at hasAlarm and hasTS flags to determine if these are retrieved from SC + chtype _chtype= cdt; + + + if (!pvgroup.pvdata[iMember].hasAlarm && !pvgroup.pvdata[iMember].hasTS) { + handleHelper.setCafeDbrType(handle, CAFENUM::DBR_PRIMITIVE); + } + else if (pvgroup.pvdata[iMember].hasAlarm && !pvgroup.pvdata[iMember].hasTS) { + _chtype=dbf_type_to_DBR_STS (cdt); + handleHelper.setCafeDbrType(handle, CAFENUM::DBR_STS) ; + + } + else if (pvgroup.pvdata[iMember].hasTS) { + _chtype=dbf_type_to_DBR_TIME (cdt); + handleHelper.setCafeDbrType(handle, CAFENUM::DBR_TIME) ; + } + + + //Always Return to Native DataType for now + if ( (pvgroup.pvdata[iMember].status=cafeGranules.channelVerifyGet(handle, + _chtype)) != ICAFE_NORMAL) { + //dbf_type_to_DBR_TIME (cdt))) != ICAFE_NORMAL) { + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + + //May not be connected - wish to report this here + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "CHANNEL: " << pvgroup.pvdata[iMember].pv << endl; + cafeStatus.report(pvgroup.pvdata[iMember].status); + continue; + } + + + // Examine the No of elements and set accordingly.... + if ( handleHelper.getNelemClient(handle) != pvgroup.pvdata[iMember].getNelem()) { + //handleHelper.setNelem(handle, pvgroup.pvdata[iMember].getNelem()); //Change made 17 March 2017 + + cout << "INFO: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Changing pvgroup.pvdata[iMember].nelem to that given in handleHelper.getNelemClient(handle)" << endl; + cout << "i.e., From: " << pvgroup.pvdata[iMember].nelem << " To: " << handleHelper.getNelemClient(handle) << endl; + pvgroup.pvdata[iMember].nelem=handleHelper.getNelemClient(handle); + } + + + if ( (pvgroup.pvdata[iMember].status=cafeGranules.channelPrepareGet(handle)) + != ICAFE_NORMAL) { + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, + change_sg_status(pvgroup.pvdata[iMember].status, iMember)); + if(MUTEX){cafeMutex.unlock();} + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(pvgroup.pvdata[iMember].status); + continue; + } + + } //for + + + + + gStatus=(*it_groupHandle).get(); + + channelTimeoutPolicySGGet = (*it_groupHandle).getChannelTimeoutPolicySGGet(); + + //this returns normal even if a channel is not connected + + if (gStatus!=ECA_NORMAL && channelTimeoutPolicySGGet.getSelfGoverningTimeout()) { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + + cafeStatus.report(gStatus); + if (gStatus == ECA_TIMEOUT) { + cout << "ENABLING AUTO- CORRECTIVE PROCEDURE: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + } + } + + + + unsigned short ntries=0; + double originalTimeOut=channelTimeoutPolicySGGet.getTimeout(); + + //Withdraw this test for now; not required + //if (ca_sg_test((*it_groupHandle).getGroupID()) == ECA_IOINPROGRESS ) { + // cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + // cafeStatus.report(ECA_IOINPROGRESS); + //} + + //Withdraw this test for now; not required + //while ( (ca_sg_test((*it_groupHandle).getGroupID()) == ECA_IOINPROGRESS + // || gStatus == ECA_TIMEOUT) && channelTimeoutPolicySGGet.getSelfGoverningTimeout() + // && ntries0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Changed SG GET from intitial " << originalTimeOut << " to: " << + (originalTimeOut + + channelTimeoutPolicySGGet.getDeltaTimeout()*ntries) + << " seconds after " << ntries << " sg_get calls " < &statusV, + vector &mpV){ +#define __METHOD__ "groupMonitorStart(groupHandle, &statusV, &mpV)" + + // open groupHandle + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + + unsigned int nGroupMember = (*it_groupHandle).getNMember(); + + vector handleV; + handleV.reserve(nGroupMember); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + // fill vector of member handles + for (unsigned int iMember = 0; iMember < nGroupMember; ++iMember) { + + it_handle = handle_index.find((*it_groupHandle).mHandle[iMember]); + + if (it_handle != handle_index.end()) { + handleV.push_back((*it_groupHandle).mHandle[iMember]); + } + else { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Invalid handle = " << (*it_groupHandle).mHandle[iMember] + << " for groupMember [" << iMember << "] " << endl; + continue; + } + } + // issue monitorStart command + return monitorStart(handleV, statusV, mpV); + } + else { + return ECAFE_INVALID_GROUP_HANDLE; + } + +#undef __METHOD__ +} + + +/** + * Starts a monitor on all PVs within the PVGroup object indentified by the groupHandle \n + * \param groupHandle input: handle to the group object + * \param statusV output: status of individual monitors + * \param monitorIDV output: vector of monitor ID (unsigned int) + * \return ECAFE_NORMAL if all OK else first error encountered + */ +int CAFE::groupMonitorStart(const unsigned int groupHandle, vector &statusV, + vector &monitorIDV) { +#define __METHOD__ "groupMonitorStart(groupHandle, &statusV, &monitorIDV)" + + // open groupHandle + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + + unsigned int nGroupMember = (*it_groupHandle).getNMember(); + + vector handleV; + handleV.reserve(nGroupMember); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + // fill vector of member handles + for (unsigned int iMember = 0; iMember < nGroupMember; ++iMember) { + + it_handle = handle_index.find((*it_groupHandle).mHandle[iMember]); + + if (it_handle != handle_index.end()) { + handleV.push_back((*it_groupHandle).mHandle[iMember]); + } + else { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Invalid handle = " << (*it_groupHandle).mHandle[iMember] + << " for groupMember [" << iMember << "] " << endl; + continue; + } + } + + // issue monitorStart command + return monitorStart(handleV, statusV, monitorIDV); + + } + else { + return ECAFE_INVALID_GROUP_HANDLE; + } +#undef __METHOD__ +} + + +/** + * Stops a monitor on all PVs within the PVGroup object indentified by the groupHandle \n + * \param groupHandle input: handle to the group object + * \param statusV output: status of individual monitor stop operations + * \return ECAFE_NORMAL if all OK else first error encountered + */ +int CAFE::groupMonitorStop (const unsigned int groupHandle, vector &statusV) { +#define __METHOD__ "groupMonitorStop(groupHandle, &statusV)" + + // open groupHandle + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + + unsigned int nGroupMember = (*it_groupHandle).getNMember(); + + vector handleV; + handleV.reserve(nGroupMember); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + // fill vector of member handles + for (unsigned int iMember = 0; iMember < nGroupMember; ++iMember) { + + it_handle = handle_index.find((*it_groupHandle).mHandle[iMember]); + + if (it_handle != handle_index.end()) { + handleV.push_back((*it_groupHandle).mHandle[iMember]); + } + else { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Invalid handle = " << (*it_groupHandle).mHandle[iMember] + << " for groupMember [" << iMember << "] " << endl; + continue; + } + } + + // issue monitorStart command + return monitorStop(handleV, statusV); + } + else { + return ECAFE_INVALID_GROUP_HANDLE; + } + +#undef __METHOD__ +} diff --git a/src/cafeService.cpp b/src/cafeService.cpp new file mode 100644 index 0000000..7b2fb36 --- /dev/null +++ b/src/cafeService.cpp @@ -0,0 +1,383 @@ +/// +/// \file cafeService.cpp +/// \author Jan Chrin, PSI +/// \date Release July: 2017 +/// \version CAFE 1.3.0 +/// + + +#include +#if HAVE_ZEROMQ +#include +#endif + +string globalZmqStream=""; +string contentsS=""; + +unsigned long nCBs=0; + +int CAFE::calcDBPMStatus(int statusDATA, int statusVALID, string valueVALID) { + + if (statusDATA != ICAFE_NORMAL) { + return statusDATA; + } + else if (statusVALID != ICAFE_NORMAL) { + return statusVALID; + } + else if ( valueVALID.compare("VALID")!=0) { + //cout << "calcDBPMStatus " << valueVALID << endl; + return ECAFE_BPM_DATA_IS_INVALID; + } + +return ICAFE_NORMAL; + +} + + + +int CAFE::prepareDBPM(vector &_glist, vector &_hV, std::vector &dev, std::vector &pos ) { + int localStatus=ICAFE_NORMAL; + + if (!CAFE::isCollection("cDBPM")) { + localStatus=CAFE::loadCollectionsFromXML("cNodes.xml"); + if (localStatus != ICAFE_NORMAL) {return localStatus;} + } + + + if (!CAFE::isGroup("gDBPM")) { + localStatus=CAFE::loadGroupsFromXML("gDBPM.xml"); + if (localStatus != ICAFE_NORMAL) {return localStatus;} + } + + CAFE::groupMemberList("gDBPM", _glist); + + CAFE::devicePositionV("cDBPM", dev, pos); + + /* + std::map::iterator iter; + std::map posDev; + + + CAFE::devicePositionMap("cDBPM", posDev); + + + for (iter =posDev.begin(); iter != posDev.end(); ++iter) { + //cout << "position= " << iter->first << " Dev " << iter->second << endl; + pos.push_back(iter->first) ; + dev.push_back(iter->second) ; + } + */ + + + CAFE::openPrepare(); + + CAFE::open(_glist, _hV); + + + CAFE::openNowAndWait(2.0); //wait for specified time, here 2.0 seconds + + //CAFE::printDisconnectedHandles(); + + + /* + for (int ij=0; ij<5; ++ij) { + + + if (!initCallbackComplete(_hV) ) { + cout << "Will wait for " << 1+ij << " SECONDS " << endl; + CAFE::openNowAndWait(1+ij); + } + } + */ + + + + + std::size_t found; + std::string attribute; + + vector statusV; + + + //CAFE::get(_hV, statusV); // do Get just to warm up + //CAFE::flushNow(); + + CAFE::openMonitorPrepare(); + + for (std::size_t i=0; i < _hV.size(); ++i) { + handleHelper.getChannelAttribute(_hV[i], attribute); + + found=attribute.find("VALID"); + + //if (found != std::string::npos) { + + if (handleHelper.getNmonitorData(_hV[i])==0) { + CAFE::monitorStart(_hV[i]); + + } + //} + } + + //Give plenty of time for all callback functions to report + CAFE::openMonitorNowAndWait(1.0); + + + return localStatus; +} + + + +int CAFE::prepareDBPM(vector &_glist, vector &_hV, std::map &posDev) { + int localStatus=ICAFE_NORMAL; + + if (!CAFE::isCollection("cDBPM")) { + localStatus=CAFE::loadCollectionsFromXML("cNodes.xml"); + if (localStatus != ICAFE_NORMAL) {return localStatus;} + } + + + + + if (!CAFE::isGroup("gDBPM")) { + localStatus=CAFE::loadGroupsFromXML("gDBPM.xml"); + if (localStatus != ICAFE_NORMAL) {return localStatus;} + } + + + + CAFE::groupMemberList("gDBPM", _glist); + + CAFE::openPrepare(); + CAFE::open(_glist, _hV); + + + //open BPM Reference + + CAFE::openNowAndWait(1.5); //wait for specified time, here 1.5 seconds + + std::size_t found; + std::string attribute; + + + CAFE::openMonitorPrepare(); + + for (std::size_t i=0; i < _hV.size(); ++i) { + handleHelper.getChannelAttribute(_hV[i], attribute); + + found=attribute.find("VALID"); + + //if (found != std::string::npos) { + + if (handleHelper.getNmonitorData(_hV[i])==0) { + CAFE::monitorStart(_hV[i]); + } + //} + } + + CAFE::openMonitorNowAndWait(1.5); + + + + std::map::iterator pos; + + CAFE::devicePositionMap("cDBPM", posDev); + + + + //for (pos =posDev.begin(); pos != posDev.end(); ++pos) { + // cout << "position= " << pos->first << " Dev " << pos->second << endl; + //} + + // cout << " END " << endl; + return localStatus; +} + + +int CAFE::readDBPMOffsets(DBPMKeeper &dbpm) { + + + vector hx; + vector hy; + + vector devOffsetX; + vector devOffsetY; + + devOffsetX.clear(); + devOffsetY.clear(); + devOffsetX.reserve(dbpm.device.size()); + devOffsetY.reserve(dbpm.device.size()); + + string devOffx=""; + string devOffy=""; + + for (size_t i=0; i statusV; + + + + int status1=CAFE::getScalars(hx, dbpm.offs_x, statusV); + + statusV.clear(); + int status2=CAFE::getScalars(hy, dbpm.offs_y, statusV); + + CAFE::closeHandles(hx); + + CAFE::closeHandles(hy); + + return max(status1, status2); + +} + +int CAFE::getDBPM(DBPMKeeper &dbpm) { + + + if(MUTEX){cafeMutex.lock();} + cout << "-------------------------------------------MUTEX LOCKED " << endl; + + dbpm.x.clear(); + dbpm.y.clear(); + dbpm.q.clear(); + dbpm.energy.clear(); + + dbpm.x.reserve(dbpm.nDBPM); + dbpm.y.reserve(dbpm.nDBPM); + dbpm.q.reserve(dbpm.nDBPM); + dbpm.energy.reserve(dbpm.nDBPM); + for (size_t i=0; i ICAFE_LINUX_ERROR) { + cout << "status from cafeService.cpp -------------------------------------------------> " << dbpm.status << endl; + } + #endif + } + + + + + dbpm.isAllXOK=true; + dbpm.isAllYOK=true; + dbpm.isAllQOK=true; + dbpm.isAllEOK=true; + dbpm.isAllOK =true; + + DBPMData ddx, ddy, ddq, dde; + + + for (size_t i=0; i & V){ + + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); + +}; +//6 +/** + * \brief get vector of dbr_double_t (double) + * \param _handle input: handle + * \param V output: vector of doubles + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5 +/** + * \brief get vector of dbr_long_t (long) + * \param _handle input: handle + * \param V output: vector of longs + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5 +/** + * \brief get vector of dbr_long_t (long) + * \param _handle input: handle + * \param V output: vector of longs + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5 +/** + * \brief get vector of long + * \param _handle input: handle + * \param V output: vector of longs + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5 +/** + * \brief get vector of longs + * \param _handle input: handle + * \param V output: vector of longs + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//4 +/** + * \brief get vector of dbr_char_t (unsigned char) + * \param _handle input: handle + * \param V output: vector of unsigned char + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//4 +/** + * \brief get vector of unsigned dbr_char_t (unsigned char) + * \param _handle input: handle + * \param V output: vector of unsigned char + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//3 +/** + * \brief get vector of dbr_enum_t (unsigned short) + * \param _handle input: handle + * \param V output: vector of unsigned short + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//3 +/** + * \brief get vector of dbr_enum_t (unsigned short) + * \param _handle input: handle + * \param V output: vector of unsigned shorts + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//2 +/** + * \brief get vector of dbr_float_t (float) + * \param _handle input: handle + * \param V output: vector of floats + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//2 +/** + * \brief get vector of dbr_float_t (float) + * \param _handle input: handle + * \param V output: vector of floats + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//1 +/** + * \brief get vector of dbr_short_t (short) + * \param _handle input: handle + * \param V output: vector of shorts + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//1 +/** + * \brief get vector of dbr_short_t (short) + * \param _handle input: handle + * \param V output: vector of shorts + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//0 +/** + * \brief get vector of string + * \param _handle input: handle + * \param V output: vector of string + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//0 +/** + * \brief get vector of strings + * \param _handle input: handle + * \param V output: vector of strings + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL if all OK + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return get(_handle, V, alarmStatus, alarmSeverity, ts); +}; + + +//6 +/** + * \brief get vector of doubles + * \param _handle input: handle + * \param V output: vector of doubles + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + + V.clear(); + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + unsigned int nelemThatWillBeRequested=(*it_handle).getChannelRegalia().getNelem(); + + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + + + if ((*it_handle).getChannelRegalia().getNelem()>1) { + + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + } + + V.reserve(nelemThatWillBeRequested); + + + double * val = new double [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + + status=cafeDoppio.get (_handle, DBR_DOUBLE, val); + + case CAFENUM::DBR_STS: + status=cafeDoppio.get (_handle, DBR_STS_DOUBLE, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeDoppio.get (_handle, DBR_TIME_DOUBLE, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + //(*it_handle).getChannelRequestMetaData().getNelem() <<=nelemThatWillBeRequested + + //for (unsigned short i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + // V.push_back(val[i]); + //} + + V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + + delete val; + + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + +//5 +/** + * \brief get vector of dbr_long_t + * \param _handle input: handle + * \param V output: vector of longs + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + unsigned int nelemThatWillBeRequested= (*it_handle).getChannelRegalia().getNelem(); + + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + } + + V.reserve(nelemThatWillBeRequested); + + dbr_long_t * val = new dbr_long_t [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeLatte.get (_handle, DBR_LONG, val); + break; + case CAFENUM::DBR_STS: + status=cafeLatte.get (_handle, DBR_STS_LONG, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeLatte.get (_handle, DBR_TIME_LONG, val, alarmStatus, alarmSeverity, ts); + break; + } + + vectorDbrType=CAFENUM::DBR_NONE; + + if (status==ICAFE_NORMAL) { + + //for (unsigned short i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + // V.push_back(val[i]); + //} + + V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + + +//5 +/** + * \brief get vector of longs + * \param _handle input: handle + * \param V output: vector of longs + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + +#define __METHOD__ \ + "CAFE::get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)" + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + ChannelRegalia channelInfo; + CAFE::getChannelInfo(_handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + + unsigned int nelemThatWillBeRequested= (*it_handle).getChannelRegalia().getNelem(); + + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + } + + V.reserve(nelemThatWillBeRequested); + + + if ( channelInfo.getDataType() == DBR_STRING) { + + dbr_string_t * val = new dbr_string_t[nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeSoluble.get (_handle, DBR_STRING, val); + break; + case CAFENUM::DBR_STS: + status=cafeSoluble.get (_handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeSoluble.get (_handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts); + break; + } + + + if (status==ICAFE_NORMAL) { + + istringstream ss; + bool allStringsAreValid=true; + + + for (unsigned short i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + long long l=0; + ss.clear(); + ss.str(val[i]); + ss>>l; + + if ( !ss.fail()) { + V.push_back(l); + std::string strInput=val[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << (*it_handle).getChannelRequestMetaData().getNelem() << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << " DATA POINT OMITTED. LENGTH OF RETURNING VECTOR WILL BE DIFFERENT TO EXPECTED "<< endl; + allStringsAreValid=false; + } + } + + if(!allStringsAreValid) { + cout << "----------------------------------------------------------------" << endl; + cout << "NOT ALL ELEMENTS OF STRING ARRAY COULD BE CONVERTED TO LONG LONG " << endl; + cout << "THESE HAVE A VALUE OF ZERO IN PLACE OF STRING VALUE " << endl; + cout << "----------------------------------------------------------------" << endl; + // cout << " RETURNING VECTOR HAS LENGTH " << V.size() << " RATHER THAN THE EXPECTED " << + // (*it_handle).getChannelRequestMetaData().getNelem() << endl; + } + + } + + delete val; + } + + + else if ( channelInfo.getDataType() == DBR_DOUBLE) { + + dbr_double_t * val = new dbr_double_t[nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeDoppio.get (_handle, DBR_DOUBLE, val); + break; + case CAFENUM::DBR_STS: + status=cafeDoppio.get (_handle, DBR_STS_DOUBLE, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeDoppio.get (_handle, DBR_TIME_DOUBLE, val, alarmStatus, alarmSeverity, ts); + break; + } + + if (status==ICAFE_NORMAL) { + + for (unsigned short i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + V.push_back((long long) val[i]); + } + + //V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + } + else if ( channelInfo.getDataType() == DBR_FLOAT) { + + dbr_float_t * val = new dbr_float_t[nelemThatWillBeRequested]; + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeFrappuccino.get (_handle, DBR_FLOAT, val); + break; + case CAFENUM::DBR_STS: + status=cafeFrappuccino.get (_handle, DBR_STS_FLOAT, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeFrappuccino.get (_handle, DBR_TIME_FLOAT, val, alarmStatus, alarmSeverity, ts); + break; + } + + if (status==ICAFE_NORMAL) { + + for (unsigned short i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + V.push_back((long long) val[i]); + } + //V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + } + + + else { + + dbr_long_t * val = new dbr_long_t [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeLatte.get (_handle, DBR_LONG, val); + break; + case CAFENUM::DBR_STS: + status=cafeLatte.get (_handle, DBR_STS_LONG, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeLatte.get (_handle, DBR_TIME_LONG, val, alarmStatus, alarmSeverity, ts); + break; + } + + if (status==ICAFE_NORMAL) { + + for (unsigned short i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + V.push_back((long long) val[i]); + } + //V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + + } + + vectorDbrType=CAFENUM::DBR_NONE; + + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +#undef __METHOD__ +}; + + +//4 +/** + * \brief get vector of unsigned char + * \param _handle input: handle + * \param V output: vector of unsigned char + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + unsigned int nelemThatWillBeRequested= (*it_handle).getChannelRegalia().getNelem(); + + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + } + + V.reserve(nelemThatWillBeRequested); + + unsigned char * val = new unsigned char [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeCappuccino.get (_handle, DBR_CHAR, val); + cout << "status=cafeCappuccino.get (_handle, DBR_CHAR, val) " << endl; + break; + case CAFENUM::DBR_STS: + status=cafeCappuccino.get (_handle, DBR_STS_CHAR, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeCappuccino.get (_handle, DBR_TIME_CHAR, val, alarmStatus, alarmSeverity, ts); + cout << "status=cafeCappuccino.get (_handle, DBR_CHAR,val, alarmStatus, alarmSeverity, ts);" + << endl; + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + if (status==ICAFE_NORMAL) { + + for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + V.push_back(val[i]); + } + //V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + + +//3 +/** + * \brief get vector of unsigned shorts (enums) + * \param _handle input: handle + * \param V output: vector of unsigned shorts (enum) + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + unsigned int nelemThatWillBeRequested= (*it_handle).getChannelRegalia().getNelem(); + + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + } + + V.reserve(nelemThatWillBeRequested); + + unsigned short * val = new unsigned short [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeEspresso.get (_handle, DBR_ENUM, val); + break; + case CAFENUM::DBR_STS: + status=cafeEspresso.get (_handle, DBR_STS_ENUM, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeEspresso.get (_handle, DBR_TIME_ENUM, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + + //for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + // V.push_back(val[i]); + //} + V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + +//2 +/** + * \brief get vector of floats + * \param _handle input: handle + * \param V output: vector of floats + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + unsigned int nelemThatWillBeRequested= (*it_handle).getChannelRegalia().getNelem(); + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + + } + + V.reserve(nelemThatWillBeRequested); + + float * val = new float [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + + status=cafeFrappuccino.get (_handle, DBR_FLOAT, val); + + break; + case CAFENUM::DBR_STS: + status=cafeFrappuccino.get (_handle, DBR_STS_FLOAT, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeFrappuccino.get (_handle, DBR_TIME_FLOAT, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + + //for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + // V.push_back(val[i]); + //} + V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + + +//1 +/** + * \brief get vector of shorts + * \param _handle input: handle + * \param V output: vector of shorts + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + unsigned int nelemThatWillBeRequested=(*it_handle).getChannelRegalia().getNelem(); + + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + } + + V.reserve(nelemThatWillBeRequested); + + short * val = new short [nelemThatWillBeRequested]; + + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeSchale.get (_handle, DBR_SHORT, val); + break; + case CAFENUM::DBR_STS: + status=cafeSchale.get (_handle, DBR_STS_SHORT, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeSchale.get (_handle, DBR_TIME_SHORT, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + //(*it_handle).getChannelRequestMetaData().getNelem() <<=nelemThatWillBeRequested + for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + V.push_back(val[i]); + } + // V.insert(V.end(), &val[0], &val[(*it_handle).getChannelRequestMetaData().getNelem()]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + + +//0 +/** + * \brief get vector of strings + * \param _handle input: handle + * \param V output: vector of strings + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::get(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + unsigned int nelemThatWillBeRequested=(*it_handle).getChannelRegalia().getNelem(); + + //Reserve only what will be in the buffer. + //Lets calculate this + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( (*it_handle).getChannelRegalia().getNelem() + != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + + nelemThatWillBeRequested= min( (*it_handle).getChannelRegalia().getNelem(), + (*it_handle).getChannelRequestMetaDataClient().getNelem()); + } + } + + + V.reserve(nelemThatWillBeRequested); + + dbr_string_t * vals = new dbr_string_t [nelemThatWillBeRequested]; + + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeSoluble.get (_handle, DBR_STRING, vals); + break; + case CAFENUM::DBR_STS: + status=cafeSoluble.get (_handle, DBR_STS_STRING, vals, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeSoluble.get (_handle, DBR_TIME_STRING, vals, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + //(*it_handle).getChannelRequestMetaData().getNelem() <<=nelemThatWillBeRequested + for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + V.push_back(vals[i]); + } + // V.insert(V.end(), &vals[0], &vals[(*it_handle).getChannelRequestMetaData().getNelem()]); + + } + + delete vals; + return status; + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + } + +///////////////////////////// getCache ///////////////////////////////////// + +//6 +/** + * \brief get cached vector of doubles + * \param _handle input: handle + * \param V output: vector of doubles + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//6 +/** + * \brief get cached vector of doubles, alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of doubles + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5 +/** + * \brief get cached vector of dbr_long_t + * \param _handle input: handle + * \param V output: vector of dbr_long_t + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5 +/** + * \brief get cached vector of dbr_long_t, alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of dbr_long_t + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5+ +/** + * \brief get cached vector of long long + * \param _handle input: handle + * \param V output: vector of long long + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//5+ +/** + * \brief get cached vector of long long, alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of long long + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//4 +/** + * \brief get cached vector of unsigned char + * \param _handle input: handle + * \param V output: vector of unsigned char + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//4 +/** + * \brief get cached vector of unsigned char alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of dbr_long_t + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//3 +/** + * \brief get cached vector of unsigned short + * \param _handle input: handle + * \param V output: vector of unsigned short + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//3 +/** + * \brief get cached vector of unsigned short, alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of dbr_long_t + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//2 +/** + * \brief get cached vector of float + * \param _handle input: handle + * \param V output: vector of float + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//2 +/** + * \brief get cached vector of float, alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of dbr_long_t + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//1 +/** + * \brief get cached vector of short + * \param _handle input: handle + * \param V output: vector of short + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//1 +/** + * \brief get cached vector of short, alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of short + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//0 +/** + * \brief get cached vector of string + * \param _handle input: handle + * \param V output: vector of string + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V){ + dbr_short_t alarmStatus; dbr_short_t alarmSeverity; epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_PRIMITIVE; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; +//0 +/** + * \brief get cached vector of string, alarmStatus, alarmSeverity + * \param _handle input: handle + * \param V output: vector of string + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity){ + epicsTimeStamp ts; + alarmStatus=0; alarmSeverity=0; ts.secPastEpoch=0; ts.nsec=0; + vectorDbrType=CAFENUM::DBR_STS; + return getCache(_handle, V, alarmStatus, alarmSeverity, ts); +}; + + +//6 +/** + * \brief get cached vector of doubles, alarm status/severity and epicsTimeStamp + * \param _handle input: handle + * \param V output: vector of doubles + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + + V.reserve(nelemThatWillBeRequested); + + + double * val = new double [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeDoppio.getCache (_handle, DBR_DOUBLE, val); + break; + case CAFENUM::DBR_STS: + status=cafeDoppio.getCache (_handle, DBR_STS_DOUBLE, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeDoppio.getCache (_handle, DBR_TIME_DOUBLE, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + if (status==ICAFE_NORMAL) { + // for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + // V.push_back(val[i]); + // } + V.insert(V.end(), &val[0], &val[nelemThatWillBeRequested]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + +//5 +/** + * \brief get vector of cached dbr_long_t, alarm status/severity and epicsTimeStamp + * \param _handle input: handle + * \param V output: vector of dbr_long_t + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + + V.reserve(nelemThatWillBeRequested); + + dbr_long_t * val = new dbr_long_t [nelemThatWillBeRequested]; + + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeLatte.getCache (_handle, DBR_LONG, val); + break; + case CAFENUM::DBR_STS: + status=cafeLatte.getCache (_handle, DBR_STS_LONG, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeLatte.getCache (_handle, DBR_TIME_LONG, val, alarmStatus, alarmSeverity, ts); + break; + } + + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + //for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + // V.push_back(val[i]); + // } + V.insert(V.end(), &val[0], &val[nelemThatWillBeRequested]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + +//5+ +/** + * \brief get vector of long lonsg, alarm status/severity and epicsTimeStamp + * \param _handle input: handle + * \param V output: vector of long longs + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ +#define __METHOD__ \ + "CAFE::getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)" + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + V.reserve(nelemThatWillBeRequested); + + //What is the native type? + if ( (*it_handle).getChannelRequestMetaData().getDataType() == DBR_STRING) { + + dbr_string_t * val = new dbr_string_t[nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeSoluble.getCache (_handle, DBR_STRING, val); + break; + case CAFENUM::DBR_STS: + status=cafeSoluble.getCache (_handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeSoluble.getCache (_handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts); + break; + } + + if (status==ICAFE_NORMAL) { + istringstream ss; + bool allStringsAreValid=true; + + for (unsigned short i=0; i>l; + + if ( !ss.fail()) { + V.push_back(l); + std::string strInput=val[i]; + std::stringstream ssOut; + ssOut << l; + std::string strOutput=ssOut.str(); + if (strInput!=strOutput) { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** STRING TO LONG LONG CONVERSION REPORTS: " << endl; + cout << "STRING VALUE: " << strInput << " CONVERTED TO: " << strOutput << endl; + } + } + else { + cout << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO LONG LONG CONVERSION for ELEMENT " << i \ + << " of " << (*it_handle).getChannelRequestMetaData().getNelem() << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO LONG LONG ; CONVERSION NOT MADE!" << endl; + cout << " DATA POINT OMITTED. LENGTH OF RETURNING VECTOR WILL BE DIFFERENT TO EXPECTED "<< endl; + allStringsAreValid=false; + } + } + + if(!allStringsAreValid) { + cout << "----------------------------------------------------------------" << endl; + cout << "NOT ALL ELEMENTS OF STRING ARRAY COULD BE CONVERTED TO LONG LONG " << endl; + cout << "THESE HAVE A VALUE OF ZERO IN PLACE OF STRING VALUE " << endl; + cout << "----------------------------------------------------------------" << endl; + // cout << " RETURNING VECTOR HAS LENGTH " << V.size() << " RATHER THAN THE EXPECTED " << + // (*it_handle).getChannelRequestMetaData().getNelem() << endl; + } + } + delete val; + } + + + else if ( (*it_handle).getChannelRequestMetaData().getDataType() == DBR_DOUBLE) { + + dbr_double_t * val = new dbr_double_t[nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeDoppio.getCache (_handle, DBR_DOUBLE, val); + break; + case CAFENUM::DBR_STS: + status=cafeDoppio.getCache (_handle, DBR_STS_DOUBLE, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeDoppio.getCache (_handle, DBR_TIME_DOUBLE, val, alarmStatus, alarmSeverity, ts); + break; + } + + if (status==ICAFE_NORMAL) { + for (unsigned short i=0; i & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + V.reserve(nelemThatWillBeRequested); + + unsigned char * val = new unsigned char [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeCappuccino.getCache (_handle, DBR_CHAR, val); + break; + case CAFENUM::DBR_STS: + status=cafeCappuccino.getCache (_handle, DBR_STS_CHAR, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeCappuccino.getCache (_handle, DBR_TIME_CHAR, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + for (unsigned int i=0; i & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + V.reserve(nelemThatWillBeRequested); + + unsigned short * val = new unsigned short [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeEspresso.getCache (_handle, DBR_ENUM, val); + break; + case CAFENUM::DBR_STS: + status=cafeEspresso.getCache (_handle, DBR_STS_ENUM, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeEspresso.getCache (_handle, DBR_TIME_ENUM, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + //for (unsigned int i=0; i<(*it_handle).getChannelRequestMetaData().getNelem(); ++i) { + // V.push_back(val[i]); + //} + V.insert(V.end(), &val[0], &val[nelemThatWillBeRequested]); + } + + delete val; + return status; + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } +}; + +//2 +/** + * \brief get cached vector of floats, alarm status/severity and epicsTimeStamp + * \param _handle input: handle + * \param V output: vector of floats + * \param alarmStatus output: NO_ALARM, READ, WRITE, HIHI, HIGH, READ_ACCESS, \n + * LOLO, LOW, STATE, COS, COMM, WRITE_ACCESS, TIMEOUT, HWLIMIT, CALC,\n + * SCAN, LINK, SOFT, BAD_SUB, UDF, DISABLE, SIMM + * \param alarmSeverity output: NO_ALARM, MINOR, MAJOR, INVALID + * \param ts output: epicsTimeStamp ts.secPastEpoch, ts.nsec + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int CAFE::getCache(const unsigned int _handle, vector & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + V.reserve(nelemThatWillBeRequested); + + //cout << "nelemThatWillBeRequested " << nelemThatWillBeRequested << endl; + //cout << "data cache " << (*it_handle).getChannelRequestMetaData().getNelemCache() << endl; + //cout << "client nelem " << (*it_handle).getChannelRequestMetaDataClient().getNelem() << endl; + //cout << "client cache " << (*it_handle).getChannelRequestMetaDataClient().getNelemCache() << endl; + + float * val = new float [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeFrappuccino.getCache(_handle, DBR_FLOAT, val); + break; + case CAFENUM::DBR_STS: + status=cafeFrappuccino.getCache(_handle, DBR_STS_FLOAT, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeFrappuccino.getCache(_handle, DBR_TIME_FLOAT, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + + if (status==ICAFE_NORMAL) { + for (unsigned int i=0; i & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + + V.reserve(nelemThatWillBeRequested); + + short * val = new short [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeSchale.getCache (_handle, DBR_SHORT, val); + break; + case CAFENUM::DBR_STS: + status=cafeSchale.getCache (_handle, DBR_STS_SHORT, val, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeSchale.getCache (_handle, DBR_TIME_SHORT, val, alarmStatus, alarmSeverity, ts); + break; + } + vectorDbrType=CAFENUM::DBR_NONE; + + if (status==ICAFE_NORMAL) { + for (unsigned int i=0; i & V, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts){ + + V.clear(); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + //Reserve only what will be in the request data buffer. + unsigned int nelemThatWillBeRequested= + min((*it_handle).getChannelRequestMetaData().getNelem(),(*it_handle).getChannelRequestMetaData().getNelemCache()); + + + V.reserve(nelemThatWillBeRequested); + + dbr_string_t * vals = new dbr_string_t [nelemThatWillBeRequested]; + + if(vectorDbrType==CAFENUM::DBR_NONE) {vectorDbrType=CAFENUM::DBR_TIME;}; + switch (vectorDbrType) { + case CAFENUM::DBR_PRIMITIVE: + status=cafeSoluble.getCache (_handle, DBR_STRING, vals); + break; + case CAFENUM::DBR_STS: + status=cafeSoluble.getCache (_handle, DBR_STS_STRING, vals, alarmStatus, alarmSeverity); + break; + case CAFENUM::DBR_TIME: + default: + status=cafeSoluble.getCache (_handle, DBR_TIME_STRING, vals, alarmStatus, alarmSeverity, ts); + break; + } + + vectorDbrType=CAFENUM::DBR_NONE; + + if (status==ICAFE_NORMAL) { + for (unsigned int i=0; i handleV, vector &statusV) { + int overallStatus=ICAFE_NORMAL; + bool isGood=true; + + statusV.clear(); + statusV.reserve(handleV.size()); + + for (unsigned int i=0; i0) { + statusV.push_back(ICAFE_NORMAL); // ICAFE_HAS_MONITOR_GET_DONE_FROM_CACHE); + } + else { + statusV.push_back(get(handleV[i])); + } + if ( (statusV[i] != ICAFE_NORMAL) && isGood) { + overallStatus=statusV[i]; + isGood=false; + } + } + //ca_flush_io(); + return overallStatus; // report first failure in return statement +} + + +//0 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//1 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//2 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//3 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//4 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//5 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//5 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//6 +int CAFE::getCache(vector handleV, vector & V, vector &statusV) { + vector alarmStatusV; vector alarmSeverityV; vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; + +//0 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//1 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//2 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//3 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//4 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//5 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; +//5 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; + +//6 +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV){ + vector tsV; + return getCache(handleV, V, statusV, alarmStatusV, alarmSeverityV, tsV); +}; + +//0 +/** + * \brief get cached vector of strings + * \param handleV input: vector of handles + * \param V output: vector of strings + * \param statusV output: vector of longs + * \param alarmStatusV output: vector of alarm status + * \param alarmSeverityV output: vecor of alarm severity + * \param tsV output: vector of EpicsTimeStamp + * \return overallStatus is ICAFE_NORMAL or report of first failure + */ +int CAFE::getCache(vector handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + //unsigned int * h = new unsigned int [handleV.size()]; + dbr_string_t * value = new dbr_string_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + // unsigned int * h = new unsigned int [handleV.size()]; + dbr_short_t * value = new dbr_short_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + //unsigned int * h = new unsigned int [handleV.size()]; + dbr_float_t * value = new dbr_float_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + unsigned int * h = new unsigned int [handleV.size()]; + dbr_enum_t * value = new dbr_enum_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + //unsigned int * h = new unsigned int [handleV.size()]; + dbr_char_t * value = new dbr_char_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + //unsigned int * h = new unsigned int [handleV.size()]; + dbr_long_t * value = new dbr_long_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + //unsigned int * h = new unsigned int [handleV.size()]; + dbr_long_t * value = new dbr_long_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i handleV, vector & V, vector &statusV, + vector &alarmStatusV, vector &alarmSeverityV, + vector &tsV){ + + int overallStatus=ICAFE_NORMAL; + + V.clear(); statusV.clear(); alarmStatusV.clear(); alarmSeverityV.clear(); tsV.clear(); + + V.reserve(handleV.size()); statusV.reserve(handleV.size()); + alarmStatusV.reserve(handleV.size()); alarmSeverityV.reserve(handleV.size()); + tsV.reserve(handleV.size()); + + //unsigned int * h = new unsigned int [handleV.size()]; + dbr_double_t * value = new dbr_double_t [handleV.size()]; + int * stats = new int [handleV.size()]; + dbr_short_t * astat = new dbr_short_t [handleV.size()]; + dbr_short_t * asev = new dbr_short_t [handleV.size()]; + epicsTimeStamp *ets = new epicsTimeStamp [handleV.size()]; + + for (unsigned int i=0; i V) { + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + unsigned int nelemThatWillBeRequested= V.size(); + unsigned int nelemPrevious=nelemThatWillBeRequested; + //Check the number of elements requested? + //JC 25/6/15 Cython must also handle a list of 1! + //if (nelemThatWillBeRequested>1) { + //What did the client request? What is native type? Transfer minimum of this. + if (nelemThatWillBeRequested != (*it_handle).getChannelRequestMetaDataClient().getNelem()){ + nelemPrevious=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + nelemThatWillBeRequested= handleHelper.setNelem(_handle, nelemThatWillBeRequested); + } + //} + dbr_string_t * val = new dbr_string_t [nelemThatWillBeRequested]; + + for (unsigned int i=0; i V) { + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + unsigned int nelemThatWillBeRequested= V.size(); + unsigned int nelemPrevious=nelemThatWillBeRequested; + //Check the number of elements requested? + //JC 25/6/15 Cython must also handle a list of 1! + //if (nelemThatWillBeRequested>1) { + //What did the client request? What is native type? Transfer minimum of this. + if (nelemThatWillBeRequested != (*it_handle).getChannelRequestMetaDataClient().getNelem()){ + nelemPrevious=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + nelemThatWillBeRequested= handleHelper.setNelem(_handle, nelemThatWillBeRequested); + } + //} + dbr_short_t * val = new dbr_short_t [nelemThatWillBeRequested]; + if (V.size()==nelemThatWillBeRequested) { + std::copy(V.begin(), V.end(), val); + } + else {for (unsigned int i=0; i V) { + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + unsigned int nelemThatWillBeRequested= V.size(); + unsigned int nelemPrevious=nelemThatWillBeRequested; + //Check the number of elements requested? + //JC 25/6/15 Cython must also handle a list of 1! + //if (nelemThatWillBeRequested>1) { + //What did the client request? What is native type? Transfer minimum of this. + if (nelemThatWillBeRequested != (*it_handle).getChannelRequestMetaDataClient().getNelem()){ + nelemPrevious=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + nelemThatWillBeRequested= handleHelper.setNelem(_handle, nelemThatWillBeRequested); + } + //} + dbr_float_t * val = new dbr_float_t [nelemThatWillBeRequested]; + if (V.size()==nelemThatWillBeRequested) { + std::copy(V.begin(), V.end(), val); + } + else {for (unsigned int i=0; i V) { + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + unsigned int nelemThatWillBeRequested= V.size(); + unsigned int nelemPrevious=nelemThatWillBeRequested; + //Check the number of elements requested? + //JC 25/6/15 Cython must also handle a list of 1! + //if (nelemThatWillBeRequested>1) { + //What did the client request? What is native type? Transfer minimum of this. + if (nelemThatWillBeRequested != (*it_handle).getChannelRequestMetaDataClient().getNelem()){ + nelemPrevious=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + nelemThatWillBeRequested= handleHelper.setNelem(_handle, nelemThatWillBeRequested); + } + //} + dbr_enum_t * val = new dbr_enum_t [nelemThatWillBeRequested]; + if (V.size()==nelemThatWillBeRequested) { + std::copy(V.begin(), V.end(), val); + } + else {for (unsigned int i=0; i V) { + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + unsigned int nelemThatWillBeRequested= V.size(); + unsigned int nelemPrevious=nelemThatWillBeRequested; + //Check the number of elements requested? + //JC 25/6/15 Cython must also handle a list of 1! + //if (nelemThatWillBeRequested>1) { + //What did the client request? What is native type? Transfer minimum of this. + if (nelemThatWillBeRequested != (*it_handle).getChannelRequestMetaDataClient().getNelem()){ + nelemPrevious=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + nelemThatWillBeRequested= handleHelper.setNelem(_handle, nelemThatWillBeRequested); + } + //} + dbr_char_t * val = new dbr_char_t [nelemThatWillBeRequested]; + if (V.size()==nelemThatWillBeRequested) { + std::copy(V.begin(), V.end(), val); + } + else {for (unsigned int i=0; i V) { + //What is the native data type? + + ChannelRegalia channelInfo; + CAFE::getChannelInfo(_handle, channelInfo); + if ( channelInfo.getCafeConnectionState() == ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + + switch ( channelInfo.getDataType()) { + + case DBR_DOUBLE: + { + //cpy vector + vector Vl; Vl.clear(); Vl.reserve(V.size()); + Vl.assign(V.begin(), V.end()); + return set(_handle, Vl); + } + case DBR_FLOAT: + { + //cpy vector + vector Vl; Vl.clear(); Vl.reserve(V.size()); + Vl.assign(V.begin(), V.end()); + return set(_handle, Vl); + } + case DBR_LONG: + { + //cpy vector + vector Vl; Vl.clear(); Vl.reserve(V.size()); + Vl.assign(V.begin(), V.end()); + return set(_handle, Vl); + } + case DBR_SHORT: + { + //cpy vector + vector Vl; Vl.clear(); Vl.reserve(V.size()); + Vl.assign(V.begin(), V.end()); + return set(_handle, Vl); + } + case DBR_ENUM: + { + //cpy vector + vector Vl; Vl.clear(); Vl.reserve(V.size()); + Vl.assign(V.begin(), V.end()); + return set(_handle, Vl); + } + case DBR_CHAR: + { + //cpy vector + vector Vl; Vl.clear(); Vl.reserve(V.size()); + Vl.assign(V.begin(), V.end()); + return set(_handle, Vl); + } + case DBR_STRING: + default: + { + vector Vl; Vl.clear(); Vl.reserve(V.size()); + std::stringstream ss; + + for (unsigned int i=0; i< V.size(); ++i) { + ss.clear(); + ss << V[i]; + Vl.push_back(ss.str()); + } + return set(_handle, Vl); + break; + } + }//switch +} +//5 +/** + * \brief set vector of dbr_long_t (int) + * \param _handle input: handle + * \param V input: vector of longs + * \return ICAFE_NORMAL if all OK + */ +int CAFE::set(const unsigned int _handle, vector V) { + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + unsigned int nelemThatWillBeRequested= V.size(); + unsigned int nelemPrevious=nelemThatWillBeRequested; + //Check the number of elements requested? + + //JC 25/6/15 Cython must also handle a list of 1! + //if (nelemThatWillBeRequested>1) { + //What did the client request? What is native type? Transfer minimum of this. + if (nelemThatWillBeRequested != (*it_handle).getChannelRequestMetaDataClient().getNelem()){ + nelemPrevious=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + nelemThatWillBeRequested= handleHelper.setNelem(_handle, nelemThatWillBeRequested); + } + //} + + + dbr_long_t * val = new dbr_long_t [nelemThatWillBeRequested]; + if (V.size()==nelemThatWillBeRequested) { + std::copy(V.begin(), V.end(), val); + } + else {for (unsigned int i=0; i V) { + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + unsigned int nelemThatWillBeRequested= V.size(); + unsigned int nelemPrevious=nelemThatWillBeRequested; + //Check the number of elements requested? + //JC 25/6/15 Cython must also handle a list of 1! + //if (nelemThatWillBeRequested>1) { + //What did the client request? What is native type? Transfer minimum of this. + if ( nelemThatWillBeRequested != (*it_handle).getChannelRequestMetaDataClient().getNelem()) { + nelemPrevious=(*it_handle).getChannelRequestMetaDataClient().getNelem(); + nelemThatWillBeRequested= handleHelper.setNelem(_handle, nelemThatWillBeRequested); + } + //} + double * val = new double [nelemThatWillBeRequested]; + if (V.size()==nelemThatWillBeRequested) { + std::copy(V.begin(), V.end(), val); + } + else { + for (unsigned int i=0; i handleV, PVDataHolder * pvd) { + int overallStatus=ICAFE_NORMAL; + unsigned int * h = new unsigned int [handleV.size()]; + for (unsigned int i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + dbr_string_t * value = new dbr_string_t [handleV.size()]; + int * stats = new int [handleV.size()]; + for (size_t i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); + statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + dbr_short_t * value = new dbr_short_t [handleV.size()]; + int * stats = new int [handleV.size()]; + for (unsigned int i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + dbr_float_t * value = new dbr_float_t [handleV.size()]; + int * stats = new int [handleV.size()]; + for (unsigned int i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + dbr_enum_t * value = new dbr_enum_t [handleV.size()]; + int * stats = new int [handleV.size()]; + for (unsigned int i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + dbr_char_t * value = new dbr_char_t [handleV.size()]; + int * stats = new int [handleV.size()]; + for (unsigned int i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + dbr_long_t * value = new dbr_long_t [handleV.size()]; + int * stats = new int [handleV.size()]; + for (unsigned int i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + long long * value = new long long [handleV.size()]; + int * stats = new int [handleV.size()]; + for (unsigned int i=0; i handleV, vector V, vector &statusV){ + int overallStatus=ICAFE_NORMAL; + statusV.clear(); statusV.reserve(handleV.size()); + unsigned int * h = new unsigned int [handleV.size()]; + dbr_double_t * value = new dbr_double_t [handleV.size()]; + int * stats = new int [handleV.size()]; + for (unsigned int i=0; i +#include +#include +#include "cafe.h" + +#include + + + + +#include "loadCollectionXMLParser.h" +#include "loadGroupXMLParser.h" +#include "restorePVGroupXMLParser.h" + +#if HAVE_LIBQTXML + + +using namespace boost::posix_time; + +/** + * \brief loadCollections from XML \n + * Routine first searches the given directory before CAFE_XML_PATH environment variable + * \param collectionFile input: name of collection file + * \return ICAFE_NORMAL if OK else ECAFE_LOAD_COLLECTION; + */ +int CAFE::loadCollectionsFromXML(const char * collectionFile) { + #define __METHOD__ "CAFE::loadCollectionsFromXML(char * collectionFile)" + + //First check for existence of file in current directory + //before searching in CAFE_XML_PATH + + QFile * file; + + file = new QFile(collectionFile); + + if (!file->exists()) { + + std::string envS; + char * env = getenv("CAFE_XML_PATH"); + env == NULL ? envS=std::string(".") : envS=std::string(env); + envS.append("/"); //("/Collections/"); + envS.append(collectionFile); + + file = new QFile(envS.c_str()); + + if (!file->exists()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "envS=" << envS << endl; + cout << "COLLECTION FILE " << collectionFile << " NOT FOUND " << endl; + cout << "IN THE CURRENT (OR GIVEN) DIRECTORY" << endl; + if (env != NULL) { + cout << "NOR IN CAFE_XML_PATH/=" << endl; + cout << env << endl; + } + else { + cout << "OPTIONAL ENVIRONMENT VARIABLE CAFE_XML_PATH IS UNDEFINED" << endl; + } + delete file; + return ECAFE_LOAD_COLLECTION; + } + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << " COLLECTION LOADED FROM CURRENT (OR GIVEN) DIRECTORY" << endl; + } + + loadCollectionXMLParser handler; + + QXmlInputSource source(file); + QXmlSimpleReader reader; + reader.setContentHandler(&handler); + reader.setFeature("http://trolltech.com/xml/features/report-whitespace-only-CharData", false); + + bool isOK = reader.parse(source); + + if (!isOK) { + return ECAFE_LOAD_COLLECTION; + } + deviceCollectionV=handler.deviceCollectionV; + + //cout << deviceCollectionV[0].getCMembers()[0].devicePosition << endl; + //cout << deviceCollectionV[1].getCMembers()[0].devicePosition << endl; + + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + +/** + * \brief loadGroups from XML \n + * Routine first searches the given directory before CAFE_XML_PATH environment variable + * \param groupFile input: name of group file + * \return ICAFE_NORMAL if OK else ECAFE_LOAD_GROUP; + */ +int CAFE::loadGroupsFromXML (const char * groupFile) { +#define __METHOD__ "CAFE::loadGroupsFromXML(char * groupFile)" + + int localStatus=ICAFE_NORMAL; + + QFile * file; + file = new QFile(groupFile); + + if (!file->exists()) { + + std::string envS; + char * env = getenv("CAFE_XML_PATH"); + env == NULL ? envS=std::string(".") : envS=std::string(env); + envS.append("/"); //envS.append("/Groups/"); + envS.append(groupFile); + + file = new QFile(envS.c_str()); + + if (!file->exists()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "GROUP FILE " << groupFile << " NOT FOUND " << endl; + cout << "NEITHER IN THE CURRENT (OR GIVEN) DIRECTORY" << endl; + + if (env != NULL) { + cout << "NOR IN CAFE_XML_PATH/=" << endl; + cout << env << endl; + } + else { + cout << "OPTIONAL ENVIRONMENT VARIABLE CAFE_XML_PATH IS UNDEFINED" << endl; + } + delete file; + + return ECAFE_LOAD_GROUP; + } + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << " GROUPS LOADED FROM CURRENT (OR GIVEN) DIRECTORY" << endl; + } + + + loadGroupXMLParser handler; + QXmlInputSource source(file); + + QXmlSimpleReader reader; + reader.setContentHandler(&handler); + reader.setFeature("http://trolltech.com/xml/features/report-whitespace-only-CharData", false); + + bool isOK = reader.parse(source); + + if (!isOK) { + return ECAFE_LOAD_GROUP; + } + + + for (std::vector::const_iterator group=handler.groups.begin(); + group!=handler.groups.end();++group) { + + if(isGroup((char *)(*group).getName().c_str())) { + + localStatus=ECAFE_GROUP_PREV_DEF; + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "FAILED TO LOAD GROUP WITH NAME(ID) " << (*group).getName() << std::endl; + std::cout << "AS GROUP WITH THIS NAME ALREADY EXISTS " << std::endl; + cafeStatus.report(ECAFE_GROUP_PREV_DEF); + std::cout << "WE CONTINUE WITH LOADING ANY REMAINING GROUPS " << std::endl; + continue; + } + + PVGroup pg; + vector pvList; pvList.clear(); + strcpy(pg.name,(*group).getName().c_str()); + + + //Loop round all collections; + vector cg; cg.clear(); + + cg=(*group).getCollections(); + + for (size_t i=0; i members; + collectionFetch((char *)cg[i].id.c_str(),members); + + for(size_t j=0; j cm= (*group).getXMLMembers(); + + + for (size_t i=0; i 0 ) { + groupDefine((const char *) (*group).getName().c_str(), pvList); + + } + else { + cout << "GROUP " << (*group).getName().c_str() + << " NOT DEFINED AS IT HAS NO MEMBERS! " << endl; + } + + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + + + +/** + * \brief restoreFromXML \n + * Reads a PVGroup XML file and writes values to EPICS variables \n + * from the directory defined the by CAFE_SAR_PATH environment variable + * \param snapshotFile input: char * snapshotFile + * \return ICAFE_NORMAL if OK else first ECAFE/ICAFE error encountered + */ +int CAFE::restoreFromXML (const char * snapshotFile) { +#define __METHOD__ "CAFE::restoreFromXML(char * snapshotFile)" + + int localStatus=ICAFE_NORMAL; + + unsigned int gh; + + string ssf=snapshotFile; + + QFile * file; + + file = new QFile(snapshotFile); + + + if (!file->exists()) { + + std::string envS; + char * env = getenv("CAFE_SAR_PATH"); + env == NULL ? envS=std::string(".") : envS=std::string(env); + envS.append("/"); + envS.append(snapshotFile); + + file = new QFile(envS.c_str()); + + if (!file->exists()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "PVGROUP FILE " << snapshotFile << " NOT FOUND " << endl; + cout << "NEITHER IN THE CURRENT (OR GIVEN) DIRECTORY NOR IN CAFE_SAR_PATH=" << envS << endl; + return ECAFE_LOAD_GROUP; + } + + ssf=envS; + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << " PVGROUP LOADED FROM CURRENT (OR GIVEN) DIRECTORY" << endl; + } + + + QXmlInputSource source(file); + + restorePVGroupXMLParser handler; + + QXmlSimpleReader reader; + reader.setContentHandler(&handler); + reader.setFeature("http://trolltech.com/xml/features/report-whitespace-only-CharData", false); + + bool isOK = reader.parse(source); + + if (!isOK) { + return ECAFE_LOAD_GROUP; + } + + PVGroup pvg = handler.group; + + string gNameNew= pvg.name; + gNameNew.append("Restore"); + strcpy(pvg.name,gNameNew.c_str()); + + PVGroupV.push_back(pvg); + + localStatus=groupOpen(pvg, gh); + + if (localStatus != ICAFE_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "GROUP OPEN REPORTS FOLLOWING ERROR " << endl; + for (unsigned int i=0; i\n"); + char sBuffer[60]; char sBufferNPV[60]; + + int overallStatus=groupGet(pg.getGroupHandle(),pg); + PVDataHolder * pvd = pg.getPVData(); + + unsigned int hl=0; + + s.append(" "); + sprintf(sBufferNPV,"%d", pg.npv); + s.append(sBufferNPV); + s.append(" \n"); + + //First determine maximum pv size + unsigned short maxL=0; string sn=""; + for (unsigned int j=0; j maxL) maxL=sn.size()+0; + } + for (unsigned int j=0; j "); + s.append(pvd[j].getPV()); + sn=pvd[j].getPV(); + s.append((maxL-sn.size()),' '); + + s.append(" "); + sprintf(sBuffer,"%d", pvd[j].getNelem()); + s.append(sBuffer); + s.append(" "); + + for (unsigned int i=0; i "); + + hl=getHandleHelper().getHandleFromPVWithinGroup(pvd[j].getPV(), pg.getGroupHandle() ); + + ChannelRegalia cr; + getInfo().getChannelRegalia(hl, cr); + + if ( cr.getWriteAccess() ) { + s.append("true");} else { + s.append("false"); + } + + s.append(" "); + + sprintf(sBuffer,"%d", pvd[j].getStatus()); + + s.append(sBuffer); + s.append(" "); + s.append("\n"); + } + s.append("\n"); + + + time_t now = time(0); + + tm *ltm = localtime(&now); + + std::string envS; + char * env = getenv("CAFE_SAR_PATH"); + env == NULL ? envS=std::string(".") : envS=std::string(env); + envS.append("/"); + + + std::string fsname=envS; + fsname.append(pg.getName()); + char s1[255]; + sprintf(s1,"_%d_%d_%d_%d:%d:%d", (1900 + ltm->tm_year),(1+ltm->tm_mon), + ltm->tm_mday,ltm->tm_hour,ltm->tm_min,ltm->tm_sec ); + fsname.append(s1); + fsname.append(".xml"); + + + ofstream myfile; + myfile.open (fsname.c_str(), ios::out); + myfile << s; + myfile.close(); + + return overallStatus; +#undef __METHOD__ +} + + + + + + +/** + * \brief openGroupXMLFile \n + * Open file given by fileName for writing XML data\n + * \param fileName input: filename to which PVGroup data is written + * \return ICAFE_NORMAL if OK else first ECAFE/ICAFE error encountered + */ +void CAFE::openGroupXMLFile(string fileName) { + ofstream myfile; + myfile.open (fileName.c_str(), ios::out); + std::string s="\n"; + myfile << s; + return myfile.close(); +} + + +/** + * \brief closeGroupXMLFile \n + * Close file given by fileName for writing XML data\n + * \param fileName input: filename to which PVGroup data is written + * \return ICAFE_NORMAL if OK else first ECAFE/ICAFE error encountered + */ +void CAFE::closeGroupXMLFile(string fileName) { + ofstream myfile; + myfile.open (fileName.c_str(), ios::app); + std::string s="\n"; + myfile << s; + return myfile.close(); +} + + +/** + * \brief group2XML \n + * Takes a PVGroup and writes its members to a file \n + * in the directory defined the by CAFE_SAR_PATH environment variable + * \param grpName input: PVGroup + * \param fileName input: filename to which PVGroup data is written + * \return ICAFE_NORMAL if OK else first ECAFE/ICAFE error encountered + */ +int CAFE::group2XML (const char * grpName, string fileName) { +#define __METHOD__ "CAFE::group2XML(const char *grpName, ofstream myfile)" + + ofstream myfile; + myfile.open (fileName.c_str(), ios::app); + + std::string s= "\n \n"); + + vector lg; + lg.clear(); + + int status=CAFE::groupMemberList(grpName, lg); + + + for (int j=0; j "); + s.append(lg[j]); + s.append(" \n"); + } + s.append(" \n"); + + myfile << s; + myfile.close(); + return status; +#undef __METHOD__ +} + + + + + + + + diff --git a/src/callbackHandlerCreate.cpp b/src/callbackHandlerCreate.cpp new file mode 100644 index 0000000..85b0767 --- /dev/null +++ b/src/callbackHandlerCreate.cpp @@ -0,0 +1,259 @@ +/// +/// \file callbackHandlerCreate.cc +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#include +#include +#include +#include +#include +//include +#include +#include + + +using namespace std; + +/** + * \brief Callback function for ca_create_channel. + * Modifies Conduit object accordingly + * \param args returns connection handler parameters \n + * i.e. args.chid, args.op{CA_OP_CONN_UP, CA_OP_CONN_DOWN} + */ +void ChannelCreatePolicy::callbackHandlerCreate(struct connection_handler_args args) { +#define __METHOD__ "ChannelCreatePolicy::callbackHandlerCreate" + + //Use for debugging + //cout << __METHOD__ << endl; + + + unsigned int _handle = (unsigned long) ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find((unsigned int)_handle); + + if (it_handle != handle_index.end()) { + //cout << (*it_handle).pv << endl; + //cout << "handle= " << (*it_handle).getHandle() << endl; cout << endl; + + //Modifies corresponding local variables + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_connectionHandlerArgs(args)); + if(MUTEX){cafeMutex.unlock();} + + if (args.op == CA_OP_CONN_UP) { + chtype buffer_TIME_Type = dbf_type_to_DBR_TIME(ca_field_type(args.chid)); //DBF_STRING + chtype buffer_CTRL_Type = dbf_type_to_DBR_CTRL(ca_field_type(args.chid)); + chtype buffer_PRIMITIVE_TYPE = dbf_type_to_DBR (ca_field_type(args.chid)); + + //BUFFER FOR GET has DBR_TIME size + //BUFFER FOR PUT has DBR size + //BUFFER FOR CTRL has DBR_CTRL size + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_dataBufferSize_PRIMITIVE(buffer_PRIMITIVE_TYPE)); + handle_index.modify(it_handle, change_dataBufferSize_CTRL (buffer_CTRL_Type)); + handle_index.modify(it_handle, change_dataBufferSize_TIME (buffer_TIME_Type)); + handle_index.modify(it_handle, change_dataBufferSize_STSACK ()); //fixed size DBR_STSACK_STRING + + if ( (*it_handle).getAccessRead() != ca_read_access(args.chid) ) { + //cout << " This will only occur if CAFE's access right handler is not used " << endl; + //cout << " accessRightsEventHandler not called BEFORE channelEventHandler! " << endl; + //cout << " FORCING MODIFICATION IN HASH TABLE FOR READ ACCESS=" << ca_read_access(args.chid) << endl; + handle_index.modify(it_handle, change_accessRead(ca_read_access(args.chid))); + } + if ( (*it_handle).getAccessWrite() != ca_write_access(args.chid) ) { + //cout << " This will only occur if CAFE's access right handler is not used " << endl; + //cout << " accessRightsEventHandler not called BEFORE channelEventHandler! " << endl; + //cout << " FORCING MODIFICATION IN HASH TABLE FOR WRITE ACCESS=" << ca_write_access(args.chid) << endl; + handle_index.modify(it_handle, change_accessWrite(ca_write_access(args.chid))); + } + if(MUTEX){cafeMutex.unlock();} + + //Set prerequestStatus + ChannelRequestStatus channelRequestStatusGet; int status; + + //Call callback methods for all types!! + status=(*it_handle).getCtrlWithCallback(CALLBACK_CAFE::handlerGetCtrl); + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGetCtrl(); + channelRequestStatusGet.setRequestStatus (status); + if (status != ECA_NORMAL) { + channelRequestStatusGet.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();} + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "getCtrlWithCallback(CALLBACK_CAFE::handlerGetCtrl) reported error:" << endl; + CAFEStatus cafeStatus; cafeStatus.report(status); + } + else { + channelRequestStatusGet.setCallbackKind(true, false); //PENDING NOT_TRIGGERED + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGet)); + if(MUTEX){cafeMutex.unlock();} + //ca_flush_io(); + + status=(*it_handle).getSTSACKWithCallback(CALLBACK_CAFE::handlerGetSTSACK); + + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGetSTSACK(); + channelRequestStatusGet.setRequestStatus (status); + if (status != ECA_NORMAL) { + channelRequestStatusGet.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();} + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "getSTSACKWithCallback(CALLBACK_CAFE::handlerGetSTSACK) reported error:" << endl; + CAFEStatus cafeStatus; cafeStatus.report(status); + } + else { + channelRequestStatusGet.setCallbackKind(true, false); //PENDING NOT_TRIGGERED + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestStatusGetSTSACK(channelRequestStatusGet)); + if(MUTEX){cafeMutex.unlock();} + //ca_flush_io(); + + status=(*it_handle).getClassNameWithCallback(CALLBACK_CAFE::handlerGetClassName); + + if ( status != ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "getClassNameWithCallback(CALLBACK_CAFE::handlerGetClassName) reported error:" << endl; + CAFEStatus cafeStatus; cafeStatus.report(status); + } + + status=(*it_handle).getWithCallback(CALLBACK_CAFE::handlerGet); + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setRequestStatus (status); + if (status != ECA_NORMAL) { + channelRequestStatusGet.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();} + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "getWithCallback(CALLBACK_CAFE::handlerGet) reported error:" << endl; + CAFEStatus cafeStatus; cafeStatus.report(status); + } + else { + channelRequestStatusGet.setCallbackKind(true, false); //PENDING NOT_TRIGGERED + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + if(MUTEX){cafeMutex.unlock();} + //ca_flush_io(); + + // Check if any monitors for this channel are to be started..... + // If monitors are to be started, then start the monitors + // pass on handler functions + // + // Loop thru monitor waiting list + + // monitor in waiting + + vector mpInWaitingV =(*it_handle).getMonitorPolicyInWaitingVector(); + vector::iterator it; + + //Iterate + for (it = mpInWaitingV.begin(); it != mpInWaitingV.end(); ++it) { + + //Check start values; + if ((*it).getNelem()==0) { + (*it).setNelem((*it_handle).getChannelRegalia().getNelem()); + } + + //Check start values; + if ((*it).getDataType()==CAFE_NOT_REQUESTED) { + (*it).setDataType((*it_handle).getChannelRegalia().getDataType()); + } + + //Check setMask if MASK_CTRL! + + status=(*it_handle).monitorStart((*it)); + (*it).setStatus(status); + + //Add to vector + //check in to vector + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_monitorPolicyInsert((*it))); + if(MUTEX){cafeMutex.unlock();} + } + //loop + + for (it = mpInWaitingV.begin(); it != mpInWaitingV.end(); ++it) { + + unsigned int ID=(*it).getID(); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_monitorPolicyInWaitingErase(ID)); + if(MUTEX){cafeMutex.unlock();} + } + //loop + + + } else { + + // DIS-CONNECTION (i.e. from a previously connected state) + // Setting Access Rights to boolean false. These will in any + // case be overwritten to false by the access_rights_event_handler + /* + if ( (*it_handle).getAccessRead() != 0 ) { + handle_index.modify(it_handle, change_accessRead(0)); + } + + if ( (*it_handle).getAccessWrite() != 0 ) { + handle_index.modify(it_handle, change_accessWrite(0)); + } + */ + // On disconnection invoke PyCafe Monitor callback + + + + #if HAVE_PYTHON_H + // monitors + + + + vector mpV =(*it_handle).getMonitorPolicyVector(); + vector::iterator itmp; + + + + //Iterate + for (itmp = mpV.begin(); itmp != mpV.end(); ++itmp) { + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_usrArgs( (unsigned long) (*itmp).getMonitorID() )); + if(MUTEX){cafeMutex.unlock();} + //Add datatypes etc... + //cout << "(*it_handle).PyEventHandler(); " << (*itmp).getMonitorID() << endl; + (*it_handle).PyEventHandler((*itmp).getMonitorID() ); + } + #endif + + } + + + + } + else { + + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ + << " called with an invalid CAFE handle:" << _handle << endl; + cout << "Actually this should not happen and this line should never appear!! " << endl; + + } + + + return; +#undef __METHOD__ +} + + diff --git a/src/callbackHandlerMonitor.cpp b/src/callbackHandlerMonitor.cpp new file mode 100644 index 0000000..86f160e --- /dev/null +++ b/src/callbackHandlerMonitor.cpp @@ -0,0 +1,179 @@ +// +/// \file callbackHandlerMonitor.cc +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#include +#include "global.h" +#include "policies.h" +#include "conduitFriends.h" +#include "conduitConnectionHandlerArgs.h" +#include "conduitEventHandlerArgs.h" +#include "methodCallbacks.h" +#include "granules.h" + + +using namespace std; + + +/** + * \brief Callback function for monitor method is invoked + * with a pointer to the retrieved value + * \param args input: event handler arguments + */ +void MonitorPolicy::callbackHandlerMonitor( struct event_handler_args args) { +#define __METHOD__ "MonitorPolicy::callbackHandlerMonitor" + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) ca_puser(args.chid);// args.usr; // ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int)_handle); + + if (it_handle != handle_index.end()) { + //cout << (*it_handle).getPV() << " " << (*it_handle).getHandle() << endl; + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + + + /* + if (args.type < DBR_GR_STRING) { + PVDataHolder pvd(args.count); + (*it_handle).getPVDataHolder(pvd); + //// pvd.print(); + cout << "val/D//= " << pvd.getAsString(0) << endl; + + } + else if (args.type < DBR_PUT_ACKT) { + PVCtrlHolder pvc(args.count); + (*it_handle).getPVCtrlHolder(pvc); + ////pvc.print(); + cout << "val/C/= " << pvc.getAsString(0) << endl; + } + */ + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + +return; +#undef __METHOD__ +}; + + + +/** + * \brief Callback function for monitor method is invoked + * with a pointer to the retrieved value; also fires a user supplied Python callback. + * \param args input: event handler arguments + */ +void MonitorPolicy::PyCallbackHandlerMonitorData (struct event_handler_args args) { +#define __METHOD__ "MonbitorPolicy::PyCallbackHandlerMonitorData" + + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) ca_puser(args.chid);// args.usr; // ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int)_handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + + #if HAVE_PYTHON_H + + if (args.type < DBR_GR_STRING) { + + (*it_handle).PyDataEventHandler(); + + } + else if (args.type < DBR_PUT_ACKT) { + + (*it_handle).PyCtrlEventHandler(); + } + #endif + + + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + +return; +#undef __METHOD__ +}; + + + + +/** + * \brief Callback function for monitor method is invoked + * with a pointer to the retrieved value; also fires a user supplied Python callback. + * \param args input: event handler arguments + */ +void MonitorPolicy::PyCallbackHandlerMonitor (struct event_handler_args args) { +#define __METHOD__ "MonitorPolicy::PyCallbackHandlerMonitor" + + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) ca_puser(args.chid);// args.usr; // ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int)_handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX){cafeMutex.lock();} + + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + + if(MUTEX){cafeMutex.unlock();} + + #if HAVE_PYTHON_H + + (*it_handle).PyEventHandler(); + + #endif + + } + else { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + + +return; +#undef __METHOD__ +} + + + diff --git a/src/conduit.cpp b/src/conduit.cpp new file mode 100644 index 0000000..3e050ed --- /dev/null +++ b/src/conduit.cpp @@ -0,0 +1,918 @@ +/// +/// \file conduit.cc +/// \author Jan Chrin, PSI +/// \date Release: September 2015 +/// \version CAFE 1.1.0 +/// + +#include "conduit.h" +#include "helper.h" + +unsigned int Conduit::handleNext=0; //4294967295; +unsigned int MonitorPolicy::idNext=0xfff; //4095 + + + +Conduit::Conduit( ){}; + +/** + * CAFEConduit destructor \n + * Good place to clean up! + */ +Conduit::~Conduit(){}; + + +/* +Conduit::Conduit(const char * _pv, ca_client_context *_ccc, bool _pyCafeFlag) { + + //Define default policies + channelRequestPolicyPut.setPolicy(_channelRequestPolicy.getWhenToFlushSendBuffer(), + _channelRequestPolicy.getWaitKind(), _channelRequestPolicy.getMethodKind()); + + cout << "when " << _channelRequestPolicy.getWhenToFlushSendBuffer() << endl; + cout << "wait " << _channelRequestPolicy.getWaitKind() << endl; + cout << "method " << _channelRequestPolicy.getMethodKind() << endl; + + + Conduit::Conduit(_pv, _ccc, _pyCafeFlag); + cout << "when " << _channelRequestPolicy.getWhenToFlushSendBuffer() << endl; + cout << "wait " << _channelRequestPolicy.getWaitKind() << endl; + cout << "method " << _channelRequestPolicy.getMethodKind() << endl; + + +} +*/ + + +/** + * \brief Conduit constructor with flag for PyCafe API \n + * \param _pv input: process variable + * \param _ccc input: ca_client_context + * \param _pyCafeFlag input: bool + */ +Conduit::Conduit(const char * _pv, ca_client_context *_ccc, + ChannelRequestPolicy _channelRequestPolicyPut, ChannelRequestPolicy _channelRequestPolicyGet, + ChannelGetActionWhenMonitorPolicy _channelGetActionWhenMonitorPolicy, + bool _pyCafeFlag) { + + // To avoid the following compilation error + // conduit.cpp:41: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x + //epicsAlarmSeverityStrings= {"NO_ALARM","MINOR","MAJOR","INVALID"}; + epicsAlarmSeverityStrings[0]=(const char *) "NO_ALARM"; + epicsAlarmSeverityStrings[1]=(const char *) "MINOR"; + epicsAlarmSeverityStrings[2]=(const char *) "MAJOR"; + epicsAlarmSeverityStrings[3]=(const char *) "INVALID"; + //epicsAlarmConditionStrings = {"NO_ALARM","READ","WRITE","HIHI","HIGH", + //"LOLO","LOW","STATE","COS", "COMM","TIMEOUT","HWLIMIT","CALC","SCAN","LINK", + //"SOFT","BAD_SUB","UDF","DISABLE","SIMM","READ_ACCESS", "WRITE_ACCESS"}; + epicsAlarmConditionStrings[0]= (const char *) "NO_ALARM"; + epicsAlarmConditionStrings[1]= (const char *) "READ"; + epicsAlarmConditionStrings[2]= (const char *) "WRITE"; + epicsAlarmConditionStrings[3]= (const char *) "HIHI"; + epicsAlarmConditionStrings[4]= (const char *) "HIGH"; + epicsAlarmConditionStrings[5]= (const char *) "LOLO"; + epicsAlarmConditionStrings[6]= (const char *) "LOW"; + epicsAlarmConditionStrings[7]= (const char *) "STATE"; + epicsAlarmConditionStrings[8]= (const char *) "COS"; + epicsAlarmConditionStrings[9]= (const char *) "COMM"; + epicsAlarmConditionStrings[10]= (const char *) "TIMEOUT"; + epicsAlarmConditionStrings[11]= (const char *) "HWLIMIT"; + epicsAlarmConditionStrings[12]= (const char *) "CALC"; + epicsAlarmConditionStrings[13]= (const char *) "SCAN"; + epicsAlarmConditionStrings[14]= (const char *) "LINK"; + epicsAlarmConditionStrings[15]= (const char *) "SOFT"; + epicsAlarmConditionStrings[16]= (const char *) "BAD_SUB"; + epicsAlarmConditionStrings[17]= (const char *) "UDF"; + epicsAlarmConditionStrings[18]= (const char *) "DISABLE"; + epicsAlarmConditionStrings[19]= (const char *) "SIMM"; + epicsAlarmConditionStrings[20]= (const char *) "READ_ACCESS"; + epicsAlarmConditionStrings[21]= (const char *) "WRITE_ACCESS"; + + ccc = _ccc; + pvAlias = _pv; + pv = _pv; + + ++handleNext; + if(handleNext==0) { // In case we loop round 4294967295(!) + ++handleNext; // 0 reserved for handle not found + } + + pyCafeFlag=_pyCafeFlag; + + handle = handleNext; + groupHandle= 0; + + channelID=NULL; + + alarmStatus=-1; + alarmSeverity=-1; + + ts.secPastEpoch=0; + ts.nsec=0; + + usrArgs= (unsigned long) 0; + dataType= NULL; //(chtype) NULL; + dbrDataType= NULL; //(chtype) NULL; + cafeDbrType=CAFENUM::DBR_NONE; + + beamEventNo=0; + + dataBuffer = NULL; + ctrlBuffer = NULL; + putBuffer = NULL; + stsackBuffer= NULL; + + status=ICAFE_CS_NEVER_CONN; + + //Default - we will let the user methods take control of this + channelRequestMetaDataClient.cafeDbrType = CAFENUM::DBR_TIME; //PLAIN; + channelRequestMetaData.cafeDbrType = CAFENUM::DBR_TIME; + channelRequestMetaPrimitive.cafeDbrType = CAFENUM::DBR_PRIMITIVE; + + channelRequestMetaCtrlClient.cafeDbrType = CAFENUM::DBR_CTRL; + channelRequestMetaCtrl.cafeDbrType = CAFENUM::DBR_CTRL; + //channelRequestMetaCtrlRepository.cafeDbrType = CAFENUM::DBR_CTRL; + + deviceAttributeDeliminator=DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR; + channelDeviceAttribute.init(pv,deviceAttributeDeliminator); + + mpV.reserve(2); + monitorAction.reserve(2); + hasNewData=true; // used by HandleHelper.getMonitorAction(); start with true + + //channelRequestPolicyPut + + channelRequestPolicyPut.setPolicy(_channelRequestPolicyPut.getWhenToFlushSendBuffer(), + _channelRequestPolicyPut.getWaitKind(), _channelRequestPolicyPut.getMethodKind()); + + channelRequestPolicyGet.setPolicy(_channelRequestPolicyGet.getWhenToFlushSendBuffer(), + _channelRequestPolicyGet.getWaitKind(), _channelRequestPolicyGet.getMethodKind()); + + //Use same policy for get ctrl + channelRequestPolicyGetCtrl.setPolicy(_channelRequestPolicyGet.getWhenToFlushSendBuffer(), + _channelRequestPolicyGet.getWaitKind(), _channelRequestPolicyGet.getMethodKind()); + + channelGetActionWhenMonitorPolicy.setActionKind(_channelGetActionWhenMonitorPolicy.getActionKind()); + + //cout << "when /" << channelRequestPolicyMaster.getWhenToFlushSendBuffer() << endl; + //cout << "wait /" << channelRequestPolicyMaster.getWaitKind() << endl; + //cout << "method /" << channelRequestPolicyMaster.getMethodKind() << endl; + + //Define default policies + //channelRequestPolicyPut.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + //CAFENUM::NO_WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); + + //channelRequestPolicyGet.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + // CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITHOUT_CALLBACK); + + //channelRequestPolicyGetCtrl.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE, + // CAFENUM::WAIT, CAFENUM::WITHOUT_CALLBACK); //WITH_CALLBACK_DEFAULT); + +#if HAVE_PYTHON_H + + #if HAVE_PYCAFE_EXT + //Do nothing as PyCafe_ext is compiled + + #else + //Give non Python APIs (e.g. MATLAB) a chance to turn this off + //MATLAB needs to turn this off + if (pyCafeFlag) { + //Py_Initialize(); + import_PyCafe(); // Use PyCafe_api.h + } + #endif + +#endif + +} + +#if HAVE_PYTHON_H +void * Conduit::PyGetHandler() const { + py_cb_handle_get_wrapper(handle); + return (void *) 0; +} + +void * Conduit::PyPutHandler() const { + py_cb_handle_put_wrapper(handle); + return (void *) 0; +} + +void * Conduit::PyEventHandler() const { + //py_cb_handle_wrapper(handle); + py_cb_handle_monid_wrapper(handle, (unsigned long) usrArgs); + return (void *) 0; +} + + +void * Conduit::PyEventHandler(unsigned int monid) const { + //py_cb_handle_wrapper(handle); + py_cb_handle_monid_wrapper(handle, monid); + return (void *) 0; +} + +void * Conduit::PyDataEventHandler() const{ + PVDataHolder pvd(channelRequestMetaData.nelem); + //size is set in conduitEventHandlerArgs.h + getPVDataHolder(pvd); + py_cb_wrapper(pvd, handle, pv); + return (void *) 0; +} + +void * Conduit::PyCtrlEventHandler() const{ + PVCtrlHolder pvc(channelRequestMetaCtrl.nelem); + //size is set in conduitEventHandlerArgs.h + getPVCtrlHolder(pvc); + py_cb_ctrl_wrapper(pvc, handle, pv); + return (void *) 0; +} +#endif + +/** + * \brief Called from Granules.cc \n + * Sends data from the Conduit::putBuffer to the process variable. + * It does not wait to determine if the data was actually written or not. + * \return ECA_NORMAL - Normal successful completion + * \return ECA_BADCHID - Corrupted Channel Identifier (chid) + * \return ECA_BADTYPE - Invalid DBR_XXX type + * \return ECA_BADCOUNT - Requested count larger than native element count + * \return ECA_NOWTACCESS - Write access denied + * \return ECA_ALLOCMEM - Unable to allocate memory + * \return ECA_DISCONN - Channel is disconnected + */ +int Conduit::put(void) const { +#define __METHOD__ "Conduit::put()" + + return ca_array_put(channelRequestMetaPrimitive.dbrDataType, channelRequestMetaPrimitive.nelem, + channelRegalia.channelID, putBuffer); +#undef __METHOD__ +}; + + +/** + * \brief Called from Granules.cc \n + * Sends data from the Conduit::putBuffer to the process variable. + * It does not wait to determine if the data was actually written or not. + * \param callbackHandlerPut input: pCallback + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::putWithCallback(pCallback callbackHandlerPut) const { +#define __METHOD__ "Conduit::putWithCallback(pCallback callbackHandlerPut) " + + //cout << "channelRequestMetaPrimitive.nelem: " << channelRequestMetaPrimitive.nelem << endl; + //for (int i=0; i< channelRequestMetaPrimitive.nelem; ++i) { + // cout << (*(&((putBuffer)->fltval)+i)) << " [" << i << "] " << endl; + //} + + + return ca_array_put_callback(channelRequestMetaPrimitive.dbrDataType, channelRequestMetaPrimitive.nelem, + channelRegalia.channelID, putBuffer, callbackHandlerPut,(void *) (long long) handle ); +#undef __METHOD__ +}; + + +/** + * \brief Called from Granules.cc \n + * Retrieves PV data through channel access into the Conduit::dataBuffer + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::get(void) const { +#define __METHOD__ "Conduit::get(void) " + + + return ca_array_get(channelRequestMetaData.dbrDataType, channelRequestMetaData.nelem, + channelRegalia.channelID, dataBuffer); + +#undef __METHOD__ +}; + +/** + * \brief Called from Granules.cc \n + * Retrieves PV data through channel access into the Conduit::dataBuffer thru callbackHandlerGet + * \param callbackHandlerGet input: pCallback + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::getWithCallback(pCallback callbackHandlerGet) const { +#define __METHOD__ "Conduit::getCallback(pCallback callbackHandlerGet) " + + + return ca_array_get_callback(channelRequestMetaData.dbrDataType, channelRequestMetaData.nelem, + channelRegalia.channelID,callbackHandlerGet,(void *) (long long) handle ); +#undef __METHOD__ +}; + + + +/** + * \brief Called from Granules.cc \n + * Retrieves Ctrl data through channel access into the Conduit::ctrlBuffer + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::getCtrl(void) const { +#define __METHOD__ "Conduit::getCtrl(void) " + + + return ca_array_get(channelRequestMetaCtrl.dbrDataType, channelRequestMetaCtrl.nelem, + channelRegalia.channelID, ctrlBuffer); +#undef __METHOD__ +}; + + +/** + * \brief Called from granules.cc and conduitConnectionHandersArgs.h \n + * Retrieves Ctrl data through channel access into the Conduit::ctrlBuffer thru callbackHandlerCtrl + * \param callbackHandlerCtrl input: pCallback + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::getCtrlWithCallback(pCallback callbackHandlerCtrl) const { +#define __METHOD__ "Conduit::getCtrlCallback(pCallback callbackHandlerCtrl) " + + + return ca_array_get_callback(channelRequestMetaCtrl.dbrDataType, + channelRequestMetaCtrl.nelem, + //min(channelRequestMetaCtrl.nelem,max_nelem_for_ctrl_buffer), + channelRegalia.channelID, callbackHandlerCtrl, (void *) (long long) handle); +#undef __METHOD__ +}; + + + +/** + * \brief Called from Granules.cc and conduitConnectionHandersArgs.h \n + * Retrieves STSACK data through channel access into the Conduit::STSACKBuffer thru callbackHandlerSTSACK + * \param callbackHandlerSTSACK input: pCallback + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::getSTSACKWithCallback(pCallback callbackHandlerSTSACK) const { +#define __METHOD__ "Conduit::getSTSACKWithCallback(pCallback callbackHandlerSTSACK) " + + return ca_array_get_callback(DBR_STSACK_STRING, channelRequestMetaSTSACK.nelem, + channelRegalia.channelID, callbackHandlerSTSACK, (void *) (long long) handle); +#undef __METHOD__ +}; + + + +/** + * \brief Called from Granules.cc and conduitConnectionHandersArgs.h \n + * Retrieves ClassName data through channel access into the Conduit::ClassNameBuffer thru callbackHandlerClassName + * \param callbackHandlerClassName input: pCallback + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::getClassNameWithCallback(pCallback callbackHandlerClassName) const { +#define __METHOD__ "Conduit::getClassNameWithCallback(pCallback callbackHandlerClassName) " + + return ca_array_get_callback(DBR_CLASS_NAME, 1, + channelRegalia.channelID, callbackHandlerClassName, (void *)(long long) handle); +#undef __METHOD__ +}; + + +/** + * \brief Called from cafe.cc + * \param _pvd output: PVDataHolder + * \return ECA_NORMAL if OK else ECA error + */ +int Conduit::getPVDataHolder(PVDataHolder & _pvd) const { +#define __METHOD__ "Conduit::getPVDataHolder(PVDataHolder & _pvd) " + + Helper helper; + + //Check on the datatype transferred + + chtype channelType = channelRequestMetaData.getDbrDataType(); + CAFENUM::DBR_TYPE dbrTypeClass=helper.convertToCAFEDbrTypeClass(channelType); + + if ( channelRegalia.getCafeConnectionState() != ICAFE_CS_NEVER_CONN ) { + + switch(dbrTypeClass) + { + case CAFENUM::DBR_PRIMITIVE: + case CAFENUM::DBR_STS: + case CAFENUM::DBR_TIME: + break; + default: + + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY: dbrTypeClass = " << dbrTypeClass << + " is NOT appropriate for this method" << endl; + cout << "Method does not deal with this DBR_TYPE: " + << dbr_type_to_text(channelType) << endl; + break; + } + + } //if + + unsigned int offset = channelRequestMetaData.getOffset(); //channelRequestMetaDataClient.getOffset(); + unsigned int nelem = channelRequestMetaData.getNelem()-offset; + + nelem=min(_pvd.nelem,nelem); // Add this for getCache method + + + + _pvd.alarmStatus = -1;//alarmStatus; + _pvd.alarmSeverity = -1;//alarmSeverity; + _pvd.ts.nsec = 0;//ts; + _pvd.ts.secPastEpoch= 0; + _pvd.nelem = min(_pvd.size,nelem); //channelRequestMetaData.getNelem(); + _pvd.beamEventNo = beamEventNo; + _pvd.status = status; + + _pvd.dataTypeNative = (CAFE_DATATYPE) channelRegalia.getDataType(); + _pvd.dataType = (CAFE_DATATYPE) channelRequestMetaData.getDataType();//dataTypeRequest; + _pvd.dbrDataType = channelRequestMetaData.getDbrDataType(); + + strcpy(_pvd.pv, pv.c_str()); + strcpy(_pvd.pvAlias, pvAlias.c_str()); + strcpy(_pvd.device, channelDeviceAttribute.getDevice()); + strcpy(_pvd.attrib, channelDeviceAttribute.getAttribute()); + + if (_pvd.dataTypeNative==DBR_ENUM) { + _pvd.noStr = ((struct dbr_ctrl_enum *) ctrlBuffer)->no_str; + memcpy( _pvd.strs, &(((struct dbr_ctrl_enum *) ctrlBuffer)->strs), sizeof(_pvd.strs)) ; + //for (int i=0; i<_pvd.noStr; ++i) cout << __METHOD__ << i << " " << _pvd.strs[i] << endl; + } + + switch (channelType) + { + case DBR_TIME_DOUBLE: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].d = (*(&((dataBuffer)->tdblval.value)+i+offset)); + } + _pvd.ts = ((struct dbr_time_double *) dataBuffer)->stamp; + _pvd.alarmStatus = ((struct dbr_time_double *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_time_double *) dataBuffer)->severity; + + break; + + case DBR_TIME_FLOAT: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].f = (*(&((dataBuffer)->tfltval.value)+i+offset)); + } + _pvd.ts = (epicsTimeStamp) ((struct dbr_time_float *) dataBuffer)->stamp; + _pvd.alarmStatus = ((struct dbr_time_float *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_time_float *) dataBuffer)->severity; + + break; + + case DBR_TIME_LONG: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].l = (*(&((dataBuffer)->tlngval.value)+i+offset)); + } + _pvd.ts = ((struct dbr_time_long *) dataBuffer)->stamp; + _pvd.alarmStatus = ((struct dbr_time_long *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_time_long *) dataBuffer)->severity; + + break; + + case DBR_TIME_SHORT: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].s = (*(&((dataBuffer)->tshrtval.value)+i+offset)); + } + _pvd.ts = ((struct dbr_time_short *) dataBuffer)->stamp; + _pvd.alarmStatus = ((struct dbr_time_short *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_time_short *) dataBuffer)->severity; + + break; + + case DBR_TIME_ENUM: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].us = (*(&((dataBuffer)->tenmval.value)+i+offset)); + } + _pvd.ts = ((struct dbr_time_enum *) dataBuffer)->stamp; + _pvd.alarmStatus = ((struct dbr_time_enum *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_time_enum *) dataBuffer)->severity; + + break; + + case DBR_TIME_CHAR: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].ch = (*(&((dataBuffer)->tchrval.value)+i+offset)); + } + _pvd.ts = ((struct dbr_time_char *) dataBuffer)->stamp; + _pvd.alarmStatus = ((struct dbr_time_char *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_time_char *) dataBuffer)->severity; + + break; + + case DBR_TIME_STRING: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + strcpy(_pvd.val[i].str, (*(&((dataBuffer)->tstrval.value)+i+offset))); + } + _pvd.ts = ((struct dbr_time_string *) dataBuffer)->stamp; + _pvd.alarmStatus = ((struct dbr_time_string *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_time_string *) dataBuffer)->severity; + + break; + + case DBR_STS_DOUBLE: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].d = (*(&((dataBuffer)->sdblval.value)+i+offset)); + } + _pvd.alarmStatus = ((struct dbr_sts_double *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_sts_double *) dataBuffer)->severity; + + break; + + case DBR_STS_FLOAT: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].f = (*(&((dataBuffer)->sfltval.value)+i+offset)); + } + _pvd.alarmStatus = ((struct dbr_sts_float *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_sts_float *) dataBuffer)->severity; + + break; + + case DBR_STS_LONG: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].l = (*(&((dataBuffer)->slngval.value)+i+offset)); + } + _pvd.alarmStatus = ((struct dbr_sts_int *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_sts_int *) dataBuffer)->severity; + + break; + + case DBR_STS_SHORT: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].s = (*(&((dataBuffer)->sshrtval.value)+i+offset)); + } + _pvd.alarmStatus = ((struct dbr_sts_short *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_sts_short *) dataBuffer)->severity; + + break; + + case DBR_STS_ENUM: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].us = (*(&((dataBuffer)->senmval.value)+i+offset)); + } + _pvd.alarmStatus = ((struct dbr_sts_enum *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_sts_enum *) dataBuffer)->severity; + + break; + + case DBR_STS_CHAR: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].ch = (*(&((dataBuffer)->schrval.value)+i+offset)); + } + _pvd.alarmStatus = ((struct dbr_sts_char *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_sts_char *) dataBuffer)->severity; + + break; + + case DBR_STS_STRING: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + strcpy(_pvd.val[i].str, (*(&((dataBuffer)->sstrval.value)+i+offset))); + } + _pvd.alarmStatus = ((struct dbr_sts_string *) dataBuffer)->status; + _pvd.alarmSeverity = ((struct dbr_sts_string *) dataBuffer)->severity; + + break; + + case DBR_DOUBLE: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].d = (*(&((dataBuffer)->doubleval)+i+offset)); + } + break; + + case DBR_FLOAT: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].f = (*(&((dataBuffer)->fltval)+i+offset)); + } + break; + + case DBR_LONG: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].l = (*(&((dataBuffer)->longval)+i+offset)); + } + break; + + case DBR_SHORT: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].s = (*(&((dataBuffer)->shrtval)+i+offset)); + } + break; + + case DBR_ENUM: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].us = (*(&((dataBuffer)->enmval)+i+offset)); + } + break; + + case DBR_CHAR: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + _pvd.val[i].ch = (*(&((dataBuffer)->charval)+i+offset)); + } + break; + + case DBR_STRING: + for (unsigned int i=0; i<_pvd.nelem; ++i) { + strcpy(_pvd.val[i].str, (*(&((dataBuffer)->strval)+i+offset))); + } + break; + + case TYPENOTCONN: + if ( channelRegalia.getCafeConnectionState() != ICAFE_CS_NEVER_CONN ) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "ERROR CAFE_TYPENOTCONN: dataType: " + << channelType << " : " << dbr_type_to_text(channelType) << endl; + } + break; + default: + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "The switch case does not support this channelType: " + << channelType << " : " << dbr_type_to_text(channelType) << endl; + break; + } + + //Do this to prevent overflow error in epicsTime time(ts) routines! + //This bad number can occur in timeouts + if(_pvd.ts.nsec>1000000000) {_pvd.ts.nsec=0;} + + + return ICAFE_NORMAL; +#undef __METHOD__ +}; + + + +/** + * \brief Called from cafe.cc + * \param _pvc output: PVCtrlHolder + * \return ICAFE_NORMAL if OK else ICAFE error + */ +int Conduit::getPVCtrlHolder(PVCtrlHolder & _pvc) const { +#define __METHOD__ " Conduit::getPVCtrlHolder(PVCtrlHolder & _pvc) " + + Helper helper; + + int channelType=channelRequestMetaCtrl.getDbrDataType(); + + CAFENUM::DBR_TYPE dbrTypeClass=helper.convertToCAFEDbrTypeClass(channelType); + + if ( channelRegalia.getCafeConnectionState() != ICAFE_CS_NEVER_CONN ) { + + switch(dbrTypeClass) + { + case CAFENUM::DBR_GR: + case CAFENUM::DBR_CTRL: + break; + default: + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY: dbrTypeClass = " << dbrTypeClass << + " is NOT appropriate for this method" << endl; + cout << "Method does not deal with this DBR_TYPE: " + << dbr_type_to_text(channelType) << endl; + break; + } + + } + + unsigned int offset = channelRequestMetaCtrlClient.getOffset(); + unsigned int nelem = channelRequestMetaCtrl.getNelem()-offset; + + nelem=min(_pvc.nelem,nelem); // Add this for getCache method + + // + _pvc.alarmStatus = -1;//alarmStatus; + _pvc.alarmSeverity = -1;//alarmSeverity; + _pvc.nelem = min(_pvc.size,nelem); + + //Default from constructor if not connected + _pvc.dataType = (CAFE_DATATYPE) channelRequestMetaCtrl.getDataType(); // dataTypeRequest; + + _pvc.dataTypeNative = (CAFE_DATATYPE) channelRegalia.getDataType(); // dataTypeRequest; + + _pvc.dbrDataType = channelRequestMetaCtrl.getDbrDataType(); + _pvc.status = status; + + + strcpy(_pvc.pv, pv.c_str()); + strcpy(_pvc.pvAlias, pvAlias.c_str()); + strcpy(_pvc.device,channelDeviceAttribute.getDevice()); + strcpy(_pvc.attrib,channelDeviceAttribute.getAttribute()); + + + if (_pvc.dataTypeNative==DBR_ENUM) { + _pvc.noStr = ((struct dbr_ctrl_enum *) ctrlBuffer)->no_str; + memcpy( _pvc.strs, &(((struct dbr_ctrl_enum *) ctrlBuffer)->strs), sizeof(_pvc.strs)) ; + //for (int i=0; i<_pvc.noStr; ++i) cout << __METHOD__ << i << " " << _pvc.strs[i] << endl; + } + + + switch (channelType) + { + + case DBR_CTRL_CHAR: + for (unsigned int i=0; i<_pvc.nelem; ++i) { + _pvc.val[i].ch = (*(&((ctrlBuffer)->cchrval.value)+i+offset)); + } + + _pvc.precision = 0; // struct dbr_ctrl_char does not have the precision member + _pvc.RISC_pad.ch = ((struct dbr_ctrl_char *) ctrlBuffer)->RISC_pad; + + _pvc.alarmStatus = ((struct dbr_ctrl_char *) ctrlBuffer)->status; + _pvc.alarmSeverity = ((struct dbr_ctrl_char *) ctrlBuffer)->severity; + + memcpy(_pvc.units, &(((struct dbr_ctrl_char *) ctrlBuffer)->units), sizeof(char[MAX_UNITS_SIZE])); + + _pvc.upperDispLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->upper_disp_limit; + _pvc.lowerDispLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->lower_disp_limit; + _pvc.upperAlarmLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->upper_alarm_limit; + _pvc.upperWarningLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->upper_warning_limit; + _pvc.lowerWarningLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->lower_warning_limit; + _pvc.lowerAlarmLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->lower_alarm_limit; + _pvc.upperCtrlLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->upper_ctrl_limit; + _pvc.lowerCtrlLimit.ch = (dbr_char_t) ((struct dbr_ctrl_char *) ctrlBuffer)->lower_ctrl_limit; + + + break; + + case DBR_CTRL_FLOAT: + for (unsigned int i=0; i<_pvc.nelem; ++i) { + _pvc.val[i].f = (*(&((ctrlBuffer)->cfltval.value)+i+offset)); + } + + _pvc.precision = ((struct dbr_ctrl_float *) ctrlBuffer)->precision; + _pvc.RISC_pad.s = ((struct dbr_ctrl_float *) ctrlBuffer)->RISC_pad; + + _pvc.alarmStatus = ((struct dbr_ctrl_float *) ctrlBuffer)->status; + _pvc.alarmSeverity = ((struct dbr_ctrl_float *) ctrlBuffer)->severity; + + memcpy(_pvc.units, &(((struct dbr_ctrl_float *) ctrlBuffer)->units), sizeof(char[MAX_UNITS_SIZE])); + + _pvc.upperDispLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->upper_disp_limit; + _pvc.lowerDispLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->lower_disp_limit; + _pvc.upperAlarmLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->upper_alarm_limit; + _pvc.upperWarningLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->upper_warning_limit; + _pvc.lowerWarningLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->lower_warning_limit; + _pvc.lowerAlarmLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->lower_alarm_limit; + _pvc.upperCtrlLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->upper_ctrl_limit; + _pvc.lowerCtrlLimit.f = (dbr_float_t) ((struct dbr_ctrl_float *) ctrlBuffer)->lower_ctrl_limit; + + + break; + + case DBR_CTRL_DOUBLE: + for (unsigned int i=0; i<_pvc.nelem; ++i) { + _pvc.val[i].d = (*(&((ctrlBuffer)->cdblval.value)+i+offset)); + } + _pvc.precision = ((struct dbr_ctrl_double *) ctrlBuffer)->precision; + _pvc.RISC_pad.s = ((struct dbr_ctrl_double *) ctrlBuffer)->RISC_pad0; + + _pvc.alarmStatus = ((struct dbr_ctrl_double *) ctrlBuffer)->status; + _pvc.alarmSeverity = ((struct dbr_ctrl_double *) ctrlBuffer)->severity; + + memcpy(_pvc.units, &(((struct dbr_ctrl_double *) ctrlBuffer)->units), sizeof(char[MAX_UNITS_SIZE])); + + _pvc.upperDispLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->upper_disp_limit; + _pvc.lowerDispLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->lower_disp_limit; + _pvc.upperAlarmLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->upper_alarm_limit; + _pvc.upperWarningLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->upper_warning_limit; + _pvc.lowerWarningLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->lower_warning_limit; + _pvc.lowerAlarmLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->lower_alarm_limit; + _pvc.upperCtrlLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->upper_ctrl_limit; + _pvc.lowerCtrlLimit.d = (dbr_double_t) ((struct dbr_ctrl_double *) ctrlBuffer)->lower_ctrl_limit; + + break; + + case DBR_CTRL_SHORT: + for (unsigned int i=0; i<_pvc.nelem; ++i) { + _pvc.val[i].s = (*(&((ctrlBuffer)->cshrtval.value)+i+offset)); + } + + _pvc.precision = 0; + _pvc.RISC_pad.s = 0; + + _pvc.alarmStatus = ((struct dbr_ctrl_short *) ctrlBuffer)->status; + _pvc.alarmSeverity = ((struct dbr_ctrl_short *) ctrlBuffer)->severity; + + memcpy(_pvc.units, &(((struct dbr_ctrl_short *) ctrlBuffer)->units), sizeof(char[MAX_UNITS_SIZE])); + + _pvc.upperDispLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->upper_disp_limit; + _pvc.lowerDispLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->lower_disp_limit; + _pvc.upperAlarmLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->upper_alarm_limit; + _pvc.upperWarningLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->upper_warning_limit; + _pvc.lowerWarningLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->lower_warning_limit; + _pvc.lowerAlarmLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->lower_alarm_limit; + _pvc.upperCtrlLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->upper_ctrl_limit; + _pvc.lowerCtrlLimit.s = (dbr_short_t) ((struct dbr_ctrl_short *) ctrlBuffer)->lower_ctrl_limit; + + break; + + case DBR_CTRL_LONG: + for (unsigned int i=0; i<_pvc.nelem; ++i) { + _pvc.val[i].l = (*(&((ctrlBuffer)->clngval.value)+i+offset)); + } + + _pvc.precision = 0; + _pvc.RISC_pad.s = 0; + + _pvc.alarmStatus = ((struct dbr_ctrl_int *) ctrlBuffer)->status; + _pvc.alarmSeverity = ((struct dbr_ctrl_int *) ctrlBuffer)->severity; + + memcpy(_pvc.units, &(((struct dbr_ctrl_int *) ctrlBuffer)->units), sizeof(char[MAX_UNITS_SIZE])); + + _pvc.upperDispLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->upper_disp_limit; + _pvc.lowerDispLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->lower_disp_limit; + _pvc.upperAlarmLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->upper_alarm_limit; + _pvc.upperWarningLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->upper_warning_limit; + _pvc.lowerWarningLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->lower_warning_limit; + _pvc.lowerAlarmLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->lower_alarm_limit; + _pvc.upperCtrlLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->upper_ctrl_limit; + _pvc.lowerCtrlLimit.l = (dbr_long_t) ((struct dbr_ctrl_int *) ctrlBuffer)->lower_ctrl_limit; + + break; + + case DBR_CTRL_ENUM: + + memcpy(_pvc.val.get(), &(&((ctrlBuffer)->cenmval.value))[offset], sizeof(dbr_short_t)*_pvc.nelem); + + _pvc.precision = 0; + _pvc.RISC_pad.s = 0; + _pvc.alarmStatus = ((struct dbr_ctrl_enum *) ctrlBuffer)->status; + _pvc.alarmSeverity = ((struct dbr_ctrl_enum *) ctrlBuffer)->severity; + _pvc.noStr = ((struct dbr_ctrl_enum *) ctrlBuffer)->no_str; + memcpy(_pvc.strs , &(((struct dbr_ctrl_enum *) ctrlBuffer)->strs), + sizeof(char)*MAX_ENUM_STRING_SIZE*MAX_ENUM_STATES); + + //no units + memcpy(_pvc.units,"",sizeof(char[MAX_UNITS_SIZE])); + + _pvc.upperDispLimit.us = 0; + _pvc.lowerDispLimit.us = 0; + _pvc.upperAlarmLimit.us = 0; + _pvc.upperWarningLimit.us = 0; + _pvc.lowerWarningLimit.us = 0; + _pvc.lowerAlarmLimit.us = 0; + _pvc.upperCtrlLimit.us = 0; + _pvc.lowerCtrlLimit.us = 0; + + break; + + case DBR_CTRL_STRING: + + memcpy(_pvc.val.get(), &(&((ctrlBuffer)->cstrval.value))[offset], sizeof(dbr_string_t)*_pvc.nelem); + _pvc.alarmStatus = ((struct dbr_sts_string *) ctrlBuffer)->status; + _pvc.alarmSeverity = ((struct dbr_sts_string *) ctrlBuffer)->severity; + + memcpy(_pvc.units,"",sizeof(char[MAX_UNITS_SIZE])); + + _pvc.upperDispLimit.us = 0; + _pvc.lowerDispLimit.us = 0; + _pvc.upperAlarmLimit.us = 0; + _pvc.upperWarningLimit.us = 0; + _pvc.lowerWarningLimit.us = 0; + _pvc.lowerAlarmLimit.us = 0; + _pvc.upperCtrlLimit.us = 0; + _pvc.lowerCtrlLimit.us = 0; + + break; + + default: + break; + } + + return ICAFE_NORMAL; + +#undef __METHOD__ +}; + +////////////////////////////////////// Monitors ////////////////////////////////////////// + + +/** + * \brief Starts a monitor on the epics channel + * \param mp input: MonitorPolicy class \n + * mp.eventID output: evid identifying the monitor subscription + * \return ECA_NORMAL - normal sucessful completiom + * \return ECA_BADCHID - corrupted chid + * \return ECA_BADTYPE - invalid DBR_XXXX type + * \return ECA_ALLOCMEM - a local database event add failed + */ +int Conduit::monitorStart(MonitorPolicy &mp) const { +#define __METHOD__ "Conduit::monitorStart(MonitorPolicy mp)" + + + //cout << __METHOD__ << " mp.getDbrDataType()= " << mp.getDbrDataType() << endl; + + evid eventID; + int status = ca_create_subscription(mp.getDbrDataType(), mp.getNelem(), channelRegalia.channelID, mp.getMask(), + mp.getHandler(), (void *) mp.getUserArgs(), &eventID); + + mp.setEventID(eventID); + return status; +#undef __METHOD__ +}; + + +/** + * \brief Stops a monitor on the epics channel + * \param eventID input: evid + * \return ECA_NORMAL if OK else ECA_BADCHID (corrupted CHID) + */ +int Conduit::monitorStop(evid eventID) const { +#define __METHOD__ "Conduit::monitorStop(evid eventID)" + + return ca_clear_subscription(eventID); + +#undef __METHOD__ +}; diff --git a/src/conduitGroup.cpp b/src/conduitGroup.cpp new file mode 100644 index 0000000..e28f6f1 --- /dev/null +++ b/src/conduitGroup.cpp @@ -0,0 +1,204 @@ +/// +/// \file conduitGroup.cc +/// \author Jan Chrin, PSI +/// \date November 2014 +/// \version CAFE 1.0.0 + +#include +#include +#include +#include +//include +//include + +unsigned int ConduitGroup::groupHandleNext=0; + +/** + * ConduitGroup destructor \n + * Good place to clean up! + */ +ConduitGroup::~ConduitGroup(void){ +}; + +/** + * ConduitGroup constructor \n + * + */ +ConduitGroup::ConduitGroup(void){ +}; + + +/** + * ConduitGroup constructor has:\n + * \param _groupName assigned group name + * \param _ccc ca_client_context + * \param _groupID unique group identifier (CA_SYNC_GID) + * \param _nMember number of members in group + * \param _mHandle handlt to Conduit object + */ +ConduitGroup::ConduitGroup(const char * _groupName, ca_client_context * _ccc, CA_SYNC_GID _groupID, + unsigned int _nMember, unsigned int * _mHandle){ + + ccc = _ccc; + groupName = _groupName; + groupID = _groupID; + nMember = _nMember; + mHandle = _mHandle; + + timeout_sg_pend_io = DEFAULT_TIMEOUT_SG_PEND_IO; + + channelTimeoutPolicySGGet.setTimeout(DEFAULT_TIMEOUT_SG_PEND_IO); + channelTimeoutPolicySGPut.setTimeout(DEFAULT_TIMEOUT_SG_PEND_IO); + + channelTimeoutPolicySGGet.setDefaultTimeout(DEFAULT_TIMEOUT_SG_PEND_IO); + channelTimeoutPolicySGPut.setDefaultTimeout(DEFAULT_TIMEOUT_SG_PEND_IO); + + + ++groupHandleNext; + groupHandle = groupHandleNext; + + + mStatus = new int [nMember]; + mRule = new bool[nMember]; + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + + for (unsigned int i=0; i guard ( pcac->mutex ); + pcasg = pcac->lookupCASG ( guard, groupID ); + if ( pcasg ) { + status = pcasg->block ( + pcac->pCallbackGuard.get (), guard, channelTimeoutPolicySGPut.getTimeout() ); + } + else { + status = ECA_BADSYNCGRP; + } + } + if ( pcasg ) { + sync_group_reset ( *pcac, *pcasg ); + } + } + */ + //ca_poll(); + //ca_sg_test(groupID); + //sleep(1); + + + + if (groupStatus== ECA_TIMEOUT) { + CAFEStatus cafeStatus; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECA_TIMEOUT); + } + //groupStatus is ECA_NORMAL even if one of the channels is disconnected + +return groupStatus; +#undef __METHOD__ +}; diff --git a/src/connect.cpp b/src/connect.cpp new file mode 100644 index 0000000..f151106 --- /dev/null +++ b/src/connect.cpp @@ -0,0 +1,2470 @@ +/// +/// \file connect.cc +/// \author Jan Chrin, PSI +/// \date November 2013 +/// \version CAFE 1.0.0 +/// + +#include "connect.h" +#include "conduitFriends.h" +#include "conduitConnectionHandlerArgs.h" + +#if HAVE_PYTHON_H + + #if HAVE_PYCAFE_EXT + #include + #include + #else + #include + #endif + + #if HAVE_LINUX + #include + #endif + #if HAVE_WIN32 + #include + #endif +#endif + + +/** + * Connect::epicsVersion + * + * Establishes virtual circuit to epics process variable + * + * \param major input + * \param minor input + * \param patch input + * \return 31412 for v3.14.12 + * + */ +unsigned short Connect::epicsVersion(unsigned short & major, unsigned short & minor, unsigned short & patch) { + + major=EPICS_MAJOR; + minor=EPICS_MINOR; + patch=EPICS_PATCH; + return major*10000+minor*100+patch; +} + +///////////////////////////////////////////////////////////////////// +////// PRIVATE METHODS ////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////// +/** + * Connect::createChannel + * + * Establishes virtual circuit to epics process variable + * + * \param handle input + * \param pv input: process variable + * \param pCh output: channel identifier (chid) + * \return status ECA_NORMAL if all OK else ECA_BADTYPE, ECA_STRTOBIG, ECA_ALLOCMEM + * + */ +int Connect::createChannel(unsigned int handle, const char * pv, chid &pCh) { +#define __METHOD__ "Connect::createChannel(unsigned int handle, const char * pv, chid &pCh)" + + cafeConduit_set_by_handle & handle_index= cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle =handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + + status = ca_create_channel(pv, channelCreatePolicy.getHandler(), (void *) handle, + channelCreatePolicy.getPriority() , &pCh); + + + if(pCh!=NULL) { + + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_channelID (pCh) ); + if(MUTEX){cafeMutex.unlock();} //unlock + + //Install the access rights state change callback handler + if (ADD_EXCEPTION_EVENT==true) { + ca_add_exception_event(callbackHandlerException, (void *) handle); + } + + ca_replace_access_rights_event(pCh, callbackHandlerAccessRights); + } + + + + if (status != ECA_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//"<< __METHOD__ << " ca_create_channel failed: " << endl; + cafeStatus.report(status); + + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_status (status) ); + if(MUTEX){cafeMutex.unlock();} //unlock + return (int) status; + } + + + + //What is the POLICY!?? + //To Flush or to Pend this is the question! + + if (channelOpenPolicy.getWhenToFlushSendBuffer()==FLUSH_AFTER_EACH_CHANNEL_CREATION) { + + channelOpenPolicy.flushSendBufferNow(); + } + + + // Peculiar if true + if (status == ECA_EVDISALLOW) { + cout << __FILE__ << "//" << __LINE__ << "//"<< __METHOD__ << " inappropriate function " << endl; + cafeStatus.report(status); + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_status (status) ); + if(MUTEX){cafeMutex.unlock();} //unlock + } + } + else { + return ECAFE_INVALID_HANDLE; + } + + +return (int) status; + +#undef __METHOD__ +} + + + +/** + * Connect::createHandle + * + * Creates handle and calls createChannel to establish virtual circuit to epics process variable + * + * \param pv input: process variable + * \param ccc input: ca_client_context + * \param handle input: handle + * \exception CAFEException_pv if unable to create channel virtual circuit + * \return status ICAFE_NORMAL if all OK + */ +int Connect::createHandle(const char * pv, ca_client_context * ccc, unsigned int &handle) + throw (CAFEException_pv) +{ +#define __METHOD__ "Connect::createHandle()" + + chid pCh = NULL; + std::pair p; + + // unsigned int uniqueID =helper.convertToUniqueNumber(pv,ccc); + // CAFEConduit object initialized and placed into hash map + + if(MUTEX){cafeMutex.lock();} //lock + p = cs.insert(Conduit(pv, ccc, + channelRequestPolicyMasterPut, channelRequestPolicyMasterGet, + channelGetActionWhenMonitorPolicyMaster, pyCafeFlag));// uniqueID)); + if(MUTEX){cafeMutex.unlock();} //unlock + + ///Conduit cc = *(p.first); + + // The following should not happen as we do a pre-check in Connect::open + // p.second true insert success + // p.second false insert failed as pair already exists + //has handle no exceeded limit + if (!(p.second)) { + cout << "HANDLE ALREADY IN USE! " << endl; + cout << "ISSUING NEW HANDLE FOR PV= " << pv << endl; + cout << "Next free handle is " << handleHelper.getNextFreeHandle() << endl; + Conduit::handleNext=handleHelper.getNextFreeHandle()-1; + if(MUTEX){cafeMutex.lock();} //lock + p = cs.insert(Conduit(pv, ccc, + channelRequestPolicyMasterPut, channelRequestPolicyMasterGet, + channelGetActionWhenMonitorPolicyMaster, pyCafeFlag)); + if(MUTEX){cafeMutex.unlock();} //unlock + } + + if (!(p.second)) { + cout << "FAILED AGAIN" << endl; + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv((*(p.first)).pv.c_str(), (*(p.first)).pvAlias.c_str(), + (*(p.first)).getHandle(), (*(p.first)).getChannelID(), + ECAFE_HASH_UNIQUEID_EXISTS, __METHOD__, __LINE__); + throw (e); + return ECAFE_HASH_UNIQUEID_EXISTS; + } + + + ///_handle=cc.getHandle(); + handle=(*(p.first)).getHandle(); + + + + // Normal return is ECA_TIMEOUT if pend_io/pend_event is instigated!! + status=createChannel(handle, pv, pCh); + + + // Channel Access will spit out an Invalid String Error if pv not a string! + // Possible Errors from ca_create_channel: ECA_NORMAL, ECA_BADTYPE, ECA_STRTOBIG, ECA_ALLOCMEM + // Possible Error from ca_pend_event: ECA_EVDISALLOW + // IF FAIL then ERASE HANDLE and clear_channel if pCH exists!! + + + //IF FAILED THROW EXCEPTION + if (status == ECA_BADSTR) { + + // Connect::close(handle); //Cannot close else segmentation fault + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv("empty", "empty", (*(p.first)).getHandle(), pCh, status, + __METHOD__, __LINE__); + throw (e); + return status; + } + + else if (status != ECA_NORMAL && status != ECA_TIMEOUT) { + + Connect::close(handle); + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv((*(p.first)).pv.c_str(), (*(p.first)).pvAlias.c_str(),(*(p.first)).getHandle(), pCh, status, + __METHOD__, __LINE__); + throw (e); + return status; + } + else if (pCh == NULL) { + Connect::close(handle); + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv( (*(p.first)).pv.c_str(), (*(p.first)).pvAlias.c_str(),(*(p.first)).getHandle(), pCh, ECAFE_NULLCHID, + __METHOD__, __LINE__); + throw (e); + return ECAFE_NULLCHID; + } + + // + // testing use of handels and cs + // + + +return status; + +#undef __METHOD__ +} + + +///////////////////////////////////////////////////////////////////// +////// PUBLIC METHODS /////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////// + +/** + * Called once prior to making any channel access calls \n + * Specifies that preemptive callback is allowed: + * ca_enable_preemptive_callback + * \exception CAFEException_init ECA_ALLOCMEM if memory space could not be allocated + * \return status ECA_NORMAL if OK else throws an exception + */ +int Connect::init() throw (CAFEException_init) { +#define __METHOD__ "Connect::init()" + + try { + status=init(ca_enable_preemptive_callback); + } + catch (CAFEException_init & e){ + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << e.what() << endl; + throw e; + } + catch (...){ + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "UNKNOW EXCEPTION!" << endl; + } + + + return status; + +#undef __METHOD__ +}; + + +/** + * Called once prior to making any channel access calls \n + * \param select input: enum ca_preemptive_callback_select \n + * {ca_disable_preemptive_callback=0, ca_enable_preemptive_callback=1} + * \exception CAFEbad_allocMem ECA_ALLOCMEM if memory space could not be allocated + * \return status ECA_NORMAL if OK else else throws an exception + */ +int Connect::init(ca_preemptive_callback_select select) throw (CAFEException_init) { +#define __METHOD__ "Connect::init(ca_preemptive_callback_select)" + + status = ca_context_create(select); + + if (status != ECA_NORMAL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + + if (status==ECA_ALLOCMEM) { + CAFEException_init e; + throw (e); + } + else if (status==ECA_NOTTHREADED) { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + } + else { + cout << "THE GIVEN RETURN CODE DOES NOT MATCH THE EPICS DOCUMENTATION!" << endl; + cout << "PLEASE REPORT THE ABOVE STATUS CODE TO THE AUTHOR. Thanks! " << endl; + } + } + + +#if HAVE_PYTHON_H + + #if HAVE_PYCAFE_EXT + Py_Initialize(); + //dlopen("libpython2.6.so", RTLD_GLOBAL|RTLD_LAZY); + + //dlopen("/opt/gfa/python-3.5/latest/lib/libpython3.5m.so", RTLD_GLOBAL|RTLD_LAZY); + + initPyCafe(); //only if PyCafe.h as opposed to PyCafe_api.h + PyEval_InitThreads(); + + #else + Py_Initialize(); + + + //dlopen("libpython2.6.so", RTLD_GLOBAL|RTLD_LAZY); + //#if HAVE_LINUX + // dlopen("/opt/gfa/python-3.5/latest/lib/libpython3.5m.so", RTLD_GLOBAL|RTLD_LAZY); + //#endif + //PyEval_InitThreads(); + //import_PyCafe(); Do this in conduit.cc + #endif + +#endif + + + return status; + +#undef __METHOD__ +}; + + + +/** + * \brief Establishes whether all callbacks from methodCallbacks.cpp have completed\n + * - If yes, nothing further to do, else test again \n + * - Theis method is used for callbacks initiated on creation of channel only\n + * + * \param hArray output: array of reference handles to Conduit objects + * \param nHandles input: size ofhArray + * \return true if all callbavks completed else false + */ +bool Connect::initCallbackComplete(unsigned int * hArray, unsigned int nHandles) { +#define __METHOD__ "Connect:initCallbackComplete:" + + ChannelRequestStatus cre, crc, crs, crn; + + for (unsigned int i=0; i < nHandles; ++i) { + if(handleHelper.isChannelConnected(hArray[i])) { + handleHelper.getChannelRequestStatusGetCtrl (hArray[i], crc); + handleHelper.getChannelRequestStatusGetSTSACK(hArray[i], crs); + handleHelper.getChannelRequestStatusGet (hArray[i], cre); + handleHelper.getChannelRequestStatusGet (hArray[i], crn); + + if (crc.getCallbackProgressKind()==(CAFENUM::CallbackProgressKind) CAFENUM::PENDING || + crs.getCallbackProgressKind()==(CAFENUM::CallbackProgressKind) CAFENUM::PENDING || + cre.getCallbackProgressKind()==(CAFENUM::CallbackProgressKind) CAFENUM::PENDING || + crn.getCallbackProgressKind()==(CAFENUM::CallbackProgressKind) CAFENUM::PENDING + ) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << handleHelper.getPVFromHandle(hArray[i]) << " with handle " << hArray[i] << endl; + cout << "Value of 1 is pending, Value of 2 is complete" << endl; + cout << "Callback PENDING for ClassName?: " << crn.getCallbackProgressKind() << endl; + cout << "Callback PENDING for Ctrl?: " << crc.getCallbackProgressKind() << endl; + cout << "Callback PENDING for STSACK?: " << crs.getCallbackProgressKind() << endl; + cout << "Callback PENDING for GET?: " << cre.getCallbackProgressKind() << endl; + + return false; + } + + } + } + + return true; + +#undef __METHOD__ +} + + +/** + * \brief Establishes virtual circuits for a vector of epics process variables \n + * - Check if handle already exists for given pv/ca_client_context \n + * - If yes, nothing further to do, else create channel \n + * - Determine connection status and properties of the pv \n + * - Create CAFEConduit object and add to multi-index hash table \n + * + * \param pvArray input: array of process variables (PVNAME_SIZE) + * \param handleArray output: array of reference handle to Conduit objects + * \param nHandles input: size of pvArray + * \exception CAFEException_open if unable to create channel virtual circuit + * \return status ICAFE_NORMAL if OK + */ +int Connect::open(const char ** pvArray, unsigned int * handleArray, + const unsigned int nHandles) + throw (CAFEException_open) { +#define __METHOD__ "Connect::open(const char **, unsigned int *, const unsigned int)" + + bool flushAtEndFlag=false; + + if (channelOpenPolicy.getWhenToFlushSendBuffer()==FLUSH_AFTER_EACH_CHANNEL_CREATION) { + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + flushAtEndFlag=true; + } + + for (unsigned int i=0; i < nHandles; ++i) { + try { + status=open(pvArray[i], handleArray[i]); + } + catch (CAFEException_open &e) { + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + throw(e); + return status; + } + } + + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + return ICAFE_NORMAL; + +#undef __METHOD__ +}; + + +/** + * \brief Establishes virtual circuits for a vector of epics process variables \n + * - Check if handle already exists for given pv/ca_client_context \n + * - If yes, nothing further to do, else create channel \n + * - Determine connection status and properties of the pv \n + * - Create CAFEConduit object and add to multi-index hash table \n + * + * \param pvArrayS input: array of process variables givenas "strings" + * \param handleArray output: array of reference handle to Conduit objects + * \param nHandles input: size of pvArray + * \exception CAFEException_open if unable to create channel virtual circuit + * \return status ICAFE_NORMAL if OK + */ +int Connect::open(const string *pvArrayS, unsigned int *handleArray, const unsigned int nHandles) + throw (CAFEException_open) { +#define __METHOD__ "Connect::open(const std::string *, unsigned int *, unsigned int)" + + + bool flushAtEndFlag=false; + + if (channelOpenPolicy.getWhenToFlushSendBuffer()==FLUSH_AFTER_EACH_CHANNEL_CREATION) { + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + flushAtEndFlag=true; + } + + + + for (unsigned int i=0; i < nHandles; ++i) { + try { + status=open(pvArrayS[i].c_str(), handleArray[i]); + } + catch (CAFEException_open &e) { + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + throw(e); + return status; + } + } + + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + return ICAFE_NORMAL; + +#undef __METHOD__ + +}; + + +/** + * \brief Establishes virtual circuits for a vector of epics process variables \n + * - Check if handle already exists for given pv/ca_client_context \n + * - If yes, nothing further to do, else create channel \n + * - Determine connection status and properties of the pv \n + * - Create CAFEConduit object and add to multi-index hash table \n + * + * \param pvV input: vector of process variables (string) + * \param handleV output: vector of reference handle to Conduit objects + * \exception CAFEException_open if unable to create channel virtual circuit + * \return status ICAFE_NORMAL if OK + */ +int Connect::open(vector pvV, vector &handleV) + throw (CAFEException_open) { +#define __METHOD__ "Connect::open(vector, vector &)" + + unsigned int _h=0; + handleV.clear(); + handleV.reserve(pvV.size()); + + + bool flushAtEndFlag=false; + + if (channelOpenPolicy.getWhenToFlushSendBuffer()==FLUSH_AFTER_EACH_CHANNEL_CREATION) { + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + flushAtEndFlag=true; + } + + + + for (unsigned int i=0; i < pvV.size(); ++i) { + try { + status=open(pvV[i].c_str(),_h); + handleV.push_back(_h); + } + catch (CAFEException_open &e) { + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + throw(e); + return status; + } + } + + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + return ICAFE_NORMAL; + +#undef __METHOD__ +}; + + + +/** + * \brief Establishes virtual circuits for a vector of epics process variables \n + * - Check if handle already exists for given pv/ca_client_context \n + * - If yes, nothing further to do, else create channel \n + * - Determine connection status and properties of the pv \n + * - Create CAFEConduit object and add to multi-index hash table \n + * + * \param pvV input: vector of process variables (char *) + * \param handleV output: vector of reference handle to Conduit objects + * \exception CAFEException_open if unable to create channel virtual circuit + * \return status ICAFE_NORMAL if OK + */ +int Connect::open(vector pvV, vector &handleV) + throw (CAFEException_open) { +#define __METHOD__ "Connect::open(vector, vector &)" + + unsigned int _h=0; + handleV.clear(); + handleV.reserve(pvV.size()); + + + bool flushAtEndFlag=false; + + if (channelOpenPolicy.getWhenToFlushSendBuffer()==FLUSH_AFTER_EACH_CHANNEL_CREATION) { + channelOpenPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + flushAtEndFlag=true; + } + + + for (unsigned int i=0; i < pvV.size(); ++i) { + try { + status=open(pvV[i],_h); + handleV.push_back(_h); + } + catch (CAFEException_open &e) { + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + throw(e); + return status; + } + } + + if (flushAtEndFlag) { + channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION + } + + + return ICAFE_NORMAL; + +#undef __METHOD__ +}; + + + + +/** + * \brief Establishes virtual circuit to epics process variable and defines its pv alias name \n + * - Check if handle already exists for given pv/ca_client_context \n + * - If yes, nothing further to do, else create channel \n + * - Determine connection status and properties of the pv \n + * - Create Conduit object and add to multi-index hash table \n + * \param _pv input: process variable + * \param _pvAlias input: process variable alias + * \param handle output: reference handle to Conduit object + * \exception CAFEException_pvOpen if unable to create channel virtual circuit + * \return status ICAFE_NORMAL if OK + */ +int Connect::open(const char * _pv, const char * _pvAlias, unsigned int & handle) + throw (CAFEException_open) { +#define __METHOD__ "Connect::open(const char * pv, const char * _pvAlias, unsigned int & _handle)" + + try { + status = open (_pv, handle); + } + catch (CAFEException_open &e) { + throw(e); + return status; + } + + if (handle != 0) { + try { + status=setPVAlias(handle,_pvAlias); + } + catch (CAFEException_open & badpv) { + throw(badpv); + return status; + } + } + return status; + +#undef __METHOD__ +}; + + + /** + * \brief Establishes virtual circuit to epics process variable \n + * - Check if handle already exists for given pv/ca_client_context \n + * - If yes, nothing further to do, else create channel \n + * - Determine connection status and properties of the pv \n + * - Create Conduit object and add to multi-index hash table \n + * + * \param _pv input: process variable + * \param handle output: reference handle to Conduit object + * \exception CAFEException_pvOpen if unable to create channel virtual circuit + * \return status ICAFE_NORMAL if OK + */ + int Connect::open(const char * _pv, unsigned int &handle) + throw (CAFEException_open) { + #define __METHOD__ "Connect::open(const char * _pv, unsigned int &handle)" + + char pv[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(_pv, pv); + + // Determine ca-client context + ca_client_context * ccc = ca_current_context(); + + if (ccc == NULL) { + + try{ + status=init( ); // ca_disable_preemptive_callback + } + catch(CAFEException_init){ + //status will be ECA_ALLOCMEM + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv(pv, pv, 0, NULL, + ECA_ALLOCMEM,__METHOD__, __LINE__); + CAFEException_open badpv; + badpv.pvEx=e; + throw(badpv); + + return status; + } + + ccc = ca_current_context(); + } + + // Check if handle already exists for this pv + // Handles for pvs that are members of a group are treated separately! + + handle = handleHelper.getHandleFromPV(pv,ccc); + + + if (handle != 0) { + return ICAFE_NORMAL; + } + + //This is called in the above + + try { + + + status = createHandle(pv, ccc, handle); + } + catch (CAFEException_pv & e) { + CAFEException_open badpv; + badpv.pvEx=e; + throw(badpv); + return status; + } + + + return ICAFE_NORMAL; + + #undef __METHOD__ + }; + + + + /** + * \brief Defines a pv alias for pv and adds this to multi-index hash table + * \param handle input: handle + * \param _pvAlias input: process variable alias + * \exception CAFEException_pvOopen if unable to set an alias + * \return status ICAFE_NORMAL if OK + */ + int Connect::setPVAlias(unsigned int handle, const char * _pvAlias) throw(CAFEException_open){ + #define __METHOD__ "Connect::setPVAlias(unsigned int * _handle, const char * _pv)" + + Helper helper; + char pvAlias[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(_pvAlias, pvAlias); + + _pvAlias=pvAlias; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + ca_client_context * ccc = ca_current_context(); + + //Need to make sure that Alias is NOT already in use as a PVName for another handle (would be strange!) + unsigned int pvHandle=handleHelper.getHandleFromPV(pvAlias, ccc); + + if ( pvHandle > 0 && pvHandle != handle) { + + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv((*it_handle).pv.c_str(), _pvAlias, + (*it_handle).getHandle(), (*it_handle).getChannelID(), + ECAFE_PVALIAS_INVALID,__METHOD__, __LINE__); + CAFEException_open badpv; + badpv.pvEx=e; + throw(badpv); + return ECAFE_PVALIAS_PREV_DEF; + } + + + pvHandle=handleHelper.getHandleFromPVAlias(pvAlias, ccc); + + //Need to make sure that Alias is NOT already in use + if ( pvHandle > 0 && pvHandle != handle) { + + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv((*it_handle).pv.c_str(), _pvAlias, + (*it_handle).getHandle(), (*it_handle).getChannelID(), + ECAFE_PVALIAS_PREV_DEF,__METHOD__, __LINE__); + CAFEException_open badpv; + badpv.pvEx=e; + throw(badpv); + return ECAFE_PVALIAS_PREV_DEF; + } + + + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_pvAlias( _pvAlias)); + if(MUTEX){cafeMutex.unlock();} //unlock + + } else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + + #undef __METHOD__ + }; + + + + /** + * \brief Closes connection for channel within a ca_client_context and deletes corresponding handle \n + * The handle must be within the same context. \n + * Note that this does NOT cause the channel's disconnect handler to be called. \n + * It does however invoke event handlers for subscriptions (i.e., monitors). \n + * The Conduit handle is erased + * \param handleArray input: array of handles + * \param nHandles input: size of array + * \return ECA_NORMAL if all OK else first encountered error + */ + int Connect::closeChannels(unsigned int * handleArray, unsigned int nHandles) { + #define __METHOD__ "Connect::closeChannels(unsigned int * handleArray, unsigned int nHandles)" + + + ca_client_context * cctLocal= ca_current_context(); + + if (cctLocal == NULL ) { + // We do not know if this channel belongs to this context! + //cs.erase(it_handle); + return ECAFE_NULLCONTEXT; + } + + + //copy array to vector and remove dupliacte handles + vector vec; + vec.reserve(nHandles); + vec.insert(vec.end(), &handleArray[0], &handleArray[nHandles]); + + + //Remove duplicate values + sort( vec.begin(), vec.end() ); + vec.erase( unique( vec.begin(), vec.end() ), vec.end() ); + + + int statusGroup = ECA_NORMAL; + int status = ICAFE_NORMAL; + + bool isClearChannel =false; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + if ((*it_handle).getClientContext() == NULL ) { + //Channel already forcefully cleared + cs.erase(it_handle); + return ECAFE_NULLCONTEXT; + } + + if ((*it_handle).getClientContext() != cctLocal ) { + return ECAFE_WRONG_CA_CONTEXT; + } + + if ((*it_handle).getChannelID() != NULL) { + + + status = ca_clear_channel((*it_handle).getChannelID()); + + if (status != ECA_NORMAL) { + return status; //ECA_BADCHID + } + + status = ca_pend_io(channelClosePolicy.getTimeout()); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, free_dataBuffers()); + if(MUTEX){cafeMutex.unlock();} + } + + cs.erase(it_handle); + return status; + } + else { + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ((*itcs).handle == handle) { + + if ((*itcs).getClientContext() == NULL ) { + //Channel already forcefully cleared + cs.erase(itcs); + return ECAFE_NULLCONTEXT; + } + + if ((*itcs).getClientContext() != cctLocal ) { + return ECAFE_WRONG_CA_CONTEXT; + } + + if ((*itcs).getChannelID() != NULL) { + + status = ca_clear_channel((*itcs).getChannelID()); + if (status != ECA_NORMAL) { + return status; //ECA_BADCHID + } + + + status = ca_pend_io(channelClosePolicy.getTimeout()); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, free_dataBuffers()); + if(MUTEX){cafeMutex.unlock();} + } + + cs.erase(itcs); + return status; + } + } + return ECAFE_INVALID_HANDLE; + } + + return status; // This line is not reached + + #undef __METHOD__ + } + + + /** + * \brief Closes all channel connections within a ca_client_context and removes the corresponding handles. \n + * Note that this does NOT cause the channel's disconnect handler to be called. \n + * It does however invoke event subscriptions (for monitors). \n + * Corresponding Conduit handles are erased. + * \return ECA_NORMAL if all OK; error if one or more channelIDs fail to close + */ + int Connect::closeChannels() { + #define __METHOD__ "Connect::closeChannels" + ca_client_context * cctLocal= ca_current_context(); + + if (cctLocal == NULL ) { + return ECAFE_NULLCONTEXT; + } + + return Connect::closeChannels(cctLocal); + + #undef __METHOD__ + } + + /** + * \brief Closes all channel connections within the given ca_client_context and + * removes the corresponding handles. \n + * Note that this does NOT cause the channel's disconnect handler to be called. \n + * It does however invoke event subscriptions (for monitors). \n + * Corresponding Conduit handles are erased. + * \return ECA_NORMAL if all OK; error if one or more channelIDs fail to close + */ + int Connect::closeChannels(ca_client_context * cctLocal) { + #define __METHOD__ "Connect::closeChannelsca_client_context * cctLocal)" + + if (cctLocal == NULL ) { + return ECAFE_NULLCONTEXT; + } + + int statusGroup = ICAFE_NORMAL; + + bool isClearChannel=false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ((*itcs).getClientContext() != cctLocal ) { + continue; + } + + // Only clear channel if its ca_client_context is valid + if ((*itcs).getChannelID() != NULL) { + status = ca_clear_channel((*itcs).getChannelID()); + if (status != ECA_NORMAL){ + statusGroup = status; + } + isClearChannel=true; + } + } + + // Even if Null Context remove handle. This could happen if a ca_context_destroy was called + if (isClearChannel) { + status = ca_pend_io(channelClosePolicy.getTimeout()); + if (status != ECA_NORMAL) { + statusGroup = status; + } + + cafeConduit_set_by_handle & handle_index = cs.get (); + + // Loop through and identify valid elements and clear their databuffers + // i.e. only for those channels within the ca_client_context + + // Removing elements in maps and multimaps p.205 Josuttis + // Calling erase() for the element to which one is referring to + // with itcs invalidates itcs as an iterator of cs. Having ++itcs + // in the for loop line results in undefined behaviour! + // The following is the correct way to remove elements to which + // an iterator refers. Note that itcs++ increments itcs so that + // it refers to the next element but yields a copy of its original value. + // Thus itcs does not refer to the element that is removed when erase() + // is called. Hurrah! + + //cout << "--------------------------------------------------------------------" << endl; + //cout << "CAFE HAS CLOSED ALL CHANNELS WITHIN THE CA_CLIENT_CONTEXT: " << ca_current_context() << endl; + //cout << "AND IS ERASING THEIR RESPECTIVE HANDLES:" << endl; + //cout << "--------------------------------------------------------------------" << endl; + + if(MUTEX){cafeMutex.lock();} + + for (itcs = cs.begin(); itcs != cs.end(); ) { + if ((*itcs).getChannelID() != NULL && + ((*itcs).getClientContext() == cctLocal)) + { + // good test of memory handling + handle_index.modify(itcs, free_dataBuffers()); + cs.erase(itcs++); + } + else { + ++itcs; + } + }//for + //cout << endl; + //cout << "----------------------------------------------------------------" << endl << endl; + if(MUTEX){cafeMutex.unlock();} + } + return statusGroup; + + #undef __METHOD__ + } + + + /** + * \brief Closes channel connections (even if in other thread) and deletes handle. \n + * Note that this does NOT cause the channel's disconnect handler to be called. \n + * It does however invoke event handlers for subscriptions (i.e. monitors). \n + * The Conduit handle is erased + * \param handle input + * \return ECA_NORMAL if all OK + */ + int Connect::closeHandle(unsigned int handle) { + #define __METHOD__ "Connect::closeHandle" + + //We can close handle irrespective of ca_current_context! + ca_client_context * cctLocal= ca_current_context(); + + status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + + if ((*it_handle).getChannelID() != NULL && cctLocal != NULL ) { + + + status = ca_clear_channel((*it_handle).getChannelID()); + + + + if (status != ECA_NORMAL) { + return status; //ECA_BADCHID + } + + status = ca_pend_io(channelClosePolicy.getTimeout()); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, free_dataBuffers()); + if(MUTEX){cafeMutex.unlock();} + } + + cs.erase(it_handle); + return status; + } + else { + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end();) { + //Conduit cc = *itcs; + + //operator overload prints handle, pv and nelem + + if ((*itcs).handle == handle) { + if ((*itcs).getChannelID() != NULL && cctLocal != NULL) { + + status = ca_clear_channel((*itcs).getChannelID()); + if (status != ECA_NORMAL) { + return status; //ECA_BADCHID + } + + status = ca_pend_io(channelClosePolicy.getTimeout()); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, free_dataBuffers()); + if(MUTEX){cafeMutex.unlock();} + } + + cs.erase(itcs++); + return status; + } + else { + ++itcs; + } + } + return ECAFE_INVALID_HANDLE; + } + + return status; // This line is not reached + + #undef __METHOD__ + } + + + /** + * \brief Closes given channel connections (even if in other threads) and deletes their handles. \n + * Note that this does NOT cause the channel's disconnect handler to be called. \n + * It does however invoke event subscriptions (for monitors). \n + * All corresponding Conduit handles are erased. + * \param handleArray input: unsigned int * + * \param nHandles input: unsigned int + * \return ECA_NORMAL if all OK; error if one or more channelIDs fail to close + */ + int Connect::closeHandles(unsigned int * handleArray, unsigned int nHandles) { + #define __METHOD__ "Connect::closeHandles(unsigned int *) " + + + //copy array to vector and remove dupliacte handles + vector vec; + vec.reserve(nHandles); + vec.insert(vec.end(), &handleArray[0], &handleArray[nHandles]); + + + //Remove duplicate values + sort( vec.begin(), vec.end() ); + vec.erase( unique( vec.begin(), vec.end() ), vec.end() ); + + + int statusGroup = ECA_NORMAL; + int status = ICAFE_NORMAL; + + bool isClearChannel =false; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + if (ca_current_context() != NULL) { + + //for (unsigned int i=0; i (); + + // Loop through all elements and clear databuffers + if(MUTEX){cafeMutex.lock();} + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + //cout << " CLEAR CHANNEL " << (*itcs).getHandle () << endl; + handle_index.modify(itcs, free_dataBuffers()); + //cout << " CLEARED CHANNEL " << (*itcs).getHandle () << endl; + } + if(MUTEX){cafeMutex.unlock();} + + if(isCS) { + cs.clear(); + } + + + return statusGroup; + + #undef __METHOD__ + } + + + /** + * \brief Closes channels for the given channel access client context. \n + * Shuts down the 'local' channel access client context and frees allocated resources \n + * Note that in thread:stop, these two contexts are different!! \n + * Not essential as resources are normally automatically released by the system. \n + * This invokes the connection_handler callback function + * \return ECA_NORMAL if all OK or ECAFE_NULLCONTEXT if ca client context does not exist + */ + int Connect::contextDestroy(ca_client_context * cctLocal) { + #define __METHOD__ "Connect::contextDestroy(ca_client_context * cctLocal)" + + int statusCloseChannels=ICAFE_NORMAL; + + if (cctLocal == NULL) { + return ECAFE_NULLCONTEXT; + } + + //In case channels have not already been closed, then close them. + //Closing Channels within this context first! + statusCloseChannels = closeChannels(cctLocal); + + if (cctLocal==ca_current_context()){ + ca_context_destroy(); + } + + return statusCloseChannels; + + #undef __METHOD__ + } + + + /** + * \brief Shuts down a channel access client context and frees allocated resources + * Not essential as resources are normally automatically released by the system. + * This invokes the connection_handler callback function + * \return ECA_NORMAL if all OK or ECAFE_NULLCONTEXT if ca client context does not exist + */ + int Connect::contextDestroy() { + #define __METHOD__ "Connect::contextDestroy " + + // Determine ca-client context + ca_client_context * ccc = ca_current_context(); + + if (ccc == NULL) { + return ECAFE_NULLCONTEXT; + } + + //In case channels have not already been closed, then close them. + //Closing Channels within this context first! + closeChannels(ccc); + + ca_context_destroy(); + + return ICAFE_NORMAL; + + #undef __METHOD__ + } + + + + + + ///////////////////////// Monitors ////////////////////////////////////////////////// + + + /** + * \brief Monitor an array of PV with default MonitorPolicy object parameters + * \param handleV input: Array of handles to conduit object + * \param statusV output: Array of statuses + * \param monitorIDV output: Array of unique MonitorIDs + * \return overallStatus: ICAFE_NORMAL if all OK else the first ECAFE error encountered + */ +int Connect::monitorStart(vector handleV, vector &statusV, + vector &monitorIDV) { +#define __METHOD__ \ +"monitorStart(vector handleV, vector &statusV,vector &monitorIDV)" + statusV.clear(); + statusV.reserve(handleV.size()); + monitorIDV.clear(); + monitorIDV.reserve(handleV.size()); + + int overallStatus=ICAFE_NORMAL; bool isGood=true; + + //ChangePolicy TO FLUSH ONLY AT END!! (not yet tested!) + CAFENUM::ChannelWhenToFlushSendBufferPolicyKind previous=channelMonitorPolicy.getWhenToFlushSendBuffer() ; + + if (previous != FLUSH_DESIGNATED_TO_CLIENT) { + channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + } + + for (size_t i=0; i handleV, vector &statusV, + vector &mpV) { +#define __METHOD__ \ + "monitorStart(vector handleV, vector &statusV, vector &mpV) " + + if (mpV.size() < handleV.size()) { + //WARNING.... + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "WARNING VECTOR SIZE MISMATCH! vector has size " << mpV.size() + << " while handle vector size is " << handleV.size() << endl; + cout << "Adding default MonitorPolicy to handles: " << endl; + for (size_t i=mpV.size(); i < handleV.size(); ++i) { + MonitorPolicy mp; + mpV.push_back(mp); + cout << i << " " ; + } + cout << endl; + } + + statusV.clear(); + statusV.reserve(handleV.size()); + + int overallStatus=ICAFE_NORMAL; bool isGood=true; + + //ChangePolicy TO FLUSH ONLY AT END!! (not yet tested!) + CAFENUM::ChannelWhenToFlushSendBufferPolicyKind previous=channelMonitorPolicy.getWhenToFlushSendBuffer() ; + + if (previous != FLUSH_DESIGNATED_TO_CLIENT) { + channelMonitorPolicy.setWhenToFlushSendBuffer(FLUSH_DESIGNATED_TO_CLIENT); + } + + for (size_t i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + vector _mpV =(*it_handle).getMonitorPolicyVector(); + vector::iterator it; + + for (it = _mpV.begin(); it != _mpV.end(); ++it) { + if ( (*it).getID()==mp.getID()) { + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "MONITOR POLICY OBJECT ALREADY IN USE!! " << endl; + cafeStatus.report(ECAFE_NULLEVID); + status=ECAFE_NULLEVID; + return status; + } + } + + vector _mpiwV =(*it_handle).getMonitorPolicyInWaitingVector(); + vector::iterator itiw; + + for (itiw = _mpiwV.begin(); itiw != _mpiwV.end(); ++itiw) { + if ( (*itiw).getID()==mp.getID()) { + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "MONITOR POLICY OBJECT ALREADY IN WAITING!! " << endl; + cafeStatus.report(ECAFE_NULLEVID); + status=ECAFE_NULLEVID; + return status; + } + } + + // Check how many monitors have already been started. + if (_mpV.size()>= MAX_NO_MONITORS_PER_CHANNEL) { + cout << " HEY DUDE, YOU ALREADY HAVE " << MAX_NO_MONITORS_PER_CHANNEL + << " MONITORS ON THIS CHANNEL " << endl; + cout << " I AM NOT GOING TO START ANOTHER ONE FOR YOU!! " << endl; + return ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + } + + + //IS CHANNEL CONNECTED? + //IF NOT DELAY START OF MONITOR + + if (!(*it_handle).isConnected()) { + + // Check how many monitors are in aiting + if (_mpiwV.size()>= MAX_NO_MONITORS_PER_CHANNEL) { + cout << " HEY DUDE, YOU ALREADY HAVE " << MAX_NO_MONITORS_PER_CHANNEL + << " MONITORS WAITING TO START FOR THIS CHANNEL " << endl; + cout << " I AM NOT GOING TO ADD ANOTHER ONE FOR YOU!! " << endl; + return ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + } + + + //check in to vector + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_monitorPolicyInWaitingInsert(mp)); + if(MUTEX){cafeMutex.unlock();}; //unlock + + return ICAFE_MONITOR_DELAYED_AS_CONN_DOWN; + } + + //check mp and replace default values! + if (mp.getNelem()==0) { + mp.setNelem((*it_handle).getChannelRegalia().getNelem()); + } + else { + mp.setNelem(min(mp.getNelem(), (*it_handle).getChannelRegalia().getNelem())); + } + + if (mp.getDataType() == CAFE_NOT_REQUESTED) { + mp.setDataType((*it_handle).getChannelRegalia().getDataType()); + } + + if (mp.getUserArgs() == NULL) { + mp.setUserArgs((void *) (long long)(*it_handle).getHandle()); + } + + + status=(*it_handle).monitorStart(mp); + mp.setStatus(status); + + if (status==ICAFE_NORMAL) { + + //What is the POLICY!?? + //To Flush or to Pend this is the question! + + if (channelMonitorPolicy.getWhenToFlushSendBuffer()== + FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION) { + channelMonitorPolicy.flushSendBufferNow(); + } + + + if (mp.getEventID()==NULL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_NULLEVID); + return ECAFE_NULLEVID; + } + + //check in to vector + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_monitorPolicyInsert(mp)); + if(MUTEX){cafeMutex.unlock();}; //unlock + + _mpV =(*it_handle).getMonitorPolicyVector(); + + } + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + } + return ECAFE_INVALID_HANDLE; + } + + return status; + #undef __METHOD__ + }; + + + /** + * \brief Monitor a PV + * \param handle input: handle + * \param monitorID output: monitorID identifying the monitor subscription + * \return ICAFE_NORMAL if all OK else ECAFE error + */ + int Connect::monitorStart(unsigned int handle, unsigned int & monitorID) { + #define __METHOD__ "monitorStart(unsigned int handle, unsigned int & monitorID)" + + status = ICAFE_NORMAL; + evid eventID = NULL; + monitorID = (unsigned int) 0; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + vector _mpV =(*it_handle).getMonitorPolicyVector(); + + // Check how many monitors have already been started. + if (_mpV.size()>= MAX_NO_MONITORS_PER_CHANNEL) { + cout << " HEY DUDE, YOU ALREADY HAVE " << MAX_NO_MONITORS_PER_CHANNEL + << " MONITORS ON THIS CHANNEL " << endl; + cout << " I AM NOT GOING TO START ANOTHER ONE FOR YOU!! " << endl; + return ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + } + + + //IS CHANNEL CONNECTED? + //IF NOT DELAY START OF MONITOR + + if (!(*it_handle).isConnected()) { + + vector _mpiwV =(*it_handle).getMonitorPolicyInWaitingVector(); + + // Check how many monitors are in aiting + if (_mpiwV.size()>= MAX_NO_MONITORS_PER_CHANNEL) { + cout << " HEY DUDE, YOU ALREADY HAVE " << MAX_NO_MONITORS_PER_CHANNEL + << " MONITORS WAITING TO START FOR THIS CHANNEL " << endl; + cout << " I AM NOT GOING TO ADD ANOTHER ONE FOR YOU!! " << endl; + return ECAFE_MAX_MONITORS_PER_CHAN_EXCEEDED; + } + } + + + // Do Prechecks - verify channel exists + + MonitorPolicy mp;// = (*it_handle).getMonitorPolicy(); + + + //FIRST CHECK IF CONNECTED! + //Once connected, then we have this information stored + // + if ((*it_handle).getChannelRegalia().getCafeConnectionState() != ICAFE_CS_NEVER_CONN ) { + mp.setDataType((*it_handle).getChannelRegalia().getDataType()); + mp.setNelem((*it_handle).getChannelRegalia().getNelem()); + } + + mp.setUserArgs((void *) (long long) (*it_handle).getHandle()); + + status=monitorStart(handle, mp); + + monitorID=mp.getID(); + + if (status==ICAFE_NORMAL) { + + eventID=mp.getEventID(); + + if (eventID==NULL) { + return ECAFE_NULLEVID; + } + + } + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + } + return ECAFE_INVALID_HANDLE; + } + + return status; + #undef __METHOD__ + } + + + + /** + * \brief Stop all monitors + * \return ICAFE_NORMAL if all OK else ECAFE error + */ + int Connect::monitorStop(){ + #define __METHOD__ "monitorStop()" + + int statusGroup = ECA_NORMAL; + + bool isClearChannel =false; + + if (ca_current_context() != NULL) { + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + //HandleHelper::clearMonitorAction(unsigned int _handle) + + status=monitorStop ((*itcs).getHandle() ); + + if (status != ECA_NORMAL){ + statusGroup = status; + } + isClearChannel=true; + } + } + + if (isClearChannel) { + status = ca_pend_io(channelClosePolicy.getTimeout()); + if (statusGroup == ECA_NORMAL) { + statusGroup = status; + } + } + + return statusGroup; + + #undef __METHOD__ + } + + + /** + * \brief Stop all monitors for the given ca_client_context + * \return ICAFE_NORMAL if all OK else ECAFE error + */ + int Connect::monitorStop(ca_client_context * cctLocal){ + #define __METHOD__ "monitorStop(ca_client_context * cccLocal)" + + if (cctLocal == NULL ) { + return ECAFE_NULLCONTEXT; + } + + int statusGroup = ECA_NORMAL; + bool isClearChannel =false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ((*itcs).getClientContext() != cctLocal ) { + continue; + } + + status=monitorStop ((*itcs).getHandle() ); + + if (status != ECA_NORMAL){ + statusGroup = status; + } + isClearChannel=true; + } + + if (isClearChannel) { + status = ca_pend_io(channelClosePolicy.getTimeout()); + + if (statusGroup == ECA_NORMAL) { + statusGroup = status; + } + } + + return statusGroup; + + #undef __METHOD__ + } + + + /** + * \brief Stop all monitors for a vector of handles + * \param handleV input: vector of handles + * \param statusV output: vector of statuses + * \return overallStatus: ICAFE_NORMAL if all OK else ECAFE error of first reported failure + */ + int Connect::monitorStop(vector handleV, vector &statusV){ + #define __METHOD__ "monitorStop(vector handleV, vector statusV)" + + statusV.clear(); + statusV.reserve(handleV.size()); + + int overallStatus=ICAFE_NORMAL; bool isGood=true; + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + evid eventID=NULL; + unsigned int monitorID= (unsigned int) NULL; + + //Loop all round those in waiting and those that started! + + vector _mpiwV =(*it_handle).getMonitorPolicyInWaitingVector(); + vector::iterator itiw; + + for (itiw = _mpiwV.begin(); itiw != _mpiwV.end(); ++itiw) { + //erase vector + if(MUTEX){cafeMutex.lock();}; //lock + monitorID=(*itiw).getMonitorID(); + handle_index.modify(it_handle, change_monitorPolicyInWaitingErase(monitorID)); + if(MUTEX){cafeMutex.unlock();}; //unlock + } + + + vector _mpV =(*it_handle).getMonitorPolicyVector(); + vector::iterator it; + + for (it = _mpV.begin(); it != _mpV.end(); ++it) { + eventID=(*it).getEventID(); + monitorID=(*it).getMonitorID(); + //monitor has been removed + if (eventID==NULL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Monitor never started or previously stopped " << endl; + cafeStatus.report(ECAFE_NULLEVID); + status=ECAFE_NULLEVID; + continue; + } + + //cout << "MS eventID " << eventID << " monitorID " << monitorID + // << " for h= " << handle < (); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + + evid eventID=NULL; + + //Monitor ID in waiting? + vector _mpiwV =(*it_handle).getMonitorPolicyInWaitingVector(); + vector::iterator itiw; + + for (itiw = _mpiwV.begin(); itiw != _mpiwV.end(); ++itiw) { + if ( (*itiw).getID()==monitorID) { + + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_monitorPolicyInWaitingErase(monitorID)); + if(MUTEX){cafeMutex.unlock();}; //unlock + + return status; + } + }//for + + + vector _mpV =(*it_handle).getMonitorPolicyVector(); + vector::iterator it; + + for (it = _mpV.begin(); it != _mpV.end(); ++it) { + if ( (*it).getID()==monitorID) { + eventID= (*it).getEventID(); + + if (eventID==NULL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_NULLEVID); + status=ECAFE_NULLEVID; + return status; + } + else { + break; + } + } + } + + //monitor has been removed + if (eventID==NULL) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Monitor never started or previously stopped " << endl; + cafeStatus.report(ECAFE_NULLEVID); + status=ECAFE_NULLEVID; + return status; + } + + status=(*it_handle).monitorStop(eventID); + + if (status==ICAFE_NORMAL) { + + //JC It appears that ca_clear_subscription does not need a flush!? + + if (channelMonitorPolicy.getWhenToFlushSendBuffer()==FLUSH_AFTER_EACH_CHANNEL_SUBSCRIPTION) { + channelMonitorPolicy.flushSendBufferNow(); + } + //erase vector + if(MUTEX){cafeMutex.lock();}; //lock + handle_index.modify(it_handle, change_monitorPolicyErase(monitorID)); + if(MUTEX){cafeMutex.unlock();}; //unlock + } + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + } + return ECAFE_INVALID_HANDLE; + } + + return status; + #undef __METHOD__ + } + + + /** + * \brief print status information of given handle + * \param handle input: handle to Conduit object \n + * \param status input: reporting status \n + * \return ECA_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ + int Connect::printStatus(unsigned int handle, int status) { + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) { + + cout << "====================================" << endl; + cout << "Handle=" << handle << " PV=" << (*it_handle).getPV() << endl; + if ( (strcmp((*it_handle).getPV(), (*it_handle).getPVAlias())!=0) ) { + cout << "PVAlias=" << (*it_handle).getPVAlias() << endl; + } + cafeStatus.report(status); + cout << "====================================" << endl; + return ICAFE_NORMAL;} + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << handle << " is an invalid handle " << endl; + cafeStatus.report(status); + } + return ECAFE_INVALID_HANDLE;} + } + + + /** + * \brief print status information of given handle only on error + * \param handle input: handle to Conduit object \n + * \param status input: reporting status \n + * \return ECA_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ + int Connect::printStatusIfError(unsigned int handle, int status) { + if (status==ICAFE_NORMAL) {return ICAFE_NORMAL;}; + return Connect::printStatus(handle, status); + } + + + /** + * \brief print status information of given handles + * \param handleV input: vector of handles to conduit objects \n + * \param statusV input: vector of statuses \n + * \return ECA_NORMAL if all OK else ECAFE_INVALID_HANDLE (if one or more handles are invalid) + */ + int Connect::printStatus(vector handleV, vector statusV) { + int overallStatus=ICAFE_NORMAL; bool isGood=true; + int localStatus=ICAFE_NORMAL; + for (unsigned int i=0; i < min(handleV.size(),statusV.size()); ++i) { + localStatus=Connect::printStatus(handleV[i], statusV[i]); + if(isGood && localStatus!=ICAFE_NORMAL) {overallStatus=localStatus; isGood=false;} + } + return overallStatus; + } + + /** + * \brief print status information of given handles only on error + * \param handleV input: vector of Handles to Conduit objects \n + * \param statusV input: vector of statuses \n + * \return ECA_NORMAL if all OK else ECAFE_INVALID_HANDLE (if one or more handles are invalid) + */ + int Connect::printStatusIfError(vector handleV, vector statusV) { + int overallStatus=ICAFE_NORMAL; bool isGood=true; + int localStatus=ICAFE_NORMAL; + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int) _handle); + + if (it_handle != handle_index.end()) { + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_accessRightsHandlerArgs(args)); + if(MUTEX){cafeMutex.unlock();} + } + + return; +#undef __METHOD__ +} + + + +/** + * Callback function for callbackHandlerException + * Modifies CAFEConduit object accordingly + * \param args output: exception_handler_args parameters \n + * + */ +void Connect::callbackHandlerException(struct exception_handler_args args) { +#define __METHOD__ "Connect::callbackHandlerException" + + // This routine is called on disconnect before the connection handler + // cout << "-------------------------------------------------------------" << endl; + // cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + // cout << "Warning: Virtual circuit disconnect" << endl; + // cout << "Exception Handler Args has status = " << args.stat << endl; + + unsigned int _handle=0; + + char buf[512]; + char pName[PVNAME_SIZE]; + + + if (args.chid) { + strcpy(pName , ca_name(args.chid)); + _handle = (unsigned long) ca_puser(args.chid); + sprintf(buf, + "%s with request handle=%d, channel=%s, op=%ld, datatype=%s, count=%ld. %s", + args.ctx, (unsigned int) _handle, pName, args.op, dbr_type_to_text (args.type), args.count, + "Possibly an IOC has been switched off or is rebooting."); + + } + // This case is more usual(!) + else { + strcpy(pName , "unknown"); + sprintf(buf, + "%s with channel=%s, op=%ld, datatype=%s, count=%ld. %s", + args.ctx, pName, args.op, dbr_type_to_text (args.type), args.count, + "Possibly an IOC has been switched off or is rebooting.\n"); + } + + ca_signal (args.stat, buf); + + return; +#undef __METHOD__ +} + diff --git a/src/connectGroup.cpp b/src/connectGroup.cpp new file mode 100644 index 0000000..a7e7279 --- /dev/null +++ b/src/connectGroup.cpp @@ -0,0 +1,1830 @@ +/// +/// \file connectGroup.cc +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// +#include "connect.h" +#include "conduitFriends.h" + +using namespace std; + + + +template +std::pair flip_pair(const std::pair &p) +{ + return std::pair(p.second, p.first); +} + + +template +std::multimap flip_map(const std::map & src) { + + std::multimap dst; + + std::transform(src.begin(), src.end(), std::inserter(dst, dst.begin()), + flip_pair); + + return dst; +} + + + +///////////////////////// Group functions ///////////////////////////////////////////////// + +/** + * \brief Connect::collectionDefine: Add collection to global vector, deviceCollectionV + * + * \param collectionName input: define collection name + * \param deviceListV input: vector list of strings that comprise the collection of devices + * \return ICAFE_NORMAL + */ +int Connect::collectionDefine(const char * collectionName, vector deviceListV) { + bool collectionExists = false; + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), collectionName) == 0) { + cout << "COLLECTION " << collectionName << " ALREADY EXISTS " << endl; + collectionExists = true; + break; + } + } + if (collectionExists) {return ECAFE_COLLECTION_PREV_DEF;} + deviceCollection dC; collectionMember cM; + dC.name=collectionName; + + dC.cMembers.reserve(deviceListV.size()); + + for (size_t i=0; i deviceListV) { + bool collectionExists = false; + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), collectionName) == 0) { + cout << "COLLECTION " << collectionName << " ALREADY EXISTS " << endl; + collectionExists = true; + break; + } + } + if (collectionExists) {return ECAFE_COLLECTION_PREV_DEF;} + deviceCollection dC; collectionMember cM; + dC.name=collectionName; + + dC.cMembers.reserve(deviceListV.size()); + + for (size_t i=0; i &deviceListV) { + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + deviceListV.clear(); + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName) == 0) { + deviceListV.reserve(deviceCollectionV[i].getMembers().size()); + deviceListV= deviceCollectionV[i].getMembers(); + + if (deviceListV.empty()) { + return ECAFE_EMPTY_COLLECTION; + } + else { + return ICAFE_NORMAL; + } + } + } + return ECAFE_UNKNOWN_COLLECTION; +} + +/** + * \brief Connect::collectionFetch - retrieves Collection + * + * \param collectionName input: collection name + * \param deviceListV ouput: vector of const char * containing collection members + * \return ICAFE_NORMAL else ECAFE_UNKNOWN_COLLECTION, ECAFE_EMPTY_COLLECTION + */ +int Connect::collectionFetch(const char * collectionName, vector &deviceListV) { + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + deviceListV.clear(); + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName) == 0) { + deviceListV.reserve(deviceCollectionV[i].getMembers().size()); + //copy string vector to cont char * vector + for (unsigned short j=0; j< deviceCollectionV[i].getMembers().size(); ++j) { + deviceListV.push_back((const char *) deviceCollectionV[i].getMembers()[j].c_str()); + } + + + if (deviceListV.empty()) { + return ECAFE_EMPTY_COLLECTION; + } + else { + return ICAFE_NORMAL; + } + } + } + return ECAFE_UNKNOWN_COLLECTION; +} + +/** + * \brief Connect::isCollection - Test const char * to determine if input 'name' is a collection + * \param collectionID input: collection name + * \return trool or false + */ +bool Connect::isCollection(const char * collectionID) { + char _collectionID[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionID, _collectionID); + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + //cout << deviceCollectionV[i].name.c_str() << " [" << i << "] " << endl; + if (strcmp(deviceCollectionV[i].name.c_str(), (const char *) _collectionID) == 0) { + return true; + } + } + return false; +} + +/** + * \brief Connect::isGroup - Test const char * to determine if input 'name' is a garoup + * \param groupID input: group name + * \return true or false + */ +bool Connect::isGroup(const char * groupID) { + char _groupID[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(groupID, _groupID); + for (size_t i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, (const char *) _groupID) == 0) { + return true; + } + } + return false; +} + +/** + * \brief Connect::groupCombine - Combines individual groups to form a new group + * \param newGroupName input: new group name + * \param groupNameV input: vector of groups + * \return ICAFE_NORMAL is all OK else, ECAFE_GROUP_PREV_DEF, ECAFE_UNKNOWN_GROUP + */ +int Connect::groupCombine(const char * newGroupName, vector groupNameV) { + + char _newGroupName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(newGroupName, _newGroupName); + + + for (unsigned short j = 0; j < groupNameV.size(); ++j) { + char _groupName[PVNAME_SIZE]; + + helper.removeLeadingAndTrailingSpaces(groupNameV[j], _groupName); + //overwrite vector + groupNameV[j]= _groupName; + } + + bool groupExists = false; + unsigned short nExisting=0; bool inputGroupExists=false; + unsigned short * gIndex = new unsigned short[groupNameV.size()]; + unsigned int nElemInGroup=0; + + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, _newGroupName ) == 0) { + cout << "REQUESTED NAME FOR GROUP " << _newGroupName << " ALREADY EXISTS! GROUP COMBINE FAILED" << endl; + groupExists = true; + continue; + } + } + + + + for (unsigned short j = 0; j < groupNameV.size(); ++j) { + inputGroupExists=false; + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, groupNameV[j] ) == 0) { + gIndex[j]=i; + inputGroupExists=true; + ++nExisting; + nElemInGroup= nElemInGroup + PVGroupV[i].npv; + break; + } + } + + if (!inputGroupExists) { + cout << "REQUESTED INPUT GROUP " << groupNameV[j] << " DOES NOT EXIST! GROUP COMBINE FAILED" << endl; + } + } + + if (groupExists) { + delete gIndex; + return ECAFE_GROUP_PREV_DEF; + } + if (nExisting != groupNameV.size()) { + delete gIndex; + return ECAFE_UNKNOWN_GROUP; + } + + PVGroup pvGroup; + pvGroup.npv = nElemInGroup; + strcpy(pvGroup.name, _newGroupName); + PVDataHolder * pvdata = new PVDataHolder[pvGroup.npv]; + + + unsigned int icount=0; + for (unsigned short j = 0; j < groupNameV.size(); ++j) { + for (unsigned int i = 0; i < PVGroupV[gIndex[j]].npv; ++i) { + pvdata[icount]=PVGroupV[gIndex[j]].pvdata[i]; + pvGroup.memberMap.insert(icount,pvdata[icount].pv); + ++icount; + } + } + pvGroup.pvdata = pvdata; + PVGroupV.push_back(pvGroup); + + delete gIndex; + return ICAFE_NORMAL; +} + + + +/** + * \brief Connect::groupCombine - Combines two groups to form a new group + * \param newGroupName input: new group name + * \param groupName1 input: already existing group + * \param groupName2 input: already existing group + * \return ICAFE_NORMAL is all OK else, ECAFE_GROUP_PREV_DEF, ECAFE_UNKNOWN_GROUP + */ +int Connect::groupCombine(const char * newGroupName, const char * groupName1, + const char * groupName2) { // PVGroup &pvGroup) { + + char _newGroupName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(newGroupName, _newGroupName); + char _groupName1[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(groupName1, _groupName1); + char _groupName2[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(groupName2, _groupName2); + + bool groupExists = false; + bool groupExists1 = false; bool groupExists2 = false; + PVGroup g1; PVGroup g2; + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, _newGroupName ) == 0) { + cout << "REQUESTED NAME FOR GROUP " << _newGroupName << " ALREADY EXISTS " << endl; + groupExists = true; + } + if (strcmp(PVGroupV[i].name, _groupName1 ) == 0) { + g1=PVGroupV[i]; + groupExists1 = true; + } + if (strcmp(PVGroupV[i].name, _groupName2 ) == 0) { + g2=PVGroupV[i]; + groupExists2 = true; + } + if (groupExists && groupExists1 && groupExists2) {break;} + } + + if (!groupExists1) { + cout << "GROUP " << _groupName1 << " DOES NOT EXIST! GROUP COMBINE FAILED" << endl; + } + if (!groupExists2) { + cout << "GROUP " << _groupName2 << " DOES NOT EXIST! GROUP COMBINE FAILED" << endl; + } + if (groupExists) {return ECAFE_GROUP_PREV_DEF;} + else if (!groupExists1 || !groupExists2) {return ECAFE_UNKNOWN_GROUP;} + + unsigned int nElemInGroup=g1.npv + g2.npv; + + PVGroup pvGroup; + pvGroup.npv = nElemInGroup; + strcpy(pvGroup.name, _newGroupName); + PVDataHolder * pvdata = new PVDataHolder[pvGroup.npv]; + + for (unsigned int i=0; i attributeV) { + vector deviceListV; + int localStatus = collectionFetch(collectionName, deviceListV); + if (localStatus != ICAFE_NORMAL) {return localStatus;} + return groupDefine(groupName, deviceListV, attributeV); +} + + +/** + * \brief Connect::groupDefine + * \param groupName input: new group name + * \param collectionName input: name of already existing collection + * \param attributeV input: vector of attributes (const char *) + * \return ICAFE_NORMAL is all OK else, ECAFE_GROUP_PREV_DEF, ECAFE_UNKNOWN_COLLECTION, ECAFE_EMPTY_COLLECTION + */ +int Connect::groupDefine (const char * groupName, const char * collectionName, vector attributeV){ + vector deviceListV; + int localStatus = collectionFetch(collectionName, deviceListV); + if (localStatus != ICAFE_NORMAL) {return localStatus;} + return groupDefine(groupName, deviceListV, attributeV); +} + + +/** + * \brief Connect::groupDefine + * \param groupName input: new group name + * \param collectionName input: name of already existing collection + * \param attributeArray input: array of attributes (pv_string_t *) + * \param attributeLength input: size of input array + * \return ICAFE_NORMAL is all OK else, ECAFE_GROUP_PREV_DEF, ECAFE_UNKNOWN_COLLECTION, ECAFE_EMPTY_COLLECTION + */ +int Connect::groupDefine (const char * groupName, const char * collectionName, + pv_string_t * attributeArray, unsigned short attributeLength) { + + vector deviceListV; + vector attributeListV; + attributeListV.reserve(attributeLength); + int localStatus = collectionFetch(collectionName, deviceListV); + if (localStatus != ICAFE_NORMAL) {return localStatus;} + attributeListV.insert(attributeListV.end(), &attributeArray[0], &attributeArray[attributeLength]); + return groupDefine(groupName, deviceListV, attributeListV); +} + + +/** + * \brief Connect::groupDefine + * \param groupName input: new group name + * \param deviceArray input: array of devices (pv_string_t) + * \param nDevice input : size of device array + * \param attributeArray input: array of attributes (pv_string_t *) + * \param nAttribute input: size of attribute array + * \return ICAFE_NORMAL is all OK else, ECAFE_GROUP_PREV_DEF + */ +int Connect::groupDefine(const char * groupName, pv_string_t * deviceArray, unsigned int nDevice, + pv_string_t * attributeArray, unsigned short nAttribute) { // PVGroup &pvGroup) { + std::string s=""; + //std::string deviceAttributeDeliminator=DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR; + unsigned int nElemInGroup=nDevice * nAttribute; + pv_string_t * pvArray = new pv_string_t [nElemInGroup]; + unsigned int icount=0; + for (unsigned short j=0; j deviceV, + vector attributeV){ // PVGroup &pvGroup) { + + std::string s=""; + //std::string deviceAttributeDeliminator=DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR; + unsigned int nElemInGroup=deviceV.size() * attributeV.size(); + pv_string_t * pvArray = new pv_string_t [nElemInGroup]; + unsigned int icount=0; + for (unsigned short j=0; j deviceV, vector attributeV) { + //PVGroup &pvGroup) { + std::string s=""; + //std::string deviceAttributeDeliminator=DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR; + unsigned int nElemInGroup=deviceV.size() * attributeV.size(); + pv_string_t * pvArray = new pv_string_t [nElemInGroup]; + unsigned int icount=0; + for (unsigned short j=0; j pvArrayV) { // PVGroup &pvGroup) { + + pv_string_t * pvArray = new pv_string_t [pvArrayV.size()]; + + for (unsigned int i=0; i pvArrayV) { + + pv_string_t * pvArray = new pv_string_t [pvArrayV.size()]; + + for (unsigned int i=0; i Connect::getFromGlobalChannelList(vector searchList) { + + vector retChannelList; + + retChannelList.clear(); + retChannelList.reserve(200); + + //cout << globalChannelList.size() << endl; + //cout << searchList.size() << endl; + + for (unsigned int i=0; i < globalChannelList.size(); ++i) { + unsigned int ncount=0; + for (unsigned int j=0; j < searchList.size(); ++j ) { + std::size_t found = globalChannelList[i].find(searchList[j]); + if (found!=std::string::npos) { + ++ncount; + } + } + //if (ncount > 0) cout << ncount << " " << searchList.size() << endl; + if (ncount==searchList.size()) { + retChannelList.push_back(globalChannelList[i]); + } + } + + //cout << retChannelList.size() << endl; + + return retChannelList; +} + + +/** + * \brief Creates a pseudo group from input handles and initalizes PVdataHolder array; \ +method to be preceded by getV(v) and followed by e.g.getCachePVArrayNoWait(v, pvd) + * \param handleArray input: array of handles + * \return PVDataHolder * + */ +PVDataHolder * Connect::getPVData(vector handleArray) { +#define __METHOD__ "CAFE::getPVData(vector handleArray)" + + // Check in vector already exists! + // showing contents: + bool groupExists = false; + char _groupName[PVGROUP_PSEUDO_SIZE]; + std::map,string>::iterator it = groupPseudoMap.begin(); + //std::cout << "groupPseudoMap contains:\n"; + for (it=groupPseudoMap.begin(); it!=groupPseudoMap.end(); ++it) { + //std::cout << (it->first)[0] << " => " << it->second << '\n'; + if (it->first==handleArray) { + //cout << "MATCH FOUND GROUP EXISTS " << endl; + strcpy(_groupName,(it->second).c_str()); + groupExists=true; + for (unsigned short i = 0; i < PVGroupPseudo.size(); ++i) { + if (strcmp(PVGroupPseudo[i].name, _groupName) == 0) { + //cout << "GROUP " << groupName << " ALREADY EXISTS " << endl; + return PVGroupPseudo[i].getPVData(); + } + } + cout << __FILE__ << "//" << __METHOD__ << endl; + cout << "WARNING:: GROUP " << (it->second) << " NOT FOUND IN PVGROUPPSEUDO " << endl; + cout << "THIS WARNING SHOULD NOT APPEAR! " << endl; + break; + } + } + + status=ICAFE_NORMAL; + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + std::stringstream converter; + std::stringstream converter1; + //std::stringstream converter2; + string sgn="g"; + converter << handleArray.size(); + sgn.append(converter.str()); + sgn.append("h"); + converter1 << handleArray[0]; + + + unsigned int nseq=0; + for (unsigned int i=1; i0) { + converter1 << "-"; + converter1 << handleArray[i-1]; + converter1 << "/"; + converter1 << handleArray[i]; + } + else { + converter1 << "/"; + converter1 << handleArray[i]; + } + nseq=0; + } + else { + nseq=nseq+1; + } + } + + if (nseq==0) { + converter1 << "/"; + } + else { + converter1 << "-"; + } + converter1 << handleArray[handleArray.size()-1]; + + unsigned int minVal=min(converter1.str().size(),(size_t) (PVGROUP_PSEUDO_SIZE-sgn.size()-1)); + sgn.append(converter1.str().substr(0,minVal)); + + //Example of GroupName + //g22h1-3/5/7/9-12/16/19/21/23/25/28/4/6/11-12/33/31/2 + //g164h92-229/212-217/230-249 + + + const char * groupName=sgn.c_str(); + helper.removeLeadingAndTrailingSpacesPseudo(groupName, _groupName); + + for (unsigned short i = 0; i < PVGroupPseudo.size(); ++i) { + if (strcmp(PVGroupPseudo[i].name, _groupName) == 0) { + //cout << "GROUP " << groupName << " ALREADY EXISTS " << endl; + groupExists = true; + return PVGroupPseudo[i].getPVData(); + } + } + + + PVGroup pvGroup; + strcpy(pvGroup.name, _groupName); + + pvGroup.npv = handleArray.size(); + PVDataHolder * pvdata = new PVDataHolder[pvGroup.npv]; + + for (unsigned int iMember = 0; iMember < pvGroup.npv; ++iMember) { + bool hf=false; + //Fill PVDataUnit here + //char _pv[PVNAME_SIZE]; + //helper.removeLeadingAndTrailingSpaces(pvArray[i], _pv); + + it_handle = handle_index.find(handleArray[iMember]); + + if (it_handle != handle_index.end()) { + hf=true; + } + + + if (!hf) { + pvdata[iMember].status=ECAFE_INVALID_HANDLE; + if(printErrorPolicy.getInvalidHandle()) { + cout << "WARNING: " << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Invalid handle = " << handleArray[iMember] + << " for member [" << iMember << "] " << endl; + } + continue; + } + + pvdata[iMember].alarmStatus=-1; + pvdata[iMember].alarmSeverity=-1; + pvdata[iMember].ts.secPastEpoch=0; + pvdata[iMember].ts.nsec=0; + pvdata[iMember].status=ICAFE_NORMAL; + + strcpy(pvdata[iMember].pv, ((*it_handle).pv).c_str()); + //this sets size and nelem to 1 if not connected + pvdata[iMember].setNelem( (*it_handle).getChannelRegalia().getNelem() ); + + //set Device, Attribute for handle + + (*it_handle).getPVDataHolder(pvdata[iMember]); + + strcpy(pvdata[iMember].pv, handleHelper.getPVFromHandle(handleArray[iMember])); + + ChannelDeviceAttribute channelDeviceAttribute; + channelDeviceAttribute.init(pvdata[iMember].pv,deviceAttributeDeliminator); + + strcpy(pvdata[iMember].device, channelDeviceAttribute.getDevice()); + strcpy(pvdata[iMember].attrib, channelDeviceAttribute.getAttribute()); + + pvGroup.memberMap.insert(iMember,pvdata[iMember].pv); + + } + + + pvGroup.pvdata = pvdata; + PVGroupPseudo.push_back(pvGroup); + + groupPseudoMap.insert( std::pair,string>(handleArray,sgn) ); + + return pvGroup.getPVData(); +#undef __METHOD__ +} + + + + +/** + * \brief Connect::groupList - lists all groups in global vector PVGroupV \n + * \param glist output: shared_ptr to array of group names (pv_string_t) + * \param listLength: length of glist array + * \return ICAFE_NORMAL + */ +//int Connect::groupList(dbr_string_t * &glist, unsigned int &listLength) { +int Connect::groupList(boost::shared_ptr &glist, unsigned int &listLength) { + + listLength=PVGroupV.size(); + //glist = new dbr_string_t [listLength]; + + glist.reset(new pv_string_t[listLength]); + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + strcpy(glist[i],PVGroupV[i].name); + } + + return ICAFE_NORMAL; +} + + +/** + * \brief Connect::groupList - lists all groups in global vector PVGroupV + * \param glist output: vector of group names (string) + * \return ICAFE_NORMAL + */ +int Connect::groupList(vector &glist) { + + glist.clear(); + glist.reserve(PVGroupV.size()); + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + glist.push_back(PVGroupV[i].name); + } + + return ICAFE_NORMAL; +} + + +/** + * \brief Connect::groupMemberList - lists the members of the given group \n + * User responsible for deleting list array + * \param groupName input: group name + * \param list output: shared_ptr to array of process variables (pv_string_t) + * \param listLength: length of list array + * \return ICAFE_NORMAL is all OK else, ECAFE_UNKNOWN_GROUP + */ + +int Connect::groupMemberList(const char * groupName, boost::shared_ptr &list, unsigned int &listLength) { + + char _groupName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(groupName, _groupName); + + bool groupExists = false; listLength=0; + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, _groupName ) == 0) { + //list = new pv_string_t [PVGroupV[i].npv]; + list.reset(new pv_string_t[PVGroupV[i].npv]); + + for (unsigned int j=0; j< PVGroupV[i].npv; ++j) { + strcpy(list[j],PVGroupV[i].pvdata[j].pv); + //cout << "groupMember " << list[j] << " [" << j << "]" << endl; + } + listLength=PVGroupV[i].npv; + groupExists = true; + break; + } + } + + if(!groupExists) {return ECAFE_UNKNOWN_GROUP;} + return ICAFE_NORMAL; +} + + +/* + +int Connect::groupMemberList(const char * groupName, dbr_string_t * &list, unsigned int &listLength) { + + + char _groupName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(groupName, _groupName); + + bool groupExists = false; listLength=0; + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, _groupName ) == 0) { + list = new dbr_string_t [PVGroupV[i].npv]; + + for (unsigned int j=0; j< PVGroupV[i].npv; ++j) { + strcpy(list[j],PVGroupV[i].pvdata[j].pv); + } + listLength=PVGroupV[i].npv; + groupExists = true; + break; + } + } + + if(!groupExists) {return ECAFE_UNKNOWN_GROUP;} + return ICAFE_NORMAL; +} +*/ + +/** + * \brief Connect::groupMemberList - lists the members of the given group + * \param groupName input: group name + * \param list output: vector of process variables (string) + * \return ICAFE_NORMAL is all OK else, ECAFE_UNKNOWN_GROUP + */ +int Connect::groupMemberList(const char * groupName, vector &list) { + + char _groupName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(groupName, _groupName); + + list.clear(); + + bool groupExists = false; + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, _groupName ) == 0) { + list.reserve(PVGroupV[i].npv); + for (unsigned int j=0; j< PVGroupV[i].npv; ++j) { + list.push_back(PVGroupV[i].pvdata[j].pv); + } + + groupExists = true; + break; + } + } + + if(!groupExists) {return ECAFE_UNKNOWN_GROUP;} + return ICAFE_NORMAL; +} + +/** + * \brief Connect::fetchIndexOfGroupMember + * \param groupName input: group name + * \param pv input: (const char *) process variable + * \return index of pvdata for pv within group; else -1 if error + */ +int Connect::fetchIndexOfGroupMember(const char *groupName, const char * pv) { + + bool groupExists=false; + + char _groupName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(groupName, _groupName); + + char _pv[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(pv, _pv); + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, _groupName ) == 0) { + + for (unsigned int j=0; j< PVGroupV[i].npv; ++j) { + if (strcmp(PVGroupV[i].pvdata[j].pv, _pv) == 0) { + return j; + } + } + + groupExists = true; + break; + } + } + if(!groupExists) { + cout << "group " << groupName << " does not exist! " << endl; + } + else { + cout << "group " << groupName << " does not have a pv member with name " << pv << endl; + } + + return -1; +} + + + + +////////////////// COLLECTIONS ////////////////////////////// + + +/** + * \brief Connect::collectionList - lists all collection in global vector deviceCollectionV \n + * \param clist output: array of collection names (pv_string_t) + * \param listLength output: length of clist array + * \return ICAFE_NORMAL + */ +int Connect::collectionList(boost::shared_ptr &clist, unsigned int &listLength) { + + listLength=deviceCollectionV.size(); + //clist = new dbr_string_t [listLength]; + clist.reset(new pv_string_t[listLength]); + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + strcpy(clist[i],deviceCollectionV[i].name.c_str()); + } + return ICAFE_NORMAL; +} + + +/** + * \brief Connect::collectionList - lists all collections in global vector deviceCollectionV + * \param clist output: vector of collection names (string) + * \return ICAFE_NORMAL + */ +int Connect::collectionList(vector &clist) { + + clist.clear(); + clist.reserve(deviceCollectionV.size()); + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + clist.push_back(deviceCollectionV[i].name); + } + + return ICAFE_NORMAL; +} + + +/** + * \brief Connect::collectionMemberList - lists the members of the given collection \n + * \param collectionName input: name of Collection + * \param list output: array of device names (pv_string_t) + * \param listLength: length of list array + * \return ICAFE_NORMAL is all OK else, ECAFE_UNKNOWN_COLLECTION + */ +int Connect::collectionMemberList(const char * collectionName, boost::shared_ptr &list, unsigned int &listLength) { + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + bool collectionExists = false; listLength=0; + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName ) == 0) { + vector vc = deviceCollectionV[i].getCMembers(); + //list = new pv_string_t [vc.size()]; + list.reset(new pv_string_t[vc.size()]); + + for (unsigned int j=0; j< vc.size(); ++j) { + strcpy(list[j],vc[j].deviceName.c_str()); + } + listLength=vc.size(); + collectionExists = true; + break; + } + } + + if(!collectionExists) {return ECAFE_UNKNOWN_COLLECTION;} + return ICAFE_NORMAL; +} + + +/** + * \brief Connect::collectionMemberList - lists the members of the given collection + * \param collectionName input: name of collection + * \param list output: vector of devices (string) + * \return ICAFE_NORMAL is all OK else, ECAFE_UNKNOWN_COLLECTION + */ +int Connect::collectionMemberList(const char * collectionName, vector &list) { + + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + list.clear(); + list.reserve(deviceCollectionV.size()); + + bool collectionExists = false; + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName ) == 0) { + + vector vc = deviceCollectionV[i].getCMembers(); + + for (unsigned int j=0; j< vc.size(); ++j) { + list.push_back(vc[j].deviceName); + } + collectionExists = true; + break; + } + } + + if(!collectionExists) {return ECAFE_UNKNOWN_COLLECTION;} + return ICAFE_NORMAL; +} + + +/** + * \brief Connect::devicePositionOrderedMultiMap - returms a map of devices and their positions + * \param collectionName input: name of collection + * \param devPos output: multimap of devices (string) and their positions (float) - odered in position + * \return ICAFE_NORMAL is all OK else, ECAFE_UNKNOWN_COLLECTION + */ +int Connect::devicePositionOrderedMultiMap(const char * collectionName, std::multimap &posDev) { + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + posDev.clear(); + + std::map devPos; + devPos.clear(); + + bool collectionExists = false; + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName ) == 0) { + + vector vc = deviceCollectionV[i].getCMembers(); + + for (unsigned int j=0; j< vc.size(); ++j) { + devPos.insert(std::make_pair(vc[j].deviceName, vc[j].devicePosition)); + } + collectionExists = true; + break; + } + } + + if(collectionExists) { + posDev = flip_map(devPos); + return ICAFE_NORMAL; + } + else { + return ECAFE_UNKNOWN_COLLECTION; + } + +} + + + +/** + * \brief Connect::devicePositionMap - returms a map of devices and their positions + * \param collectionName input: name of collection + * \param devPos output: map of devices (string) and their positions (float) - not ordered + * \return ICAFE_NORMAL is all OK else, ECAFE_UNKNOWN_COLLECTION + */ +int Connect::devicePositionMap(const char * collectionName, std::map &posDev) { + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + posDev.clear(); + + bool collectionExists = false; + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName ) == 0) { + + vector vc = deviceCollectionV[i].getCMembers(); + + for (unsigned int j=0; j< vc.size(); ++j) { + posDev.insert(std::make_pair(vc[j].devicePosition, vc[j].deviceName)); + } + collectionExists = true; + break; + } + } + + if(collectionExists) { + return ICAFE_NORMAL; + } + else { + return ECAFE_UNKNOWN_COLLECTION; + } + +} + + + + +/** + * \brief Connect::devicePositionMap - returms a map of devices and their positions + * \param collectionName input: name of collection + * \param devPos output: map of devices (string) and their positions (float) - not ordered + * \return ICAFE_NORMAL is all OK else, ECAFE_UNKNOWN_COLLECTION + */ +int Connect::devicePositionV(const char * collectionName, std::vector &dev, std::vector &pos) { + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + pos.clear(); dev.clear(); + + bool collectionExists = false; + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName ) == 0) { + + vector vc = deviceCollectionV[i].getCMembers(); + + for (unsigned int j=0; j< vc.size(); ++j) { + dev.push_back(vc[j].deviceName); + pos.push_back(vc[j].devicePosition); + } + collectionExists = true; + break; + } + } + + if(collectionExists) { + return ICAFE_NORMAL; + } + else { + return ECAFE_UNKNOWN_COLLECTION; + } + +} + + + + +/** + * \brief Connect::fetchIndexOfCollectionMember + * \param collectionName input: collection name + * \param deviceName input: (const char *) device name + * \return index of device in collection; else -1 if error + */ +int Connect::fetchIndexOfCollectionMember(const char *collectionName, const char * deviceName) { + + bool collectionExists=false; + + char _collectionName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(collectionName, _collectionName); + + char _deviceName[PVNAME_SIZE]; + helper.removeLeadingAndTrailingSpaces(deviceName, _deviceName); + + for (unsigned short i = 0; i < deviceCollectionV.size(); ++i) { + if (strcmp(deviceCollectionV[i].name.c_str(), _collectionName ) == 0) { + + vector vc = deviceCollectionV[i].getCMembers(); + + for (unsigned int j=0; j< vc.size(); ++j) { + if (strcmp(vc[j].deviceName.c_str(), _deviceName) == 0) { + return j; + } + } + collectionExists = true; + break; + } + } + if(!collectionExists) { + cout << "collection " << collectionName << " does not exist! " << endl; + } + else { + cout << "collection " << collectionName << " does not have a device member with name " << _deviceName << endl; + } + + return -1; +} + + + +/////////////////////////END COLLECTION ////////////////////////////////////////////// + + + +/** + * Establishes virtual circuit to epics process variable + * for each group member by calling Connect::open(pv, &handle) + * + * \param pvgroup input/output: PVGroup object + * \param groupHandle output: (unique) group handle + * \throw CAFEException re-throws CAFEException from open + * \return status ECA_NORMAL if OK + */ +int Connect::groupOpen(PVGroup &pvgroup, unsigned int &groupHandle) + throw (CAFEException_groupOpen) { +#define __METHOD__ "Connect::groupOpen(PVGroup, &groupHandle) " + + return (pvgroup.getName(), groupHandle); + +#undef __METHOD__ +} + + + + +/** + * \brief Establishes virtual circuit to epics process variable + * for each group member by calling Connect::open(pv, &handle) + * \param groupName input: (unique) name of the group + * \param groupHandle output: (unique) group handle + * \throw CAFEException_groupOpen re-throws CAFEException from open + * \return status ECA_NORMAL if OK + */ +int Connect::groupOpen(const char *groupName, unsigned int &groupHandle) + throw (CAFEException_groupOpen) { +#define __METHOD__ "Connect::groupOpen(groupName, &groupHandle) " + + // Determine ca-client context + ca_client_context * ccc = ca_current_context(); + + if (ccc == NULL) { + try{ + status=Connect::init(); // ca_enable_preemptive_callback + + } + catch(CAFEException_init){ + //status will be ECA_ALLOCMEM + + CAFEException_group e; + e = exceptionsHelper.prepareCAFEException_group((char *) groupName, 0, + ECA_ALLOCMEM,__METHOD__, __LINE__); + CAFEException_groupOpen badgrp; + badgrp.groupEx=e; + throw(badgrp); + + return status; + } + ccc = ca_current_context(); + } + + + // Check if group already exists + groupHandle = handleHelper.getGroupHandleFromGroupName(groupName, ccc); + + + if (groupHandle != 0) { + return ICAFE_NORMAL; + } + + // Get group from memory: + // Loop round vector of groups + + PVGroup pvgroup; + + bool groupExists = false; + + unsigned short iIdx=0; + + for (unsigned short i = 0; i < PVGroupV.size(); ++i) { + if (strcmp(PVGroupV[i].name, groupName) == 0) { + pvgroup = PVGroupV[i]; + groupExists = true; + iIdx=i; + break; + } + } + + if (!groupExists) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cafeStatus.report(ECAFE_UNKNOWN_GROUP); + return ECAFE_UNKNOWN_GROUP; + } + + + // Loop over all members + // Open Channels; + unsigned int nMember = pvgroup.npv; + unsigned int * memberHandle = new unsigned int [nMember]; + + + // + for (unsigned int i = 0; i < nMember; ++i) { + + char _pv[60]; + strcpy( _pv , pvgroup.pvdata[i].pv); + //char * _pv = pvgroup.pvdata[i].pv; + unsigned int iNow = i; + + bool pvAlreadyExistsWithinGroup = false; + + for (unsigned int iPrevious = 0; iPrevious < iNow; ++iPrevious) { + //Check if pv already exists within this group + + if (strcmp(pvgroup.pvdata[iPrevious].pv, _pv) == 0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "WARNING: PV " << _pv << " AT INDEX [" << iNow << "] " \ + "ALREADY EXISTS with handle " << memberHandle[iPrevious] + << " AT INDEX [" << iPrevious << "] "<< endl; + cout << "WARNING: PV ADDED TO GROUP BUT IS ASSIGNED TO PREVIOUS HANDLE " << endl; + pvAlreadyExistsWithinGroup = true; + memberHandle[iNow] = memberHandle[iPrevious]; + break; + } + } + + + + //Do not create new handle if pv already exists withing this group + + if (!pvAlreadyExistsWithinGroup) { + try { + + createHandleWithinGroup(_pv, ccc, memberHandle[i]); + + } catch (CAFEException_pv e) { + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Handle : " << e.handle << endl; + cout << "Process Variable (PV): " << e.pv << endl; + cout << "Status Code : " << e.statusCode << endl; + cout << "Status Message : " << e.statusCodeText << endl; + cout << "CANNOT ADD PV TO GROUP SINCE UNIQUE ID ALREADY EXISTS " << endl; + CAFEException_group ge; + ge = exceptionsHelper.prepareCAFEException_group((char *) groupName, 0, + ECAFE_HASH_UNIQUEID_EXISTS,__METHOD__, __LINE__); + CAFEException_groupOpen badgrp; + badgrp.groupEx=ge; + throw(badgrp); + + return ECAFE_HASH_UNIQUEID_EXISTS; + } + } + + } //for nMember + + + CA_SYNC_GID groupID; + status = ca_sg_create(&groupID); + //Now Add to Hash Table! + + std::pair p; + + if(MUTEX){cafeMutex.lock();} //lock + p = gs.insert(ConduitGroup(groupName, ccc, groupID, nMember, memberHandle)); + if(MUTEX){cafeMutex.unlock();} //unlock + + + // p.second true insert success + // p.second false insert failed as pair already exists + + if (!(p.second)) { + + CAFEException_group e; + e = exceptionsHelper.prepareCAFEException_group((char *) groupName, 0, + ECAFE_HASH_UNIQUEID_EXISTS,__METHOD__, __LINE__); + CAFEException_groupOpen badgrp; + badgrp.groupEx=e; + throw(badgrp); + + return ECAFE_HASH_UNIQUEID_EXISTS; + } + + groupHandle = (*(p.first)).getGroupHandle(); + + + pvgroup.groupHandle=groupHandle; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + + for (unsigned int i = 0; i < nMember; ++i) { + + it_handle = handle_index.find(memberHandle[i]); + + if (it_handle != handle_index.end()) { + //Change group handle + if(MUTEX){cafeMutex.lock();} + handle_index.modify((it_handle), change_groupHandle(groupHandle)); + if(MUTEX){cafeMutex.unlock();} + } + } + + //What is the POLICY!?? + //To Flush or to Pend this is the question! + if (channelOpenGroupPolicy.getWhenToFlushSendBuffer()==FLUSH_AFTER_EACH_GROUP_CREATION) + { + //Set timeout to a value that depends on the no of members: 1200 takes 3.5 seconds + double extraTime=nMember/NMEMBER_PER_SEC_SG_PEND_EVENT; + + channelOpenGroupPolicy.setTimeout(DEFAULT_TIMEOUT_SG_PEND_EVENT + extraTime); + channelOpenGroupPolicy.flushSendBufferNow(); + } + + //memHandle must not be deleted; allocated memory for use elsewhere + return ICAFE_NORMAL; + +#undef __METHOD__ +}; + + +/** + * Closes all channel connections associated within a group, + * for all groupHandles. + * Note that this does NOT cause the channel's disconnect handler to be called. + * It does however invoke event subscriptions (for monitors). + * All Conduit handles are erased. + * \return ICAFE_NORMAL if all OK + */ +int Connect::groupClose() { +#define __METHOD__ "Connect::groupClose() " + + long gStatus=ICAFE_NORMAL; + long _status=ICAFE_NORMAL; + + vector m_pvgroup; + m_pvgroup.clear(); + + m_pvgroup.reserve(PVGroupV.size()); + std::copy(PVGroupV.begin(), PVGroupV.end(), std::back_inserter(m_pvgroup)); + + unsigned int groupH=0; + + //cout << " PVGroupV.size() " << PVGroupV.size() << endl; + //cout << " m_pvgroup.size() " << m_pvgroup.size() << endl; + + //PVGroupV members do not know about groupHandles + for (size_t i=0; i (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + + it_groupHandle = groupHandle_index.find(groupHandle); + + string groupName=handleHelper.getGroupNameFromGroupHandle(groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + + //this combines instructions into one single message + + closeHandles((*it_groupHandle).mHandle, (*it_groupHandle).getNMember()); + + //Delete group + if(MUTEX){cafeMutex.lock();} + ca_sg_delete((*it_groupHandle).groupID); + if(MUTEX){cafeMutex.unlock();} + //Now erase groupHandle + gs.erase(it_groupHandle); + + } else { + return ECAFE_INVALID_GROUP_HANDLE; + } + + + //Remove from PVGroup Vector + //WARNING + //PVGroupV members do not know about groupHandles + for (size_t i=0; i(); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle =handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + status = ca_create_channel(pv, channelCreatePolicy.getHandler(), (void *) (long long) _handle, + channelCreatePolicy.getPriority(), &pCh); + + if(pCh!=NULL) { + //Install the access rights state change callback handler + ca_replace_access_rights_event(pCh, callbackHandlerAccessRights); + if(ADD_EXCEPTION_EVENT==true) { + ca_add_exception_event(callbackHandlerException, (void*) (long long) _handle); + } + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_channelID (pCh) ); + if(MUTEX){cafeMutex.unlock();} //unlock + } + + if (status != ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/"<< __METHOD__ << " ca_create_channel failed: " << endl; + cafeStatus.report(status); + + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_status (status) ); + if(MUTEX){cafeMutex.unlock();} //unlock + return (int) status; + } + + // Peculiar if true + if (status == ECA_EVDISALLOW) { + cout << __FILE__ << "/" << __LINE__ << "/"<< __METHOD__ << " inappropriate function " << endl; + cafeStatus.report(status); + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, change_status (status) ); + if(MUTEX){cafeMutex.unlock();} //unlock + } + + } + else { + return ECAFE_INVALID_HANDLE; + } + +return (int) status; + +#undef __METHOD__ +} + + +/** + * \brief Connect::createHandleWithinGroup + * + * \param pv input: process variable + * \param ccc input: ca_client_context + * \param _handle input: handle + * \return status + */ +int Connect::createHandleWithinGroup(const char * pv, ca_client_context * ccc, + unsigned int & _handle) throw (CAFEException_pv) { +#define __METHOD__ "Connect::createHandleCreateWithinGroup" + + + + // create channel + chid pCh = NULL; + std::pair p; + + + if(MUTEX){cafeMutex.lock();} //lock + + p = cs.insert(Conduit(pv, ccc, + channelRequestPolicyMasterPut, channelRequestPolicyMasterGet, + channelGetActionWhenMonitorPolicyMaster, pyCafeFlag)); + + if(MUTEX){cafeMutex.unlock();} //unlock + + // p.second true insert success + // p.second false insert failed as pair already exists + //has handle no exceeded limit + if (!(p.second)) { + cout << "HANDLE ALREADY IN USE! " << endl; + cout << "ISSUING NEW HANDLE FOR PV= " << pv << endl; + cout << "Recovering with next free handle which is " << handleHelper.getNextFreeHandle() << endl; + Conduit::handleNext=handleHelper.getNextFreeHandle()-1; + if(MUTEX){cafeMutex.lock();} //lock + p = cs.insert(Conduit(pv, ccc, + channelRequestPolicyMasterPut, channelRequestPolicyMasterGet, + channelGetActionWhenMonitorPolicyMaster, pyCafeFlag)); + if(MUTEX){cafeMutex.unlock();} //unlock + } + + + //Conduit cc = *(p.first); + + // The following should not happen as we do a pre-check in Connect::open + // p.second true insert success + // p.second false insert failed as pair already exists + + if (!(p.second)) { + + cout << " p SECOND - THROWING EXCEPTION FOR PV= " << pv << endl; + cout << (*(p.first)).pv.c_str() << endl; + cout << (*(p.first)).getHandle() << endl; + cout << (*(p.first)).getChannelID() << endl; + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv((*(p.first)).pv.c_str(), + (*(p.first)).pvAlias.c_str(), (*(p.first)).getHandle(), (*(p.first)).getChannelID(), + ECAFE_HASH_UNIQUEID_EXISTS, __METHOD__, __LINE__); + throw (e); + return ECAFE_HASH_UNIQUEID_EXISTS; + } + + + _handle= (*(p.first)).getHandle(); + + + + status = createChannelWithinGroup(_handle, pv, pCh); + + // Possible errors from ca_create_channel: ECA_NORMAL, ECA_BADTYPE, ECA_STRTOBIG, ECA_ALLOCMEM + // Possible error from ca_pend_event: ECA_EVDISALLOW + + //IF FAILED THROW EXCEPTION + if (status != ECA_NORMAL && status != ECA_TIMEOUT) { + Connect::close(_handle); + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv((*(p.first)).pv.c_str(), + (*(p.first)).pvAlias.c_str(), (*(p.first)).getHandle(), + pCh, status, __METHOD__, __LINE__); + throw (e); + return status; + } + else if (pCh == NULL) { + Connect::close(_handle); + CAFEException_pv e; + e = exceptionsHelper.prepareCAFEException_pv((*(p.first)).pv.c_str(), + (*(p.first)).pvAlias.c_str(), (*(p.first)).getHandle(), + pCh, ECAFE_NULLCHID, __METHOD__, __LINE__); + throw (e); + return ECAFE_NULLCHID; + } + + return ICAFE_NORMAL; + +} + diff --git a/src/enumStrings.cpp b/src/enumStrings.cpp new file mode 100644 index 0000000..32ae65b --- /dev/null +++ b/src/enumStrings.cpp @@ -0,0 +1,92 @@ +/// +/// \file enumStrings.cc +/// \author Modified by Jan Chrin, PSI from Astari's C++11 version \n +/// Using boost::begin() boost::end() for C++ +/// \date Release, February 2015 +/// \version CAFE 1.0.0 + + +#include "enumStrings.h" +#include "defines.h" +#include "policies.h" +#include "cafeEnum.h" + + +template +struct enumStrings +{ + static char const* data[]; +}; + +template +struct enumRefHolder +{ + T& enumVal; + enumRefHolder(T& enumVal): enumVal(enumVal) {} +}; + +template +struct enumConstRefHolder +{ + T const& enumVal; + enumConstRefHolder(T const& enumVal): enumVal(enumVal) {} +}; + +template +std::ostream& operator<<(std::ostream& str, enumConstRefHolder const& data) +{ + //Add check on enumStrings::data size to ensure correspondence with entries in cafeEnumEpics.h + + if ( boost::size( enumStrings::data) > (unsigned int) data.enumVal) { + return str << enumStrings::data[data.enumVal]; + } + else { + return str << "ERROR: enumStrings.h reports data.enumVal= " << data.enumVal + << " DOES NOT HAVE A STRING EQUIVALENT!"; + } +} + + +template +std::istream& operator>>(std::istream& str, enumRefHolder const& data) +{ + std::string value; + str >> value; + + // These two can be made easier to read in C++11 + // using std::begin() and std::end() + + //static auto begin = std::begin(enumStrings::data); + //static auto end = std::end(enumStrings::data); + //auto find = std::find(begin, end, value); + //if (find != end) + + if ( std::find( boost::begin(enumStrings::data), boost::end( enumStrings::data), value) != + boost::end( enumStrings::data)) + { + //data.enumVal = static_cast(std::distance(begin, find)); + data.enumVal = static_cast(std::distance(boost::begin(enumStrings::data), + std::find (boost::begin(enumStrings::data), boost::end(enumStrings::data), value ) )); + } + + + if (data.enumVal > boost::size( enumStrings::data) ) { + + std::cout << "ERROR: enumStrings.h reports data.enumVal = " << data.enumVal + << " is out of enum range = " << boost::size( enumStrings::data) << std::endl; + } + + return str; +} + +template +enumConstRefHolder enumToString(T const& e) {return enumConstRefHolder(e);} + +template +enumRefHolder enumFromString(T& e) {return enumRefHolder(e);} + + + + + + diff --git a/src/exceptionsHelper.cpp b/src/exceptionsHelper.cpp new file mode 100644 index 0000000..daeb3b0 --- /dev/null +++ b/src/exceptionsHelper.cpp @@ -0,0 +1,125 @@ +/// +/// \file exceptionsHelper.cc +/// \author Jan Chrin, PSI +/// \date Release, February 2015 +/// \version CAFE 1.0.0 +/// + +#include "exceptionsHelper.h" + +/** + * \brief Populates the CAFEException_pv struct; precedes throw(e) + * \param pv input: process variable + * \param pvAlias input: process variable alias + * \param handle input: handle to reference object + * \param pCh input: channel identifier (chid) + * \param status input: the error/status code + * \param source input: method name + * \param ln input: line number of file from where the error originates + * \return struct CAFEException_pv + */ +CAFEException_pv ExceptionsHelper::prepareCAFEException_pv(const char *pv, const char *pvAlias, + unsigned int handle, chid pCh, int status, + const char * source, unsigned int ln) { +#define __METHOD__ "Connect::prepareCAFEException_pv" + + CAFEException_pv e; + // handle, pv, pvAlias + e.handle=handle; + if (pv!=NULL) { + strcpy(e.pv, (char *) pv); + } + else { + strcpy(e.pv, ""); + } + if (pvAlias!=NULL) { + strcpy(e.pvAlias, (char *) pvAlias); + } + else { + strcpy(e.pvAlias, ""); + } + // native datatype + if (pCh == NULL) { + e.dataTypeNative = (CAFE_DATATYPE) CAFE_NO_ACCESS; + } + else if (status == ECAFE_RULE_FALSE || status == ICAFE_RULE_FALSE) { + e.dataTypeNative = (CAFE_DATATYPE) CAFE_NOT_REQUESTED; + } + else { + e.dataTypeNative = (CAFE_DATATYPE) dbf_type_to_DBR(ca_field_type(pCh)); + } + e.dataTypeNativeText = cafeDataTypeCode.message(e.dataTypeNative).c_str(); + // status code, message, description + e.statusCode = status; + e.statusCodeText = (const char *) cafeStatus.csc.message(status).c_str(); + e.statusMessage = (const char *) cafeStatus.csi.message(status).c_str(); + // method and line no of error source + e.source = (const char *) source; + e.ln = ln; + return e; + +#undef __METHOD__ +} + +/** + * \brief Prints CAFEException_pv to std out + * \param e input: struct CAFEException + */ +void ExceptionsHelper::printCAFEException_pv(CAFEException_pv & e) { +#define __METHOD__ "ExceptionsHelper::printCAFEException_pv" + + cout << "------------------------------------" << endl; + cout << __METHOD__ << endl; + cout << "------------------------------------" << endl; + cout << "Handle : " << e.handle << endl; + cout << "Process Variable (PV): " << e.pv << endl; + if ( strcmp(e.pv,e.pvAlias) ) { + cout << "PV Alias : " << e.pvAlias << endl; + } + cout << "PV Native Type : " << e.dataTypeNative << " (" + << e.dataTypeNativeText << ") " << endl; + cout << "Status Code : " << e.statusCode << endl; + cout << "Status Message : " << e.statusCodeText << endl; + cout << "Error Description : " << e.statusMessage << endl; + cout << "Source Method/Line : " << e.source << "/" << e.ln << endl; + cout << "------------------------------------" << endl; + return; + +#undef __METHOD__ +} + + +/** + * \brief Populates the CAFEException_group struct; precedes throw(e) + * \param groupName input: name of group + * \param ghandle input: group handle to reference object + * \param status input: the error/status code + * \param source input: method name + * \param ln input: line number of file from where the error originates + * \return struct CAFEException_group + */ +CAFEException_group ExceptionsHelper::prepareCAFEException_group(char groupName[PVNAME_SIZE], + unsigned int ghandle, int status, + const char * source, unsigned int ln) { +#define __METHOD__ "Connect::prepareCAFEExceptionGroup" + + CAFEException_group e; + // handle, pv, pvAlias + e.groupHandle=ghandle; + if (groupName!=NULL) { + strcpy(e.groupName, groupName); + } + else { + strcpy(e.groupName, ""); + } + + e.statusCode = status; + e.statusCodeText = (const char *) cafeStatus.csc.message(status).c_str(); + e.statusMessage = (const char *) cafeStatus.csi.message(status).c_str(); + // method and line no of error source + e.source = (const char *) source; + e.ln = ln; + return e; + +#undef __METHOD__ +} diff --git a/src/granules.cpp b/src/granules.cpp new file mode 100644 index 0000000..d5c1758 --- /dev/null +++ b/src/granules.cpp @@ -0,0 +1,2359 @@ +/// +/// \file granules.cc +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 + +#include "granules.h" +#include "methodCallbacks.h" +//include + +/** + * \brief Contains methods that are used by Instant template: + * channelVerifyPut: preVerification of client's requested data + * \param _handle input: handle to Conduit Object + * \param _dbrType input: chtype + * \return ICAFE_NORMAL or ICAFE_CS_NEVER_CONN or ICAFE_CA_OP_CONN_DOWN or ECAFE_NOWTACCESS + */ +int Granules::channelVerifyPut(const unsigned int _handle, chtype _dbrType) { +#define __METHOD__ "Granules::channelVerifyPut" + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if ( (*it_handle).getChannelRegalia().getCafeConnectionState()==ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + + if ( CHECK_CONSISTENCY_CA_STATE && !(*it_handle).isConnected()) { + status=helper.checkConsistency(_handle); + if (status!=ICAFE_NORMAL) { return status;} + } + + //3+2 + //isConnected + if ( !(*it_handle).isConnected()) { + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusPut = (*it_handle).getChannelRequestStatusPut(); // + //Check if it was ever connected?? + channelRequestStatusPut.setPreRequestStatus (ICAFE_CA_OP_CONN_DOWN); + handle_index.modify(it_handle, change_channelRequestStatusPut(channelRequestStatusPut)); + handle_index.modify(it_handle, change_status(ICAFE_CA_OP_CONN_DOWN)); //for return + if(MUTEX){cafeMutex.unlock();}//unlock + return ICAFE_CA_OP_CONN_DOWN; + } + + //hasWriteAccess + if ((*it_handle).getAccessWrite() == 0) { + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusPut = (*it_handle).getChannelRequestStatusPut(); // + channelRequestStatusPut.setPreRequestStatus (ECAFE_NOWTACCESS); + + handle_index.modify(it_handle, change_channelRequestStatusPut(channelRequestStatusPut)); + + handle_index.modify(it_handle, change_status(ECAFE_NOWTACCESS)); //for return + if(MUTEX){cafeMutex.unlock();}//unlock + return ECAFE_NOWTACCESS; + } + + //First steps OK + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusPut = (*it_handle).getChannelRequestStatusPut(); // + channelRequestStatusPut.setPreRequestStatus (ICAFE_NORMAL); + handle_index.modify(it_handle, change_channelRequestStatusPut(channelRequestStatusPut)); + if(MUTEX){cafeMutex.unlock();}//unlock + + channelRequestMetaDataClient= (*it_handle).getChannelRequestMetaDataClient(); // 2 + + //2 + chtype clientT = _dbrType%(LAST_TYPE+1); + + + if (clientT != channelRequestMetaDataClient.getDataType() || + _dbrType != channelRequestMetaDataClient.getDbrDataType() ) { + + channelRequestMetaDataClient.setDataType (clientT); + channelRequestMetaDataClient.setDbrDataType(_dbrType); + + channelRequestMetaDataClient.setCafeDbrType( + (CAFENUM::DBR_TYPE) helper.convertToCAFEDbrTypeClass(_dbrType) ); + + + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaDataClient(channelRequestMetaDataClient)); + if(MUTEX){cafeMutex.unlock();}//unlock + + channelRequestMetaDataClient= (*it_handle).getChannelRequestMetaDataClient(); + } + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief channelPreparePut: prepare client's requested data for ca call + * \param _handle input: handle + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE; + */ +int Granules::channelPreparePut(const unsigned int _handle) { +#define __METHOD__ "Granules::channelPreparePut" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + channelRequestMetaDataClient = (*it_handle).getChannelRequestMetaDataClient(); // + channelRequestMetaPrimitive = (*it_handle).getChannelRequestMetaPrimitive(); // + channelRequestDataTypePolicy = (*it_handle).getChannelRequestDataTypePolicy(); // + + bool changeChannelRequestMetaData=false; + + chtype clientRequestType = channelRequestMetaPrimitive.getDataType(); + CAFENUM::DBR_TYPE cafeDbrType = channelRequestMetaPrimitive.getCafeDbrType(); + + // Do we transfer data with the smaller sized type? + if (channelRequestDataTypePolicy.getRequestKind()==CAFENUM::LOWEST_DATATYPE) { + + clientRequestType = convertMatrix((*it_handle).getChannelRegalia().getDataType(), + channelRequestMetaDataClient.getDataType()); + channelRequestMetaPrimitive.setDataType(clientRequestType); + + changeChannelRequestMetaData=true; + } + + + if (channelRequestMetaDataClient.getCafeDbrType() > channelRequestMetaPrimitive.getCafeDbrType()) { + cafeDbrType = channelRequestMetaDataClient.getCafeDbrType(); + channelRequestMetaPrimitive.setCafeDbrType(cafeDbrType); + changeChannelRequestMetaData=true; + } + + if (changeChannelRequestMetaData) + { + //set dbrType according to cafeDbrType; + switch (cafeDbrType) + { + case CAFENUM::DBR_TIME: + case CAFENUM::DBR_STS: + case CAFENUM::DBR_PRIMITIVE: + channelRequestMetaPrimitive.setDbrDataType(dbf_type_to_DBR(clientRequestType)); + break; + default: + channelRequestMetaPrimitive.setDbrDataType(dbf_type_to_DBR(clientRequestType)); + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "CAFE INTERNAL FUNNY!: Method does not support this DBR_TYPE: " + << dbr_type_to_text(channelRequestMetaPrimitive.getCafeDbrType()) << endl; //OK + cout << "This line should never appear!" << endl; + break; + } + } + + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { // or channelRequestMetaDataClient.getNelem() >1 + + //What did the client request? What is native type? Transfer minimum of this. + if (channelRequestMetaPrimitive.getNelem() != channelRequestMetaDataClient.getNelem()) { + channelRequestMetaPrimitive.setNelem( min((*it_handle).getChannelRegalia().getNelem(), + channelRequestMetaDataClient.getNelem()) ); + changeChannelRequestMetaData=true; + } + + } + + if (changeChannelRequestMetaData==true) { + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaPrimitive(channelRequestMetaPrimitive)); + if(MUTEX){cafeMutex.unlock();}//unlock + }; + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + +return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief channelExecutePut: prepare client's requested data for ca call + * \param _handle input: handle + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE; + */ +int Granules::channelExecutePut(const unsigned int _handle) { +#define __METHOD__ "Granules::channelExecutePut" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + + channelTimeoutPolicyPut = (*it_handle).getChannelTimeoutPolicyPut(); + channelRequestMetaPrimitive = (*it_handle).getChannelRequestMetaPrimitive(); + channelRequestPolicyPut = (*it_handle).getChannelRequestPolicyPut(); + + methodKind =channelRequestPolicyPut.getMethodKind(); + + //IF NO WAIT - WE WANT THIS TO BE ASYNCHRONOUS + if ( (channelRequestPolicyPut.getWaitKind() == NO_WAIT) && (methodKind == WITHOUT_CALLBACK)) { + methodKind= WITH_CALLBACK_DEFAULT; + } + + //using namespace boost::posix_time; + + int requestStatus=ICAFE_NORMAL; + + switch (methodKind) { + case WITH_CALLBACK_DEFAULT: + case WITH_CALLBACK_USER_SUPPLIED: + + //JC Do not wait for callback; better for e.g. sliders + //JC if CAFENUM::COMPLETE, then still flush for piling set values + //JC See setPutPrepare(h) followed bu setPut(h) + + //cout << __METHOD__ << " Handle " << (*it_handle).getHandle() << endl; + + //cout << __METHOD__ << "ProgressKind " << (*it_handle).getChannelRequestStatusPut().getCallbackProgressKind() << endl; + + //Last put action not yet reported + if ((*it_handle).getChannelRequestStatusPut().getCallbackProgressKind() == CAFENUM::PENDING // CAFENUM::COMPLETE (2) + && (*it_handle).isConnected() ) { + + + //isConnected? + + // this is required for when flush not given by client! + + //What is the Policy? To flush now or later? + // + if (channelRequestPolicyPut.getWaitKind() == NO_WAIT && + channelRequestPolicyPut.getWhenToFlushSendBuffer() == FLUSH_DESIGNATED_TO_CLIENT) { + ca_flush_io();//NON-BLOCKING Flush anyway! Flush anyway as sets are piling up! + + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "Handle configured for Aggregated, Non-Blocking, Asynchronous SET. Hence" << std::endl; + std::cout << "CAFE enabling early flush for previous, pending set method(s) " << std::endl; + std::cout << "Current set method will be initiated by user (or by CAFE for repeated channels)" << std::endl; + } + + + + //wait until previous request finishes//wait until previous request finishes + /* + status=waitForPutEvent(_handle, channelTimeoutPolicyPut.getTimeout() ); + if (status==ECAFE_TIMEOUT && channelTimeoutPolicyPut.getSelfGoverningTimeout() + && (*it_handle).isConnected() ) { + unsigned short ntries=0; + while (status==ECAFE_TIMEOUT && ntries (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if ( (*it_handle).getChannelRegalia().getCafeConnectionState()==ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + + if ( CHECK_CONSISTENCY_CA_STATE && !(*it_handle).isConnected()) { + status=helper.checkConsistency(_handle); + if (status!=ICAFE_NORMAL) { return status;} + } + + //isConnected + if ( !(*it_handle).isConnected()) { + + if(MUTEX){cafeMutex.lock();} //lock + + //Check if it was ever connected?? + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); // + channelRequestStatusGet.setPreRequestStatus (ICAFE_CA_OP_CONN_DOWN); + + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + + handle_index.modify(it_handle, change_status(ICAFE_CA_OP_CONN_DOWN)); //for return + if(MUTEX){cafeMutex.unlock();}//unlock + return ICAFE_CA_OP_CONN_DOWN; + } + + //hasReadAccess + if ((*it_handle).getAccessRead() == 0) { + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); // + channelRequestStatusGet.setPreRequestStatus (ECAFE_NORDACCESS); + + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + + handle_index.modify(it_handle, change_status(ECAFE_NORDACCESS)); //for return + if(MUTEX){cafeMutex.unlock();}//unlock + return ECAFE_NORDACCESS; + } + + if(MUTEX){cafeMutex.lock();} //lock + //First steps OK + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); // + channelRequestStatusGet.setPreRequestStatus (ICAFE_NORMAL); + + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + if(MUTEX){cafeMutex.unlock();}//unlock + + channelRequestMetaDataClient= (*it_handle).getChannelRequestMetaDataClient(); // 2 + + //2 + chtype clientT = _dbrType%(LAST_TYPE+1); + + + if (clientT != channelRequestMetaDataClient.getDataType() || + _dbrType != channelRequestMetaDataClient.getDbrDataType() ) { + + channelRequestMetaDataClient.setDataType (clientT); + channelRequestMetaDataClient.setDbrDataType(_dbrType); + + channelRequestMetaDataClient.setCafeDbrType( + (CAFENUM::DBR_TYPE) helper.convertToCAFEDbrTypeClass(_dbrType) ); + + + + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaDataClient(channelRequestMetaDataClient)); + if(MUTEX){cafeMutex.unlock();}//unlock + + channelRequestMetaDataClient= (*it_handle).getChannelRequestMetaDataClient(); + } + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief channelPrepareGet: prepare client's requested data for ca call + * \param _handle input: handle + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE; + */ +int Granules::channelPrepareGet(const unsigned int _handle) { +#define __METHOD__ "Granules::channelPrepareGet" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + channelRequestMetaDataClient = (*it_handle).getChannelRequestMetaDataClient(); // + channelRequestMetaData = (*it_handle).getChannelRequestMetaData(); // + channelRequestDataTypePolicy = (*it_handle).getChannelRequestDataTypePolicy(); // + + bool changeChannelRequestMetaData=false; + + chtype clientRequestType = channelRequestMetaData.getDataType(); + CAFENUM::DBR_TYPE cafeDbrType = channelRequestMetaData.getCafeDbrType(); + + + // Do we transfer data with the smaller sized type? + if (channelRequestDataTypePolicy.getRequestKind()==CAFENUM::LOWEST_DATATYPE) { + + clientRequestType = convertMatrix((*it_handle).getChannelRegalia().getDataType(), + channelRequestMetaDataClient.getDataType()); + channelRequestMetaData.setDataType(clientRequestType); + + changeChannelRequestMetaData=true; + + } + + + if (channelRequestMetaDataClient.getCafeDbrType() > channelRequestMetaData.getCafeDbrType() + && channelRequestMetaDataClient.getCafeDbrType() <= CAFENUM::DBR_TIME ) { + cafeDbrType = channelRequestMetaDataClient.getCafeDbrType(); + channelRequestMetaData.setCafeDbrType(cafeDbrType); + changeChannelRequestMetaData=true; + } + + if (changeChannelRequestMetaData) + { + //set dbrType according to cafeDbrType; + switch (cafeDbrType) + { + case CAFENUM::DBR_TIME: + channelRequestMetaData.setDbrDataType(dbf_type_to_DBR_TIME(clientRequestType)); + break; + case CAFENUM::DBR_STS: + channelRequestMetaData.setDbrDataType(dbf_type_to_DBR_STS (clientRequestType)); + break; + case CAFENUM::DBR_PRIMITIVE: + channelRequestMetaData.setDbrDataType(dbf_type_to_DBR (clientRequestType)); + break; + default: + channelRequestMetaData.setDbrDataType(dbf_type_to_DBR_TIME(clientRequestType)); + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Method does not support this DBR_TYPE: " + << dbr_type_to_text(channelRequestMetaData.getCafeDbrType()) << endl; //OK + + cout << "This line should never appear!" << endl; + cout << "Handle=" << _handle << " PVNAME " << (*it_handle).pv << endl; + cout << "The requested cafeDbrType was " << cafeDbrType << endl; + cout << "Valid values are CAFENUM::DBR_PRIMITIVE " << CAFENUM::DBR_PRIMITIVE << endl; + cout << "Valid values are CAFENUM::DBR_STS " << CAFENUM::DBR_STS << endl; + cout << "Valid values are CAFENUM::DBR_TIME " << CAFENUM::DBR_TIME << endl; + cout << "Valid values are CAFENUM::DBR_GR " << CAFENUM::DBR_GR << endl; + cout << "Valid values are CAFENUM::DBR_CTRL " << CAFENUM::DBR_CTRL << endl; + cout << "Valid values are CAFENUM::DBR_PUT " << CAFENUM::DBR_PUT << endl; + cout << "Valid values are CAFENUM::DBR_STSACK " << CAFENUM::DBR_STSACK << endl; + cout << "Valid values are CAFENUM::DBR_CLASS " << CAFENUM::DBR_CLASS << endl; + cout << "Valid values are CAFENUM::DBR_NONE " << CAFENUM::DBR_NONE << endl; + break; + } + } + + //Check the number of elements requested? + + + if ((*it_handle).getChannelRegalia().getNelem()>1) { // or channelRequestMetaDataClient.getNelem() >1 + + + //cout << __METHOD__ << endl; + //cout << " channelRequestMetaData.getNelem() " << channelRequestMetaData.getNelem() << endl; + //cout << " channelRequestMetaDataClient.getNelem() " << channelRequestMetaDataClient.getNelem() << endl; + //cout << " channelRequestMetaDataClient.getOffset() " << channelRequestMetaDataClient.getOffset() << endl; + + //What did the client request? What is native type? Transfer minimum of this. + if (channelRequestMetaData.getNelem() != (channelRequestMetaDataClient.getNelem()- channelRequestMetaDataClient.getOffset())) { + //channelRequestMetaDataClient.setNelem(channelRequestMetaDataClient.getNelem()+channelRequestMetaDataClient.getOffset()); + + //if(MUTEX){cafeMutex.lock();} //lock + //handle_index.modify(it_handle, + // change_channelRequestMetaDataClient(channelRequestMetaDataClient)); + //if(MUTEX){cafeMutex.unlock();} //unlock + + unsigned int newNelem=min( ((*it_handle).getChannelRegalia().getNelem()), + channelRequestMetaDataClient.getNelem()+channelRequestMetaDataClient.getOffset()); + channelRequestMetaData.setNelem(newNelem); + //if ( newNelem < channelRequestMetaData.getNelemCache()){ + // channelRequestMetaData.setNelemCache(newNelem); + //} + changeChannelRequestMetaData=true; + //cout << "newElem for MetaData " << newNelem << endl; + } + + /* + //What did the client request? What is native type? Transfer minimum of this. + if (channelRequestMetaData.getNelem() != channelRequestMetaDataClient.getNelem()) { + unsigned int newNelem=min((*it_handle).getChannelRegalia().getNelem(), + channelRequestMetaDataClient.getNelem()); + channelRequestMetaData.setNelem(newNelem); + //if ( newNelem < channelRequestMetaData.getNelemCache()){ + // channelRequestMetaData.setNelemCache(newNelem); + //} + changeChannelRequestMetaData=true; + } + */ + + } + + + + + if (changeChannelRequestMetaData==true) { + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaData(channelRequestMetaData)); + + if(MUTEX){cafeMutex.unlock();}//unlock + + + }; + + + channelRequestMetaData = (*it_handle).getChannelRequestMetaData(); + + + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + +return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief channelExecuteGet: Executes ca_get method and wiats for response + * \param _handle input: handle + * \return ICAFE_NORMAL else ECAFE error + */ +int Granules::channelExecuteGet(const unsigned int _handle) { +#define __METHOD__ "Granules::channelExecuteGet" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + channelTimeoutPolicyGet = (*it_handle).getChannelTimeoutPolicyGet(); + + channelRequestMetaDataClient = (*it_handle).getChannelRequestMetaDataClient(); + channelRequestPolicyGet = (*it_handle).getChannelRequestPolicyGet(); + + switch (channelRequestPolicyGet.getMethodKind()) { + case WITH_CALLBACK_DEFAULT: + case WITH_CALLBACK_USER_SUPPLIED: + + if (channelRequestPolicyGet.getMethodKind()==WITH_CALLBACK_DEFAULT){ + status=((*it_handle)).getWithCallback(CALLBACK_CAFE::handlerGet);//CALLBACK_CAFE::callbackHandlerGet); + } + else { //WITH_CALLBACK_USER_SUPPLIED: + // Check getHandler is not NULL + // If it is then use default callback! + if (channelRequestPolicyGet.getHandler() != NULL) { + status=((*it_handle)).getWithCallback(channelRequestPolicyGet.getHandler()); + } + else { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "NO CALLBACK FUNCTION FOR GET SUPPLIED. USING DEFAULT CALLBACK_CAFE::handlerGet " << std::endl; + status=((*it_handle)).getWithCallback(CALLBACK_CAFE::handlerGet); + } + } + + + if (status != ECA_NORMAL) { + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setRequestStatus (status); + channelRequestStatusGet.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}//unlock + return status; + } + + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + + channelRequestStatusGet.setCallbackKind(true, false); //PENDING NOT_TRIGGERED + + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + + if(MUTEX){cafeMutex.unlock();}//unlock + + ca_flush_io(); + + status=waitForGetEvent(_handle, channelTimeoutPolicyGet.getTimeout() ); + + if (status==ECAFE_TIMEOUT && channelTimeoutPolicyGet.getSelfGoverningTimeout() + && (*it_handle).isConnected() ) { + unsigned short ntries=0; + while (status==ECAFE_TIMEOUT && ntries (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + channelRequestPolicyGet = (*it_handle).getChannelRequestPolicyGet(); + + + channelRequestMetaDataClient = (*it_handle).getChannelRequestMetaDataClient(); + + if ((*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() != CAFENUM::PENDING) { + + switch (channelRequestPolicyGet.getMethodKind()) { + case WITHOUT_CALLBACK: + case WITH_CALLBACK_DEFAULT: + case WITH_CALLBACK_USER_SUPPLIED: + + //Check these in at end of routine + //channelRequestStatusGet.setCallbackKind(true, false); //PENDING NOT_TRIGGERED + //channelRequestStatusGet.setCallbackStatus (status); + + if (channelRequestPolicyGet.getMethodKind()==WITH_CALLBACK_DEFAULT || + channelRequestPolicyGet.getMethodKind()==WITHOUT_CALLBACK ){ + status=((*it_handle)).getWithCallback(CALLBACK_CAFE::handlerGet);//CALLBACK_CAFE::callbackHandlerGet); + + } + else { //WITH_CALLBACK_USER_SUPPLIED: + // Check getHandler is not NULL + // If it is then use default callback! + if (channelRequestPolicyGet.getHandler() != NULL) { + status=((*it_handle)).getWithCallback(channelRequestPolicyGet.getHandler()); + } + else { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "NO CALLBACK FUNCTION FOR GET SUPPLIED. USING DEFAULT CALLBACK_CAFE::handlerGet " << std::endl; + status=((*it_handle)).getWithCallback(CALLBACK_CAFE::handlerGet); + } + } + + if (status != ECA_NORMAL) { + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackKind(false, false); // NOT_INITIATED NOT_TRIGGERED + channelRequestStatusGet.setRequestStatus (status); + + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}//unlock + return status; + } + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setRequestStatus (status); + channelRequestStatusGet.setCallbackKind(true, false); //PENDING NOT_TRIGGERED + + handle_index.modify(it_handle, + change_channelRequestStatusGet(channelRequestStatusGet)); + //cout << __METHOD__ << " CALLBACK STARTED " << (*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() << endl; + + if(MUTEX){cafeMutex.unlock();}//unlock + break; + + } //switch + + if(MUTEX){cafeMutex.lock();} //lock + + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}//unlock + + } else { + status= ICAFE_WAITING_FOR_PREV_CALLBACK; + + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cafeStatus.report(status); + + } //if + + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestMetaData = (*it_handle).getChannelRequestMetaData(); + channelRequestMetaData.setOffset(channelRequestMetaDataClient.getOffset()); + handle_index.modify(it_handle, change_status(status)); + handle_index.modify(it_handle, change_channelRequestMetaData(channelRequestMetaData)); + if(MUTEX){cafeMutex.unlock();}//unlock + + + } //handle + + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + +return status; //Could still give a timeout depending on policy +#undef __METHOD__ +} + + +/** + * \brief waitForManyGetEvents: waits for all get callback to complete + * \param handleArray input: array of handles + * \param arrayLength input: size of array of handles + * \param bundleResponse output: map + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int Granules::waitForManyGetEvents(const unsigned int * handleArray, unsigned int arrayLength, map & bundleResponse) { +#define __METHOD__ "Granules::waitForManyGetEvents" + + unsigned int nWaitActive=0; + unsigned int nWaitActiveOver=0; + //ChannelRequestPolicy channelGetMethodPolicy; + //CAFEConduit cc; + int status; + int statusTransaction; + int statusBundle= ICAFE_NORMAL; + + ca_flush_io(); + + //Start Time + using namespace boost::posix_time; + ptime timeStart(microsec_clock::local_time()); + + double timeoutHighestOriginal =0; + double timeElapsed =0; + double timeoutHighest =0; + unsigned short ntries =0; + + bundleResponse.clear(); + //first determine the number of handles + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + for (unsigned int i=0; i timeoutHighest) { + + //Increase Timeout + + if (((*it_handle).getChannelTimeoutPolicyGet()).getSelfGoverningTimeout()) { + + if (ntries timeoutHighest) { + + + + }//if handle + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << handleArray[i] << endl; + + status= ECAFE_INVALID_HANDLE; + + } + }//for + + + + //Not required as will just out of loop for nWaitActiveOver==WaitActive + //if (timeElapsed > timeoutHighest && nWaitActive != nWaitActiveOver) { + // cout << __METHOD__ << " timeElapsed " << timeElapsed << " //// exceeded final allowed wait time " << timeoutHighest << endl; + // break; + //} + + + ///cout << nWaitActiveOver << " nWaitActiveOver// " << nWaitActive << endl; + + //About to just loop! + //if (nWaitActiveOver != nWaitActive) { + + //End time + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + + #if HAVE_BOOST_THREAD + boost::this_thread::sleep_for(boost::chrono::microseconds(20)); + #else + #if HAVE_LINUX + usleep(20); + #endif + #endif + //} + + ++nIterations; + + ///cout << "No iterations << " << nIterations << endl; + ////if (nIterations>5000) break; + }//while + + //Set Final Status of each handle + + + //cafeConduit_set_by_handle & handle_index = cs.get (); + //cafeConduit_set_by_handle::iterator it_handle; + + for (unsigned int i=0; i (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + using namespace boost::posix_time; + ptime timeStart(microsec_clock::local_time()); + + double timeElapsed=0; + unsigned int nPoll=0; + + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + + status= channelRequestStatusGet.getMessageStatus(); //Message==Request + + while (channelRequestStatusGet.getCallbackProgressKind() == CAFENUM::PENDING + && timeElapsed < _timeout){ + ca_flush_io(); + + #if HAVE_BOOST_THREAD + boost::this_thread::sleep_for(boost::chrono::microseconds(20)); + #else + #if HAVE_LINUX + usleep(20); + #endif + #endif + ++nPoll; + + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + channelRequestStatusGet = (*it_handle).getChannelRequestStatusGet(); + + } + + //cout << "npoll " << nPoll << endl; + + if (timeElapsed >= _timeout ) { + std::cout << __METHOD__ << __LINE__ << " TimeElapsed " << timeElapsed << " timeout_pend_io " << _timeout<< std::endl; + //std::cout << " End= " << tv.tv_sec << " " << tv.tv_usec << " Start =" << startTime_sec << " " << startTime_usec << std::endl; + } + + if (channelRequestStatusGet.getCallbackProgressKind() != CAFENUM::PENDING) { + + return ICAFE_NORMAL; //or status? + } + else {return ECAFE_TIMEOUT;}; + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + +#undef __METHOD__ +} + + +/** + * \brief isGetCallbackDone performs a ca_poll() and queries the Conduit data container + * to determine if the getWithCallback has been completed + * \param _handle input: handle + * \return bool true or false + */ +bool Granules::isGetCallbackDone(const unsigned int _handle){ +#define __METHOD__ "Granules::isGetCallbackDone(_handle)" + + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if ((*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() == CAFENUM::PENDING) { + + ca_poll(); // just in case a flush was forgotten + } + + if ( (*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() == CAFENUM::PENDING) { + return false;} + else {return true;} + + + } + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << " Handle " << _handle << " does not exist! " << endl; + cout << " Function for Handle " << _handle << " will return true to keep things going! " << endl; + + return true; + +#undef __METHOD__ +}; + + + + +/** + * \brief waitForPutEvent: waits for put callback to complete + * \param _handle input: handle + * \param _timeout input: wait time before method timeouts + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int Granules::waitForPutEvent(const unsigned int _handle, double _timeout) { +#define __METHOD__ "Granules::waitForPutEvent" + + //using namespace boost::posix_time; + + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + using namespace boost::posix_time; + ptime timeStart(microsec_clock::local_time()); + + double timeElapsed=0; + unsigned int nPoll=0; + + //ca_flush_io already done - no need to do it again! + + channelRequestStatusPut = (*it_handle).getChannelRequestStatusPut(); + status= channelRequestStatusPut.getMessageStatus(); //Message==Request + + while (channelRequestStatusPut.getCallbackProgressKind() == CAFENUM::PENDING + && timeElapsed < _timeout){ + + ++nPoll; + + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + + channelRequestStatusPut = (*it_handle).getChannelRequestStatusPut(); + } + + + if (timeElapsed >= _timeout ) { + std::cout << __METHOD__ << __LINE__ << " TimeElapsed " << timeElapsed << " timeout_pend_io " << _timeout<< std::endl; + } + + if (channelRequestStatusPut.getCallbackProgressKind() != CAFENUM::PENDING) { + return ICAFE_NORMAL; //status + } + else {return ECAFE_TIMEOUT;}; + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + + +#undef __METHOD__ +} + + + + + +/** + * \brief isPutCallbackDone performs a ca_poll() and queries the Conduit data container + * to determine if the putWithCallback has been completed + * \param _handle input: handle + * \return bool true or false + */ +bool Granules::isPutCallbackDone(const unsigned int _handle){ +#define __METHOD__ "Granules::isPutCallbackDone(_handle)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + if ((*it_handle).getChannelRequestStatusPut().getCallbackProgressKind() == CAFENUM::PENDING) { + + ca_poll(); // just in case a flush was forgotten + + } + if ( (*it_handle).getChannelRequestStatusPut().getCallbackProgressKind() == CAFENUM::PENDING) { + return false;} + else {return true;} + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << " Handle " << _handle << " does not exist! " << endl; + cout << " Function for Handle " << _handle << " will return true to keep things going! " << endl; + } + + return true; + +#undef __METHOD__ +}; + +////////////////////////////////////////////////////////////////////////////////////// + +/** + * \brief channelVerifyGetCtrl: preVerification of client's requested data + * \param _handle input: handle + * \param _dbrType input: chtype + * \return ICAFE_NORMAL or ICAFE_CA_OP_CONN_DOWN or ECAFE_NORDACCESS + */ +int Granules::channelVerifyGetCtrl(const unsigned int _handle, chtype _dbrType) { +#define __METHOD__ "Granules::channelVerifyGetCtrl" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if ( (*it_handle).getChannelRegalia().getCafeConnectionState()==ICAFE_CS_NEVER_CONN) { + return ICAFE_CS_NEVER_CONN; + } + + if ( CHECK_CONSISTENCY_CA_STATE && !(*it_handle).isConnected()) { + status=helper.checkConsistency(_handle); + if (status!=ICAFE_NORMAL) { return status;} + } + + + //isConnected + if ( !(*it_handle).isConnected()) { + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); + channelRequestStatusGetCtrl.setPreRequestStatus (ICAFE_CA_OP_CONN_DOWN); + + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + + handle_index.modify(it_handle, change_status(ICAFE_CA_OP_CONN_DOWN)); //for return + if(MUTEX){cafeMutex.unlock();}//unlock + return ICAFE_CA_OP_CONN_DOWN; + } + + //hasReadAccess + if ((*it_handle).getAccessRead() == 0) { + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); + channelRequestStatusGetCtrl.setPreRequestStatus (ECAFE_NORDACCESS); + + + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + + handle_index.modify(it_handle, change_status(ECAFE_NORDACCESS)); //for return + if(MUTEX){cafeMutex.unlock();}//unlock + return ECAFE_NORDACCESS; + } + + //First steps OK + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); + channelRequestStatusGetCtrl.setPreRequestStatus (ICAFE_NORMAL); + + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + if(MUTEX){cafeMutex.unlock();}//unlock + + channelRequestMetaCtrlClient = (*it_handle).getChannelRequestMetaCtrlClient(); // 2 + + //2 + chtype clientT = _dbrType%(LAST_TYPE+1); + channelRequestMetaCtrlClient.setDataType (clientT); + channelRequestMetaCtrlClient.setDbrDataType(_dbrType); + + + + //This will always be DBR_CTRL + channelRequestMetaCtrlClient.setCafeDbrType( + // (CAFENUM::DBR_TYPE) (*it_handle).convertToDbrTypeClass(_dbrType) ); + (CAFENUM::DBR_TYPE) helper.convertToCAFEDbrTypeClass(_dbrType) ); + + + + //All ok so far + + if(MUTEX){cafeMutex.lock();} //lock + + handle_index.modify(it_handle, + change_channelRequestMetaCtrlClient(channelRequestMetaCtrlClient)); + + if(MUTEX){cafeMutex.unlock();} //unlock + + + + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief channelPrepareGetCtrl: prepare client's requested data for ca call + * \param _handle input: handle + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE; + */ +int Granules::channelPrepareGetCtrl(const unsigned int _handle) { +#define __METHOD__ "Granules::channelPrepareGetCtrl" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + + channelRequestMetaCtrlClient = (*it_handle).getChannelRequestMetaCtrlClient(); // + channelRequestMetaCtrl = (*it_handle).getChannelRequestMetaCtrl(); // + channelRequestDataTypePolicy = (*it_handle).getChannelRequestDataTypePolicy(); // + + bool changeChannelRequestMetaCtrl=false; + + chtype clientRequestType = channelRequestMetaCtrl.getDataType(); + CAFENUM::DBR_TYPE cafeDbrType = channelRequestMetaCtrl.getCafeDbrType(); + + // Do we transfer data with the smaller sized type? + if (channelRequestDataTypePolicy.getRequestKind()==CAFENUM::LOWEST_DATATYPE) { + + clientRequestType = convertMatrix((*it_handle).getChannelRegalia().getDataType(), + channelRequestMetaCtrlClient.getDataType()); + channelRequestMetaCtrl.setDataType(clientRequestType); + changeChannelRequestMetaCtrl=true; + + } + + if (channelRequestMetaCtrlClient.getCafeDbrType() > channelRequestMetaCtrl.getCafeDbrType()) { + cafeDbrType = channelRequestMetaCtrlClient.getCafeDbrType(); + channelRequestMetaCtrl.setCafeDbrType(cafeDbrType); + changeChannelRequestMetaCtrl=true; + } + + + + if (changeChannelRequestMetaCtrl) { + //set dbrType according to cafeDbrType; + switch (cafeDbrType) + { + case CAFENUM::DBR_CTRL: + channelRequestMetaCtrl.setDbrDataType(dbf_type_to_DBR_CTRL(clientRequestType)); + break; + case CAFENUM::DBR_GR: + channelRequestMetaCtrl.setDbrDataType(dbf_type_to_DBR_GR (clientRequestType)); + break; + default: + channelRequestMetaCtrl.setDbrDataType(dbf_type_to_DBR_CTRL(clientRequestType)); + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Method does not support this DBR_TYPE: " + << dbr_type_to_text(channelRequestMetaData.getCafeDbrType()) << endl;//OK + cout << "This line should never appear!" << endl; + break; + } + } + + + //Check the number of elements requested? + if ((*it_handle).getChannelRegalia().getNelem()>1) { + + //What did the client request? What is native type? Transfer minimum of this. + if (channelRequestMetaCtrl.getNelem() != channelRequestMetaCtrlClient.getNelem()) { + + + unsigned int nelem_new = min(MAX_NELEM_FOR_CTRL_BUFFER, + min((*it_handle).getChannelRegalia().getNelem(), + channelRequestMetaCtrlClient.getNelem())); + + if (nelem_new != channelRequestMetaCtrl.getNelem() ) { + channelRequestMetaCtrl.setNelem( nelem_new); + changeChannelRequestMetaCtrl=true; + } + + } + } + + if (changeChannelRequestMetaCtrl==true) { + if(MUTEX){cafeMutex.lock();} //lock + handle_index.modify(it_handle, + change_channelRequestMetaCtrl(channelRequestMetaCtrl)); + if(MUTEX){cafeMutex.unlock();}//unlock + }; + + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + +return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief channelExecuteGetCtrl: Executes ca_get method + * \param _handle input: handle + * \return ICAFE_NORMAL + */ +int Granules::channelExecuteGetCtrl(const unsigned int _handle) { +#define __METHOD__ "Granules::channelExecuteGetCtrl" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + + channelTimeoutPolicyGet = (*it_handle).getChannelTimeoutPolicyGet(); // + + channelRequestPolicyGetCtrl = (*it_handle).getChannelRequestPolicyGetCtrl(); // 1 + + switch (channelRequestPolicyGetCtrl.getMethodKind()) { + case WITH_CALLBACK_DEFAULT: + case WITH_CALLBACK_USER_SUPPLIED: + + if (channelRequestPolicyGetCtrl.getMethodKind()==WITH_CALLBACK_DEFAULT){ + status=((*it_handle)).getCtrlWithCallback(CALLBACK_CAFE::handlerGetCtrl);//CALLBACK_CAFE::callbackHandlerGetCtrl); + } + else { //WITH_CALLBACK_USER_SUPPLIED: + // If it is then use default callback! + if (channelRequestPolicyGetCtrl.getHandler() != NULL) { + status=((*it_handle)).getCtrlWithCallback(channelRequestPolicyGetCtrl.getHandler()); + } + else { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "NO CALLBACK FUNCTION FOR GET SUPPLIED." << std::endl; + std::cout << "USING DEFAULT CALLBACK_CAFE::handlerGetCtrl " << std::endl; + status=((*it_handle)).getCtrlWithCallback(CALLBACK_CAFE::handlerGetCtrl); + } + } + + + + if (status != ECA_NORMAL) { + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); // + channelRequestStatusGetCtrl.setCallbackKind(false, false); // NOT_INITIATED + channelRequestStatusGetCtrl.setRequestStatus (status); + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}//unlock + return status; + } + + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); // + channelRequestStatusGetCtrl.setCallbackKind(true, false); //PENDING + channelRequestStatusGetCtrl.setRequestStatus (status); + + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + + if(MUTEX){cafeMutex.unlock();}//unlock + + ca_flush_io(); + + status=waitForGetCtrlEvent(_handle, channelTimeoutPolicyGet.getTimeout() ); + + if (status==ECAFE_TIMEOUT && channelTimeoutPolicyGet.getSelfGoverningTimeout() + && (*it_handle).isConnected() ) { + unsigned short ntries=0; + while (status==ECAFE_TIMEOUT && ntries (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + channelRequestPolicyGetCtrl = (*it_handle).getChannelRequestPolicyGetCtrl(); // 1 + + if ((*it_handle).getChannelRequestStatusGetCtrl().getCallbackProgressKind() != CAFENUM::PENDING) { + + switch (channelRequestPolicyGetCtrl.getMethodKind()) { + case WITHOUT_CALLBACK: + case WITH_CALLBACK_DEFAULT: + case WITH_CALLBACK_USER_SUPPLIED: + + if (channelRequestPolicyGetCtrl.getMethodKind()==WITH_CALLBACK_DEFAULT || + channelRequestPolicyGetCtrl.getMethodKind()==WITHOUT_CALLBACK ){ + status=((*it_handle)).getCtrlWithCallback(CALLBACK_CAFE::handlerGetCtrl);//CALLBACK_CAFE::callbackHandlerGetCtrl); + } + else { //WITH_CALLBACK_USER_SUPPLIED: + // If it is then use default callback! + if (channelRequestPolicyGetCtrl.getHandler() != NULL) { + status=((*it_handle)).getCtrlWithCallback(channelRequestPolicyGetCtrl.getHandler()); + } + else { + std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl; + std::cout << "NO CALLBACK FUNCTION FOR GET SUPPLIED." << std::endl; + std::cout << "USING DEFAULT CALLBACK_CAFE::handlerGetCtrl " << std::endl; + status=((*it_handle)).getCtrlWithCallback(CALLBACK_CAFE::handlerGetCtrl); + } + } + + //channelRequestStatusGetCtrl.setRequestStatus (status); + + + if (status != ECA_NORMAL) { + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); // + channelRequestStatusGetCtrl.setCallbackKind(false, false); // NOT_INITIATED + channelRequestStatusGetCtrl.setRequestStatus (status); + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}//unlock + return status; + } + + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); // + channelRequestStatusGetCtrl.setCallbackKind(true, false); //PENDING + channelRequestStatusGetCtrl.setRequestStatus (status); + + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + + if(MUTEX){cafeMutex.unlock();}//unlock + + break; + + } //switch + + + } else { + status= ICAFE_WAITING_FOR_PREV_CALLBACK; + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + + } //if pending + + + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + + + + if(MUTEX){cafeMutex.lock();} //lock + channelRequestMetaCtrl = (*it_handle).getChannelRequestMetaCtrl(); + channelRequestMetaCtrl.setOffset(channelRequestMetaCtrlClient.getOffset()); + handle_index.modify(it_handle, change_channelRequestMetaCtrl(channelRequestMetaCtrl)); + handle_index.modify(it_handle, change_status(status)); + if(MUTEX){cafeMutex.unlock();}//unlock + +return status; //Could still give a timeout depending on policy or ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief waitForGetCtrlEvent: waits for get callback to complete + * \param _handle input: handle + * \param _timeout input: wait time before method timeouts + * \return ICAFE_NORMAL or ECAFE_TIMEOUT + */ +int Granules::waitForGetCtrlEvent(const unsigned int _handle, double _timeout) { +#define __METHOD__ "Granules::waitForGetEvent" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + using namespace boost::posix_time; + ptime timeStart(microsec_clock::local_time()); + + double timeElapsed=0; + unsigned int nPoll=0; + + + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); + status= channelRequestStatusGetCtrl.getMessageStatus(); //Message==Request + + while (channelRequestStatusGetCtrl.getCallbackProgressKind() == PENDING + && timeElapsed < _timeout){ + //usleep(20); + ++nPoll; + + ptime timeEnd(microsec_clock::local_time()); + time_duration duration(timeEnd-timeStart); + timeElapsed= (double) duration.total_microseconds()/1000000.0; + + channelRequestStatusGetCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); + + } + + + if (channelRequestStatusGetCtrl.getCallbackProgressKind() != CAFENUM::PENDING) { + + return ICAFE_NORMAL; //or status + } + else {return ECAFE_TIMEOUT;}; + } + else { + //cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + //cout << "Internal CAFE ERROR! Invalid handle : " << _handle << endl; + return ECAFE_INVALID_HANDLE; + } + +#undef __METHOD__ +} + + +/** + * \brief isGetXtrlCallbackDone performs a ca_poll() and queries the Conduit data container + * to determine if the getCtrlWithCallback has been completed + * \param _handle input: handle + * \return bool true or false + */ +bool Granules::isGetCtrlCallbackDone(const unsigned int _handle){ +#define __METHOD__ "CAFEGranule::isGetCtrlCallbackDone(_handle)" + + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + if ((*it_handle).getChannelRequestStatusGetCtrl().getCallbackProgressKind() == CAFENUM::PENDING) { + + ca_poll(); // just in case a flush was forgotten + + } + if ( (*it_handle).getChannelRequestStatusGetCtrl().getCallbackProgressKind() == CAFENUM::PENDING) { + return false;} + else {return true;} + + } + + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << " Handle " << _handle << " does not exist! " << endl; + cout << " Function for Handle " << _handle << " will return true to keep things going! " << endl; + + return true; + +#undef __METHOD__ +}; + + +/** + * \brief convertMatrix determines datatype for message transmission. + * The datatype will be the smaller of the native datatype and that requested by client. + * \param nativeType input: native datatype + * \param clientT input: datatype is that requested by client + * \return clientRequestType is datatype for message transmission + */ +chtype Granules::convertMatrix(const chtype nativeType, const chtype clientT) { +#define __METHOD__ "Granules::convertMatrix(const CAFEConduit cc, chtype clientT)" + + chtype clientRequestType=clientT; + + + switch (nativeType) { + case DBR_STRING: + //convert to smaller type + break; + + case DBR_DOUBLE: + //convert is larger than a double + if ( clientT == DBR_STRING ) { + clientRequestType=DBR_DOUBLE; + } + break; + case DBR_FLOAT: + switch(clientT) { + case DBR_STRING: + case DBR_DOUBLE: + clientRequestType=DBR_FLOAT; + break; + default: + break; + } + break; + case DBR_LONG: + switch( clientT) { + case DBR_STRING: + case DBR_DOUBLE: + clientRequestType=DBR_LONG; + break; + default: + break; + } + break; + case DBR_SHORT: + switch( clientT) { + case DBR_STRING: + case DBR_DOUBLE: + case DBR_FLOAT: + case DBR_LONG: + clientRequestType=DBR_SHORT; + break; + default: + break; + } + break; + case DBR_ENUM: + switch( clientT) { + case DBR_STRING: + case DBR_DOUBLE: + case DBR_FLOAT: + case DBR_LONG: + clientRequestType=DBR_ENUM; + break; + default: + break; + } + break; + case DBR_CHAR: + clientRequestType=DBR_CHAR; + break; + default: + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "CAFE INTERNAL ERROR. Datatype is not an option for this switch case: " + << dbr_type_to_text(nativeType) << endl; + break; + } + + return clientRequestType; +#undef __METHOD__ +} diff --git a/src/handleHelper.cpp b/src/handleHelper.cpp new file mode 100644 index 0000000..2f52dd6 --- /dev/null +++ b/src/handleHelper.cpp @@ -0,0 +1,3372 @@ +/// +/// \file handleHelper.cc +/// \author Jan Chrin, PSI +/// \date Release, February 2015 +/// \version CAFE 1.0.0 +/// + +#include "handleHelper.h" +#include "policyHelper.h" +#include "global.h" + +using namespace std; + + +/** + * \brief Checks what's in the hash table against actual ca server data \n + * Do for all handles + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int HandleHelper::checkConsistency() { +#define __METHOD__ "HandleHelper::checkConsistency()" + + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus=checkConsistency( (*itcs).getHandle()); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + return gStatus; +#undef __METHOD__ +} + + +/** + * \brief Checks what's in the hash table against actual ca server data + * \param _handle input : Conduit object reference + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int HandleHelper::checkConsistency(unsigned int _handle) { +#define __METHOD__ "HandleHelper::checkConsistency(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + + unsigned int nflag=0; + string message=""; + ChannelRegalia chInfo=(*it_handle).getChannelRegalia(); + + if (chInfo.getChannelID()==NULL) return ECAFE_NULLCHID; + + int op=chInfo.getConnectionState(); + + if (op==CA_OP_CONN_UP) { + if (ca_state(chInfo.getChannelID()) != cs_conn) { + chInfo.setConnectionState (CA_OP_CONN_DOWN); + chInfo.setCafeConnectionState(ICAFE_CS_DISCONN); + chInfo.setConnectFlag(false); + nflag=1; + message.append("CONNECT TRUE WHEN FALSE\n"); + } + if (ca_element_count(chInfo.getChannelID()) != chInfo.getNelem()) { + chInfo.setNelem (ca_element_count(chInfo.getChannelID())); + message.append("NELEM COUNT WRONG IN HASH TABLE\n"); + nflag=10; + } + + if (ca_field_type(chInfo.getChannelID()) != chInfo.getDataType()) { + chInfo.setDataType (ca_field_type(chInfo.getChannelID())); + message.append("NATIVE DATATYPE WRONG IN HASH TABLE\n"); + nflag=100; + } + } + else { + if (ca_state(chInfo.getChannelID()) == cs_conn) { + chInfo.setConnectionState (CA_OP_CONN_UP); + chInfo.setCafeConnectionState(ICAFE_CS_CONN); + chInfo.setConnectFlag(true); + nflag=2; + message.append("CONNECT FALSE WHEN TRUE\n"); + } + } + + if (ca_read_access( chInfo.getChannelID()) != chInfo.getReadAccess()) { + chInfo.setReadAccess (ca_read_access(chInfo.getChannelID())); + message.append("READ ACCESS WRONG IN HASH TABLE\n"); + nflag=1000; + } + + if (ca_write_access(chInfo.getChannelID()) != chInfo.getWriteAccess()) { + chInfo.setWriteAccess (ca_write_access(chInfo.getChannelID())); + message.append("WRITE ACCESS WRONG IN HASH TABLE\n"); + nflag=10000; + } + + + if (nflag>0) { + std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl; + std::cout << "Following Corrections Made:" << std::endl; + std::cout << message << endl; + } + //else { + // std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl; + // std::cout << "CA CONSISTENCY VERIFIED " << std::endl; + //} + + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRegalia(chInfo)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves whether pv is of enumerated type + * \param _handle input: handle + * \return true if enum type else false + */ +bool HandleHelper::isEnum(unsigned int _handle) { +#define __METHOD__ "HandleHelper::isEnum(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + PVCtrlHolder _pvc; + unsigned int nelem=getNelemRequestCtrl(_handle); + + if (nelem >1) { + setNelemToRetrieveFromCtrlCache(_handle,1); + } + _pvc.setNelem(nelem); + + int _stat = (*it_handle).getPVCtrlHolder(_pvc) ; + + //return to previous + if (nelem!=1) { + setNelemToRetrieveFromCtrlCache(_handle,nelem); + } + if (_stat==ICAFE_NORMAL) { + if (_pvc.getNoEnumStrings()>0 ) { + // cafeBeta 1.0 uses shared pointer + //_pvc.deleteVal(); + return true; + } + } + // cafeBeta 1.0 uses shared pointer + //_pvc.deleteVal(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return false; + } + + return false; +#undef __METHOD__ +} + + + + +/** + * \brief Retrieves enum unsigned short state of enumerated string type + * \param _handle input: handle + * \param enumStringValue input: enum string state + * \return short enum value else -1 + */ +short HandleHelper::getEnumFromString(unsigned int _handle, string enumStringValue) { +#define __METHOD__ "HandleHelper::getEnumFromString(unsigned int _handle, string enumStringValue)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + PVCtrlHolder _pvc; + unsigned int nelem=getNelemRequestCtrl(_handle); + + if (nelem >1) { + setNelemToRetrieveFromCache(_handle,1); + } + _pvc.setNelem(nelem); + + int _stat = (*it_handle).getPVCtrlHolder(_pvc) ; + + //return to previous + if (nelem!=1) { + setNelemToRetrieveFromCache(_handle,nelem); + } + if (_stat==ICAFE_NORMAL) { + return _pvc.getEnumFromString(enumStringValue); + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(_stat); + cout << "Error for handle=" << _handle << " in (*it_handle).getPVCtrlHolder(_pvc) " << endl; + return -1; + } + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return -1; + } + + return false; +#undef __METHOD__ +} + + +string HandleHelper::getStringFromEnum(unsigned int _handle, unsigned short enumValue) { +#define __METHOD__ "HandleHelper::isEnum(unsigned int _handle, unsigned short enumValue)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + PVCtrlHolder _pvc; + unsigned int nelem=getNelemRequestCtrl(_handle); + + if (nelem >1) { + setNelemToRetrieveFromCache(_handle,1); + } + _pvc.setNelem(nelem); + + int _stat = (*it_handle).getPVCtrlHolder(_pvc) ; + + //return to previous + if (nelem!=1) { + setNelemToRetrieveFromCache(_handle,nelem); + } + if (_stat==ICAFE_NORMAL) { + return _pvc.getStringFromEnum(enumValue); + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(_stat); + cout << "Error for handle=" << _handle << " in (*it_handle).getPVCtrlHolder(_pvc) " << endl; + return (string) ""; + } + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return (string) ""; + } + + return (string) ""; +#undef __METHOD__ +} + + + + +/** + * \brief Gets the user arg as uint in event callback; meant for retrieving the current monitor ID + * \param _handle input: handle + * \return (uint) usr.args; meant for monitorID + */ +unsigned int HandleHelper::getUsrArgsAsUInt(unsigned int _handle) { +#define __METHOD__ "unsigned int getUsrArgsAsUInt(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + unsigned long monid=0; + + if (it_handle != handle_index.end()) { + monid = (unsigned long) (*it_handle).getUsrArgs(); + //monid = (unsigned long) (*it_handle).getChannelRequestMetaData().getUsrArg(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return monid; +#undef __METHOD__ +} + +/** + * \brief Gets the datatype of handle from within the callback function + * \param _handle input: handle + * \return chtype dataType + */ +chtype HandleHelper::getDataTypeCB(unsigned int _handle) { +#define __METHOD__ "chtype getDataTypeCB(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + chtype chval=0; + + if (it_handle != handle_index.end()) { + chval = (unsigned long) (*it_handle).getDataType(); + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return chval; +#undef __METHOD__ +} + + +/** + * \brief Gets the dbrdatatype of handle from within the callback function + * \param _handle input: handle + * \return chtype dataType + */ +chtype HandleHelper::getDbrDataTypeCB(unsigned int _handle) { +#define __METHOD__ "chtype getDbrDataTypeCB(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + chtype chval=0; + + if (it_handle != handle_index.end()) { + chval = (unsigned long) (*it_handle).getDbrDataType(); + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return chval; +#undef __METHOD__ +} + + +/** + * \brief Gets the cafeDbrType of handle from within the callback function + * \param _handle input: handle + * \return CAFENUM::DBR_TYPE cafeDbrDataType + */ +CAFENUM::DBR_TYPE HandleHelper::getCafeDbrTypeCB(unsigned int _handle) { +#define __METHOD__ "CAFENUM:DBR_TYPE getCafeDbrTypeCB(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + CAFENUM::DBR_TYPE chval=CAFENUM::DBR_NONE; + + if (it_handle != handle_index.end()) { + chval = (*it_handle).getCafeDbrType(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return chval; +#undef __METHOD__ +} + + +/** + * \brief Retrieves the native data type from ChannelRegalia object + * \param _handle input: handle + * \param ndt output: CAFE_DATATYPE object + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getDataTypeNative(unsigned int _handle, chtype & ndt) { +#define __METHOD__ "HandleHelper::getDataTypeNative(unsigned int _handle, CAFE_DATATYPE &cdt)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + ndt = (*it_handle).getChannelRegalia().getDataType(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves channel meta deta held in ChannelRequestStatusGetClassName object + * \param _handle input: handle + * \param crsClassName output: ChannelRequestStatus instance + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getChannelRequestStatusGetClassName(unsigned int _handle, ChannelRequestStatus &crsClassName) { +#define __METHOD__ "HandleHelper::getChannelRequestStatusGetClassName(unsigned int _handle, ChannelRequestStatus &crsClassName)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + crsClassName = (*it_handle).getChannelRequestStatusGetClassName(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + +/** + * \brief Retrieves channel meta deta held in ChannelRequestStatusGetSTSACK object + * \param _handle input: handle + * \param crsSTSACK output: ChannelRequestStatus instance + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getChannelRequestStatusGetSTSACK(unsigned int _handle, ChannelRequestStatus &crsSTSACK) { +#define __METHOD__ "HandleHelper::getChannelRequestStatusGetSTACK(unsigned int _handle, ChannelRequestStatus &crsSTSACK)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + crsSTSACK = (*it_handle).getChannelRequestStatusGetSTSACK(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + +/** + * \brief Retrieves channel meta deta held in ChannelRequestStatusGetCtrl object + * \param _handle input: handle + * \param crsCtrl output: ChannelRequestStatus instance + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getChannelRequestStatusGetCtrl(unsigned int _handle, ChannelRequestStatus &crsCtrl) { +#define __METHOD__ "HandleHelper::getChannelRequestStatusGetCtrl(unsigned int _handle, ChannelRequestStatus &crsCtrl)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + crsCtrl = (*it_handle).getChannelRequestStatusGetCtrl(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + + +/** + * \brief Retrieves channel meta deta held in ChannelRequestStatusGet object + * \param _handle input: handle + * \param crs output: ChannelRequestStatus instance + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getChannelRequestStatusGet (unsigned int _handle, ChannelRequestStatus &crs){ +#define __METHOD__ "HandleHelper::getChannelRequestStatusGet(unsigned int _handle, ChannelRequestStatus &crs)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + crs = (*it_handle).getChannelRequestStatusGet(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves channel meta deta held in the ChannelRegalia object + * \param _handle input: handle + * \param channelInfo output: ChannelRegalia object + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getChannelRegalia(unsigned int _handle, ChannelRegalia & channelInfo) { +#define __METHOD__ "HandleHelper::getChannelInfo(unsigned int _handle, ChannelRegalia channelInfo)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + channelInfo = (*it_handle).getChannelRegalia(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + +/** + * \brief Given the deliminator, sets the device/attribute components of the epics channel, for all handles + * \param deliminator deliminator: string (at PSI this is ususally a colon, i.e. ":") + * \return ICAFE_NORMAL if all OK else ERROR + */ +int HandleHelper::setChannelDeviceAttribute(std::string deliminator) { + + int localStatus=ICAFE_NORMAL; + int gStatus=ICAFE_NORMAL; bool sflag=false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus= setChannelDeviceAttribute ((*itcs).getHandle(), deliminator); + if (localStatus !=ICAFE_NORMAL && !sflag) {gStatus=localStatus; sflag=true;} + } + return gStatus; +} + +/** + * \brief Given the deliminator, sets the device/attribute components of the epics channel for a givem handle + * \param _handle input: handle to Conduit Objecte + * \param deliminator input: string (at PSI this is ususally a colon, i.e. ":") + * \return ICAFE_NORMAL if all OK else ERROR + */ +int HandleHelper::setChannelDeviceAttribute(unsigned int _handle, std::string deliminator) { +#define __METHOD__ "HandleHelper::setChannelDeviceAttribute(unsigned int _handle, std::string deliminator)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + + if (it_handle != handle_index.end()) { + + ChannelDeviceAttribute channelDeviceAttribute; + channelDeviceAttribute.init((*it_handle).pv, deliminator); + + if(MUTEX){cafeMutex.lock();} + + handle_index.modify(it_handle, change_channelDeviceAttribute( + channelDeviceAttribute)); + + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + +/** + * \brief Retrieves device name for a given handle + * \param _handle input: handle to Conduit Objecte + * \param device output: device name + * \return ICAFE_NORMAL if all OK else ERROR + */ +int HandleHelper::getChannelDevice(unsigned int _handle, std::string & device) { +#define __METHOD__ "HandleHelper::getChannelDevice" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + device = (*it_handle).getDevice(); + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + +/** + * \brief Retrieves attribute name for a given handle + * \param _handle input: handle to Conduit Objecte + * \param attribute output: attribute name + * \return ICAFE_NORMAL if all OK else ERROR + */ +int HandleHelper::getChannelAttribute(unsigned int _handle, std::string & attribute) { +#define __METHOD__ "HandleHelper::getChannelAttribute" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + attribute = (*it_handle).getAttribute(); + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves the total number of handled + * \return noHandles: Total no. of handles + */ +unsigned int HandleHelper::getNoHandles() { +#define __METHOD__ "HandleHelper::getNoHandles()" + + unsigned int nHandle=0; + + // Loop through all elements; + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + ++nHandle; + } + return nHandle; +#undef __METHOD__ +} + + + + +/** + * \brief Retrieves the next available handle + * \return handle: value of next available handle + */ +unsigned int HandleHelper::getNextFreeHandle() { +#define __METHOD__ "HandleHelper::getNextFreeHandle()" + + unsigned int freeHandle=0; + + vector handleVector; + + handleVector.reserve(getNoHandles()); + + // Loop through all elements; + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + handleVector.push_back((*itcs).getHandle()); + } + + std::sort (handleVector.begin(), handleVector.begin()); + + for (std::vector::iterator itui=handleVector.begin(); itui!=handleVector.end(); ++itui) { + ++freeHandle; + if ( (*itui) !=freeHandle) { + return freeHandle; + } + } + //const unsigned int min_int = std::numeric_limits::min(); + const unsigned int max_int = std::numeric_limits::max(); + + if (freeHandle == max_int) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "THE MAXIMUM ALLOWED NUMBER OF HANDLES HAS BEEN REACHED " << endl; + cout << "THIS MAXIMUM VALUE IS " << max_int << endl; + } + + return ++freeHandle; //this will give zero if max_int reached +#undef __METHOD__ +} + + + +/** + * \brief Retrieves context for a first matching of this process variable + * \param _pv input: process variable + * \return ccc : ca_client_context (NULL if not found) + */ +ca_client_context * HandleHelper::getContextFromPV(const char * _pv) { +#define __METHOD__ "HandleHelper::getContextFromPV(const char * _pv)" + + cafeConduit_set_by_pv & pv_index = cs.get (); + cafeConduit_set_by_pv::iterator it_pv; + + char pv[PVNAME_SIZE]; + removeLeadingAndTrailingSpaces(_pv, pv); + + it_pv = pv_index.find(pv); + + // Three possibilities of getting a match! + if (it_pv != pv_index.end()) { + // Examine ca_client_context noting that channels within a group dO count! + return (*it_pv).getClientContext() ; + } else { + // Loop through all elements and search for pv match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + //if((*itcs).getGroupHandle()>0) {continue;} // Channels within a group don't count! + if (!strcmp((*itcs).getPV(), _pv)) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //out << " INFORMATION to author: MATCHed Handle= " << (*itcs).handle << " to PV= " << _pv << endl; + //cout << " by looping through tcs::iterator, while the pv::iterator was NOT found! " << endl; + return (*itcs).getClientContext(); + } + } + } + + return NULL; +#undef __METHOD__ +} + + + + +/** + * \brief Retrieves the ca_client_context for first matching of handle + * \param handle input: handle + * \return ccc output: ca_client_context + */ +ca_client_context * HandleHelper::getContextFromHandle(unsigned int handle) { +#define __METHOD__ "HandleHelper::getContextFromHandle(unsigned int handle)" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + if (it_handle != handle_index.end()) { + return (*it_handle).getClientContext(); + } else { + // Loop through all elements and search for handle/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + // if((*itcs).getGroupHandle()>0) {continue;} // Channels within a group don't count! + + if ( (*itcs).getHandle()==handle) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //cout << " INFORMATION to author: MATCHed Handle= " << handle << " to PV= " << (*itcs).getPV() << endl; + //cout << " by looping through tcs::iterator, while the by_handle::iterator was NOT found! " << endl; + return (*itcs).getClientContext(); + } + } + } + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "PV for Handle=" << handle << " not found " << endl; + + return NULL; +#undef __METHOD__ +} + + + + +/** + * \brief Retrieves handle for a given process variable + * \param _pv input: process variable + * \return handle else 0 if no handle exists + */ +unsigned int HandleHelper::getHandleFromPV(const char * _pv) { +#define __METHOD__ "HandleHelper::getHandleFromPV(const char * _pv)" + + ca_client_context * ccc = ca_current_context(); + + return getHandleFromPV(_pv,ccc); + +#undef __METHOD__ +} + + +/** + * \brief Retrieves handle for a given process variable + * \param _pv input: process variable + * \return handle else 0 if no handle exists + */ +unsigned int HandleHelper::getHandleFromPVAlias(const char * _pv) { +#define __METHOD__ "HandleHelper::getHandleFromPVAlias(const char * _pv)" + + ca_client_context * ccc = ca_current_context(); + + return getHandleFromPVAlias(_pv,ccc); + +#undef __METHOD__ +} + + + +/** + * \brief Retrieves handle for a given process variable + * \param _pv input: process variable + * \param ccc input: ca_client_context + * \return handle else 0 if no handle exists + */ +unsigned int HandleHelper::getHandleFromPV(const char * _pv, ca_client_context * ccc) { +#define __METHOD__ "HandleHelper::getHandleFromPV(const char * _pv, ca_client_context * ccc)" + + cafeConduit_set_by_pv & pv_index = cs.get (); + cafeConduit_set_by_pv::iterator it_pv; + + char pv[PVNAME_SIZE]; + removeLeadingAndTrailingSpaces(_pv, pv); + + it_pv = pv_index.find(pv); + + // Three possibilities of getting a match! + if (it_pv != pv_index.end()) { + + // Examine ca_client_context noting that channels within a group don't count! + if (ccc == (*it_pv).getClientContext() && (*it_pv).getGroupHandle()==0 ) { + + return (*it_pv).handle; + } + else { + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if((*itcs).getGroupHandle()>0) {continue;} // Channels within a group don't count! + + if (!strcmp((*itcs).getPV(), _pv) && (*itcs).getClientContext()== ccc) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //cout << " INFORMATION to author: MATCHed Handle= " << (*itcs).handle << " to PV= " << _pv << endl; + //cout << " by looping through tcs::iterator, even though pv::iterator was found! " << endl; + return (*itcs).handle; + } + } + } + } else { + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if((*itcs).getGroupHandle()>0) {continue;} // Channels within a group don't count! + + if (!strcmp((*itcs).getPV(), _pv) && (*itcs).getClientContext() == ccc) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //out << " INFORMATION to author: MATCHed Handle= " << (*itcs).handle << " to PV= " << _pv << endl; + //cout << " by looping through tcs::iterator, while the pv::iterator was NOT found! " << endl; + return (*itcs).handle; + } + } + } + + return getHandleFromPVAlias(_pv, ccc); +#undef __METHOD__ +} + + +/** + * \brief Retrieves handle for a given process variable alias + * \param _pv input: process variable alias + * \param ccc input: ca_client_context + * \return handle else 0 if no handle exists + */ +unsigned int HandleHelper::getHandleFromPVAlias(const char * _pv, ca_client_context * ccc) { +#define __METHOD__ "HandleHelper::getHandleFromPVAlias(const char * _pv, ca_client_context * ccc)" + + cafeConduit_set_by_pvAlias & pv_index = cs.get (); + cafeConduit_set_by_pvAlias::iterator it_pv; + + + char pv[PVNAME_SIZE]; + removeLeadingAndTrailingSpaces(_pv, pv); + + it_pv = pv_index.find(pv); + + // Three possibilities of getting a match! + if (it_pv != pv_index.end()) { + + // Examine ca_client_context noting that channels within a group don't count! + if (ccc == (*it_pv).getClientContext() && (*it_pv).getGroupHandle()==0 ) { + + return (*it_pv).handle; + } + else { + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if((*itcs).getGroupHandle()>0) {continue;} // Channels within a group don't count! + + if (!strcmp((*itcs).getPVAlias(), _pv) && (*itcs).getClientContext()== ccc) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //cout << " INFORMATION to author: MATCHed Handle= " << (*itcs).handle << " to PVAlias= " << _pv << endl; + //cout << " by looping through tcs::iterator, even though pvAlias::iterator was found! " << endl; + return (*itcs).handle; + } + } + } + } else { + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if((*itcs).getGroupHandle()>0) {continue;} // Channels within a group don't count! + + if (!strcmp((*itcs).getPVAlias(), _pv) && (*itcs).getClientContext() == ccc) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //cout << " INFORMATION to author: MATCHed Handle= " << (*itcs).handle << " to PVAlias= " << _pv << endl; + //cout << " by looping through itcs::iterator, while the pvAlias::iterator was NOT found! " << endl; + return (*itcs).handle; + } + } + } + + return 0; + +#undef __METHOD__ +} + + + + +/** + * \brief Retrieves the process variable from a given handle + * \param handle input: handle + * \return pv else NULL if no handle exists + */ +const char * HandleHelper::getPVFromHandle(unsigned int handle) { +#define __METHOD__ "HandleHelper::getPVFromHandle(unsigned int handle)" + + ca_client_context * ccc = ca_current_context(); + + return getPVFromHandle(handle,ccc); + +#undef __METHOD__ +} + + +/** + * \brief Retrieves the process variable from a given handle + * \param handle input: handle + * \param ccc input: ca_client_context + * \return pv else NULL if no handle exists + */ +const char * HandleHelper::getPVFromHandle(unsigned int handle, ca_client_context * ccc) { +#define __METHOD__ "HandleHelper::getPVFromHandle(unsigned int handle, ca_client_context * ccc)" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(handle); + + + if (it_handle != handle_index.end()) { + return (*it_handle).getPV(); + } else { + // Loop through all elements and search for handle/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if((*itcs).getGroupHandle()>0) {continue;} // Channels within a group don't count! + + if ( (*itcs).getHandle()==handle && (*itcs).getClientContext() == ccc) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //cout << " INFORMATION to author: MATCHed Handle= " << handle << " to PV= " << (*itcs).getPV() << endl; + //cout << " by looping through tcs::iterator, while the by_handle::iterator was NOT found! " << endl; + return (*itcs).getPV(); + } + } + } + + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "PV for Handle=" << handle << " not found " << endl; + } + + return ""; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves handle for a given process variable with a CAFE group + * \param _pv input: process variable + * \param gh input: groupHandle + * \return handle else 0 if no handle exists + */ +unsigned int HandleHelper::getHandleFromPVWithinGroup(const char * _pv, unsigned int gh) { +#define __METHOD__ "HandleHelper::getHandleFromPVWithinGroup(const char * _pv, unsigned int gh)" + + ca_client_context * ccc = ca_current_context(); + + return getHandleFromPVWithinGroup(_pv,ccc, gh); + +#undef __METHOD__ +} + + + + +/** + * \brief Retrieves handle for a given process variable with a CAFE group within a give ca context + * \param _pv input: process variable + * \param ccc input: ca_client_context + * \param gh input: groupHandle + * \return handle else 0 if no handle exists + */ +unsigned int HandleHelper::getHandleFromPVWithinGroup(const char * _pv, + ca_client_context * ccc, unsigned int gh) { +#define __METHOD__ \ + "HandleHelper::getHandleFromPVWithinGroup(const char * _pv, ca_client_context * ccc, unsigned int gh)" + + cafeConduit_set_by_pv & pv_index = cs.get (); + cafeConduit_set_by_pv::iterator it_pv; + + char pv[PVNAME_SIZE]; + removeLeadingAndTrailingSpaces(_pv, pv); + + it_pv = pv_index.find(pv); + + // Three possibilities of getting a match! + if (it_pv != pv_index.end()) { + + // Examine ca_client_context noting that channels within a group don't count! + if (ccc == (*it_pv).getClientContext() && (*it_pv).getGroupHandle()==gh ) { + + return (*it_pv).handle; + } + else { + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if((*itcs).getGroupHandle()!=gh) {continue;} // Channels within a group don't count! + + if (!strcmp((*itcs).getPV(), _pv) && (*itcs).getClientContext()== ccc) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //cout << " INFORMATION to author: MATCHed Handle= " << (*itcs).handle << " to PV= " << _pv << endl; + //cout << " by looping through tcs::iterator, even though pv::iterator was found! " << endl; + return (*itcs).handle; + } + } + } + } else { + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if((*itcs).getGroupHandle()!=gh) {continue;} // Channels within a group don't count! + + if (!strcmp((*itcs).getPV(), _pv) && (*itcs).getClientContext() == ccc) { + //cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + //cout << " INFORMATION to author: MATCHed Handle= " << (*itcs).handle << " to PV= " << _pv << endl; + //cout << " by looping through tcs::iterator, while the pv::iterator was NOT found! " << endl; + return (*itcs).handle; + } + } + } + + return 0; //getHandleFromPVAliasWithinGroup(_pv, ccc); +#undef __METHOD__ +} + + + +/** + * \brief Retrieves all handles belonging to a group referenced by its groupHandle + * \param _groupHandle input: groupHandle + * \return vector of handles within Group + */ +vector HandleHelper::getHandlesFromWithinGroupV(unsigned int _groupHandle) { +#define __METHOD__ "HandleHelper::getGroupHandlesFromWithinGroup" + + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + + it_groupHandle = groupHandle_index.find(_groupHandle); + + vector vhg; + + if (it_groupHandle != groupHandle_index.end()) { + vhg.reserve( (*it_groupHandle).getNMember()); + for (unsigned int i=0; i <(*it_groupHandle).getNMember(); ++i ) { + vhg.push_back((*it_groupHandle).mHandle[i]); + } + return vhg; + } else { + // Loop through all elements and search for grouphandle match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + + if ((*itgs).getGroupHandle() == _groupHandle ) { + vhg.reserve( (*itgs).getNMember()); + for (unsigned int i=0; i <(*itgs).getNMember(); ++i ) { + vhg.push_back((*itgs).mHandle[i]); + } + return vhg; + } + } + } + + cafeStatus.report(ECAFE_UNKNOWN_GROUP); + + return vhg; +#undef __METHOD__ +} + + +/** + * \brief Retrieves all handles belonging to a group referenced by its groupHandle + * \param _groupHandle input: groupHandle + * \return array of handles within Group + */ +unsigned int * HandleHelper::getHandlesFromWithinGroup(unsigned int _groupHandle) { +#define __METHOD__ "HandleHelper::getGroupHandlesFromWithinGroup" + + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + + it_groupHandle = groupHandle_index.find(_groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + return (*it_groupHandle).mHandle; + } else { + // Loop through all elements and search for grouphandle match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + //ConduitGroup cg = *itgs; + + if ((*itgs).getGroupHandle() == _groupHandle ) { + return (*itgs).mHandle; + // cout << " MATCH FOUND Handle Number is= " << (cg).groupHandle << endl; + } + } + } + + cafeStatus.report(ECAFE_UNKNOWN_GROUP); + + // Find number of members + // Declare vector + // Loop round all members + // Find pv + // find handle + // add to vector + return (unsigned int *) NULL; +#undef __METHOD__ +} + +/** + * \brief Method returns true if channel is connected, else false + * \param handle input: handle + * \return bool + */ +bool HandleHelper::isChannelConnected(unsigned int handle){ + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; it_handle = handle_index.find(handle); + if (it_handle != handle_index.end()) {return (*it_handle).isConnected();} + else { + //if (printErrorPolicy.getInvalidHandle()) { + std::cout<< "Input handle " << handle << " does not exist! " << std::endl; + //} + return false;} +} + + + +/** + * \brief Retrieves last cached status information for given handle + * \param _handle input: handle + * \return status + */ +int HandleHelper::getStatus(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getStatus(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + return (*it_handle).getStatus(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } +#undef __METHOD__ +} + + +/** + * \brief Retrieves last cached timestamp information for given handle + * \param _handle input: handle + * \param ts output: epicsTimeStamp + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int HandleHelper::getTimeStamp(unsigned int _handle, epicsTimeStamp &ts) { +#define __METHOD__ "HandleHelper::getTimeStamp(unsigned int _handle, epicsTimeStamp &ts)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + ts.secPastEpoch=0; + ts.nsec=0; + if (it_handle != handle_index.end()) { + ts= (*it_handle).getTimeStamp(); + return ICAFE_NORMAL; + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } +#undef __METHOD__ +} + + +/** + * \brief Retrieves last cached status information for given handle + * \param _handle input: handle + * \param as output: alarmStatus [0] and alarmSeverity [1] in array of dbr_short_t[2] + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int HandleHelper::getAlarmStatusSeverity(unsigned int _handle, dbr_short_t as[2]) { +#define __METHOD__ "HandleHelper::getAlarmStatusSeverity(unsigned int _handle, short & *as)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + as[0]= (*it_handle).getAlarmStatus(); + as[1]= (*it_handle).getAlarmSeverity(); + return ICAFE_NORMAL; + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } +#undef __METHOD__ +} + + +/** + * \brief Retrieves last cached status information for given handle + * \param _handle input: handle + * \param asas output: alarmStatus [0] and alarmSeverity [1] in array of dbr_short_t[2] + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int HandleHelper::getAlarmStatusSeverityAsString(unsigned int _handle, string asas[2]) { +#define __METHOD__ "HandleHelper::getAlarmStatusSeverityAsString(unsigned int _handle, string & *asas)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + asas[0]= (*it_handle).getAlarmStatusAsString(); + asas[1]= (*it_handle).getAlarmSeverityAsString(); + return ICAFE_NORMAL; + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return ECAFE_INVALID_HANDLE; + } +#undef __METHOD__ +} + +/** + * \brief Prints Conduit member values for all given handles + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::printHandlesV(vector handleV) { +#define __METHOD__ "HandleHelper::printHandle(unsigned int)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + + long lStatus=ICAFE_NORMAL; + + for (unsigned int i=0; i0) { + cout << "groupHandle= " << (*it_handle).getGroupHandle() << endl; + } + else { + cout << endl; + } + + cout << "PV Name: " << (*it_handle).getPV() << endl; + if ( strcmp((*it_handle).getPV(),(*it_handle).getPVAlias()) ) { + cout << "PV Alias= " << (*it_handle).getPVAlias() << endl; + } + cout << "Data Type: " + << cafeDataTypeCode.message((*it_handle).getChannelRegalia().dataType).c_str() << endl; + + + cout << "Class Name: " << (*it_handle).getChannelRegalia().className << endl; + cout << "cxt/chid: " << (*it_handle).getClientContext() + <<"/"<<(*it_handle).getChannelID()<< endl; + // "/"<< (*it_handle).uniqueID << endl; + // Returns normal completion + // cout << "status= " << cafeStatus.csi.message(cc.getStatus()) << endl; + + double p,g; PolicyHelper ph; + ph.getTimeout((*it_handle).getHandle(),p,g); + + cout << "Timeouts put/get: " << p << "/" << g << " sec. " << endl; + + + if ((*it_handle).getGroupHandle()>0) { + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find((*it_handle).getGroupHandle()); + + + if (it_groupHandle != groupHandle_index.end()) { + ph.getSGTimeout((*it_groupHandle).getGroupHandle(),p,g); + cout << "Syn. Grp put/get: " << p << "/" << g << " sec. " << endl; + } + + } + + + cout << "isConnected?: " ; + if ((*it_handle).isConnected()) { cout << "Yes" << endl; } + else { cout << "No" << endl; } + cout << "--------------------------------------------------" << endl; + + vector mids=getMonitorIDs((*it_handle).getHandle()); + if (mids.size()>0) { + cout << "Monitor ID: " ; + for (int i=0; i< mids.size(); ++i) { cout << mids[i] << " " ;} cout << endl; + } + vector midsiw=getMonitorIDsInWaiting((*it_handle).getHandle()); + if (midsiw.size()>0) { + cout << "Monitors to start: " << midsiw.size() << endl; + } + + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << handleV[i] << " either never existed or no longer exists " << endl; + lStatus=ECAFE_INVALID_HANDLE; + } + }//for + return lStatus; +#undef __METHOD__ +} + + +/** + * \brief Prints Conduit member values for all given handles + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::printHandles(unsigned int * handleArray, unsigned int nHandles) { +#define __METHOD__ "HandleHelper::printHandle(unsigned int)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + + long lStatus=ICAFE_NORMAL; + + for (unsigned int i=0; i0) { + cout << "groupHandle= " << (*it_handle).getGroupHandle() << endl; + } + else { + cout << endl; + } + + cout << "PV Name: " << (*it_handle).getPV() << endl; + if ( strcmp((*it_handle).getPV(),(*it_handle).getPVAlias()) ) { + cout << "PV Alias= " << (*it_handle).getPVAlias() << endl; + } + cout << "Data Type: " + << cafeDataTypeCode.message((*it_handle).getChannelRegalia().dataType).c_str() << endl; + + + cout << "Class Name: " << (*it_handle).getChannelRegalia().className << endl; + cout << "cxt/chid: " << (*it_handle).getClientContext() + <<"/"<<(*it_handle).getChannelID()<< endl; + // "/"<< (*it_handle).uniqueID << endl; + // Returns normal completion + // cout << "status= " << cafeStatus.csi.message(cc.getStatus()) << endl; + + double p,g; PolicyHelper ph; + ph.getTimeout((*it_handle).getHandle(),p,g); + + cout << "Timeouts put/get: " << p << "/" << g << " sec. " << endl; + + + + if ((*it_handle).getGroupHandle()>0) { + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find((*it_handle).getGroupHandle()); + + + if (it_groupHandle != groupHandle_index.end()) { + ph.getSGTimeout((*it_groupHandle).getGroupHandle(),p,g); + cout << "Syn. Grp put/get: " << p << "/" << g << " sec. " << endl; + } + + } + + + + + //Find Group + cout << "isConnected?: " ; + if ((*it_handle).isConnected()) { cout << "Yes" << endl; } + else { cout << "No" << endl; } + + vector mids=getMonitorIDs((*it_handle).getHandle()); + if (mids.size()>0) { + cout << "Monitor ID: " ; + for (int i=0; i< mids.size(); ++i) { cout << mids[i] << " " ;} cout << endl; + } + vector midsiw=getMonitorIDsInWaiting((*it_handle).getHandle()); + if (midsiw.size()>0) { + cout << "Monitors to start: " << midsiw.size() << endl; + } + + cout << "--------------------------------------------------" << endl; + + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << handleArray[i] << " either never existed or no longer exists " << endl; + lStatus=ECAFE_INVALID_HANDLE; + } + }//for + return lStatus; +#undef __METHOD__ +} + + +/** + * \brief Prints Conduit member values for all given handle + * \return ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::printHandle(unsigned int _handle) { +#define __METHOD__ "HandleHelper::printHandle(unsigned int)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + cout << "--------------------------------------------------" << endl; + cout << "HANDLE= " << (*it_handle).handle << " " ; + if ((*it_handle).getGroupHandle()>0) { + cout << "groupHandle= " << (*it_handle).getGroupHandle() << endl; + } + else { + cout << endl; + } + + cout << "PV Name: " << (*it_handle).getPV() << endl; + if ( strcmp((*it_handle).getPV(),(*it_handle).getPVAlias()) ) { + cout << "PV Alias= " << (*it_handle).getPVAlias() << endl; + } + cout << "Data Type: " + << cafeDataTypeCode.message((*it_handle).getChannelRegalia().dataType).c_str() << endl; + + + cout << "Class Name: " << (*it_handle).getChannelRegalia().className << endl; + cout << "cxt/chid: " << (*it_handle).getClientContext() + <<"/"<<(*it_handle).getChannelID()<< endl; + // "/"<< (*it_handle).uniqueID << endl; + // Returns normal completion + // cout << "status= " << cafeStatus.csi.message(cc.getStatus()) << endl; + + double p,g; PolicyHelper ph; + ph.getTimeout((*it_handle).getHandle(),p,g); + + cout << "Timeouts put/get: " << p << "/" << g << " sec. " << endl; + + if ((*it_handle).getGroupHandle()>0) { + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find((*it_handle).getGroupHandle()); + + + if (it_groupHandle != groupHandle_index.end()) { + ph.getSGTimeout((*it_groupHandle).getGroupHandle(),p,g); + cout << "Syn. Grp put/get: " << p << "/" << g << " sec. " << endl; + } + + } + + + cout << "isConnected?: " ; + if ((*it_handle).isConnected()) { cout << "Yes" << endl; } + else { cout << "No" << endl; } + + vector mids=getMonitorIDs((*it_handle).getHandle()); + if (mids.size()>0) { + cout << "Monitor ID: " ; + for (int i=0; i< mids.size(); ++i) { cout << mids[i] << " " ;} cout << endl; + } + vector midsiw=getMonitorIDsInWaiting((*it_handle).getHandle()); + if (midsiw.size()>0) { + cout << "Monitors to start: " << midsiw.size() << endl; + } + + cout << "--------------------------------------------------" << endl; + return ICAFE_NORMAL; + } + else { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + return ECAFE_INVALID_HANDLE; + } + +#undef __METHOD__ +} + + + +/** + * \brief Prints Conduit member values for all Conduit objects (handles) + * \return Total number of handles; + */ +unsigned int HandleHelper::printHandles() { +#define __METHOD__ "HandleHelper::printHandles" + + unsigned int noHandles = 0; + + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if (noHandles==0) { + cout << endl << "--------------------------------------------------" << endl; + cout << " PRINTING ALL HANDLES " << endl; + cout << "--------------------------------------------------" << endl; + } + cout << "--------------------------------------------------" << endl; + cout << "HANDLE= " << (*itcs).handle << " " ; + + if ((*itcs).getGroupHandle()>0) { + cout << "groupHandle= " << (*itcs).getGroupHandle() << endl; + } + else { + cout << endl; + } + + cout << "PV Name= " << (*itcs).getPV() << endl; + if ( strcmp((*itcs).getPV(),(*itcs).getPVAlias()) ) { + cout << "PV Alias= " << (*itcs).getPVAlias() << endl; + } + cout << "Data Type = " + << cafeDataTypeCode.message((*itcs).getChannelRegalia().dataType).c_str() << endl; + + cout << "Class Name= " << (*itcs).getChannelRegalia().className << endl; + cout << "cxt/chid: " << (*itcs).getClientContext() + <<"/"<<(*itcs).getChannelID()<< endl; + //"/"<< (*itcs).uniqueID << endl; + // Returns normal completion + // cout << "status= " << cafeStatus.csi.message(cc.getStatus()) << endl; + + double p,g; PolicyHelper ph; + ph.getTimeout((*itcs).getHandle(),p,g); + + cout << "Timeouts put/get= " << p << "/" << g << " sec. " << endl; + + + if ((*itcs).getGroupHandle()>0) { + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find((*itcs).getGroupHandle()); + + + if (it_groupHandle != groupHandle_index.end()) { + ph.getSGTimeout((*it_groupHandle).getGroupHandle(),p,g); + cout << "Syc. Grp timeouts put/get: " << p << "/" << g << " sec. " << endl; + } + + } + + + + cout << "isConnected?: " ; + if ((*itcs).isConnected()) { cout << "Yes" << endl; } + else { cout << "No" << endl; } + + vector mids=getMonitorIDs((*itcs).getHandle()); + if (mids.size()>0) { + cout << "Monitor ID: " ; + for (int i=0; i< mids.size(); ++i) { cout << mids[i] << " ";} cout << endl; + } + vector midsiw=getMonitorIDsInWaiting((*itcs).getHandle()); + if (midsiw.size()>0) { + cout << "Monitors to start: " << midsiw.size() << endl; + } + + cout << "--------------------------------------------------" << endl; + ++noHandles; + } + + if (noHandles==0) { + cout << "--------------------------------------------------" << endl; + cout << " THERE ARE NO HANDLES TO PRINT " << endl; + cout << "--------------------------------------------------" << endl; + } + else { + cout << "--------------------------------------------------" << endl; + cout << " END PRINTING ALL HANDLES " << endl; + cout << "--------------------------------------------------" << endl << endl; + + } + return noHandles; +#undef __METHOD__ +} + + + +/** + * \brief Return a vector of handles that have monitors + * If a handle has n monitors it appears n time in the return vector. + * Monitors in waiting are als included in the count. + * \return Total number of handles with monitors (whether started or in waiting); + */ +vector HandleHelper::getHandlesWithMonitors() { +#define __METHOD__ "HandleHelper::getHandlesWithMonitors" + + + vector handleV; + handleV.clear(); + handleV.reserve(cs.size()); + + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + vector mids=getMonitorIDs((*itcs).getHandle()); + vector midsiw=getMonitorIDsInWaiting((*itcs).getHandle()); + if (mids.size()==0 && midsiw.size()==0) {continue;} + + for (int i=0; i mids=getMonitorIDs((*itcs).getHandle()); + vector midsiw=getMonitorIDsInWaiting((*itcs).getHandle()); + if (mids.size()==0 && midsiw.size()==0) {continue;} + + if (noHandles==0) { + cout << endl << "--------------------------------------------------" << endl; + cout << " PRINTING ALL HANDLES WITH MONITORS " << endl; + cout << "--------------------------------------------------" << endl; + } + cout << "--------------------------------------------------" << endl; + cout << "HANDLE= " << (*itcs).handle << " " ; + + if ((*itcs).getGroupHandle()>0) { + cout << "groupHandle= " << (*itcs).getGroupHandle() << endl; + } + else { + cout << endl; + } + + cout << "PV Name= " << (*itcs).getPV() << endl; + if ( strcmp((*itcs).getPV(),(*itcs).getPVAlias()) ) { + cout << "PV Alias= " << (*itcs).getPVAlias() << endl; + } + cout << "Data Type = " + << cafeDataTypeCode.message((*itcs).getChannelRegalia().dataType).c_str() << endl; + + cout << "Class Name= " << (*itcs).getChannelRegalia().className << endl; + cout << "cxt/chid: " << (*itcs).getClientContext() + <<"/"<<(*itcs).getChannelID()<< endl; + //"/"<< (*itcs).uniqueID << endl; + // Returns normal completion + // cout << "status= " << cafeStatus.csi.message(cc.getStatus()) << endl; + + double p,g; PolicyHelper ph; + ph.getTimeout((*itcs).getHandle(),p,g); + + cout << "Timeouts put/get= " << p << "/" << g << " sec. " << endl; + + + cout << "isConnected?: " ; + if ((*itcs).isConnected()) { cout << "Yes" << endl; } + else { cout << "No" << endl; } + + + + cout << "Monitor ID: " ; + for (int i=0; i< mids.size(); ++i) { cout << mids[i] << " ";} cout << endl; + if (midsiw.size()>0) { + cout << "Monitors to start: " << midsiw.size() << endl; + } + + cout << "--------------------------------------------------" << endl; + ++noHandles; + } + + if (noHandles==0) { + cout << "--------------------------------------------------" << endl; + cout << " THERE ARE NO HANDLES TO PRINT " << endl; + cout << "--------------------------------------------------" << endl; + } + else { + cout << "--------------------------------------------------" << endl; + cout << " END PRINTING ALL HANDLES " << endl; + cout << "--------------------------------------------------" << endl << endl; + + } + return noHandles; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves a list of handles and PVs, whether connected or disconnected + * \param dhV output: Vector of all handles + * \param pvV output: Vector of corresponding PVs + * \return No of disconnected handles + */ +unsigned int HandleHelper::getHandles(vector &dhV, vector &pvV) { +#define __METHOD__ "HandleHelper::getHandles(vector &dhV, vector &pvV)" + + dhV.clear(); + pvV.clear(); + dhV.reserve(cs.size()); + pvV.reserve(cs.size()); + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + dhV.push_back((*itcs).handle); + pvV.push_back((*itcs).getPV()); + } + return dhV.size(); +#undef __METHOD__ +} + + +/** + * \brief Retrieves a list of handles and PVs, whether connected or disconnected + * \param dhV output: Vector of all handles + * \param pvV output: Vector of corresponding PVs + * \param connV output: Vector of connection states + * \return No of disconnected handles + */ +unsigned int HandleHelper::getHandleStates(vector &dhV, vector &pvV, + vector &connV) { +#define __METHOD__ "HandleHelper::getHandleStates(vector &dhV, vector &pvV, vector &connV)" + + dhV.clear(); + pvV.clear(); + connV.clear(); + dhV.reserve(cs.size()); + pvV.reserve(cs.size()); + connV.reserve(cs.size()); + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + dhV.push_back((*itcs).handle); + pvV.push_back((*itcs).getPV()); + connV.push_back( (unsigned short) (*itcs).isConnected()); + } + return dhV.size(); +#undef __METHOD__ +} + + +/** + * \brief Retrieves a list of connected PVs and their handles + * \param dhV output: Vector of disconnected handles + * \param pvV output: Vector of corresponding disconnected PVs + * \return No of disconnected handles + */ +unsigned int HandleHelper::getConnectedHandles(vector &dhV, vector &pvV) { +#define __METHOD__ "HandleHelper::getConnectedHandles()" + + dhV.clear(); + pvV.clear(); + dhV.reserve(cs.size()); + pvV.reserve(cs.size()); + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if (!(*itcs).isConnected()) {continue;}; + dhV.push_back((*itcs).handle); + pvV.push_back((*itcs).getPV()); + } + return dhV.size(); +#undef __METHOD__ +} + + +/** + * \brief Retrieves a list of disconnected PVs and their handles + * \param dhV output: Vector of disconnected handles + * \param pvV output: Vector of corresponding disconnected PVs + * \return No of disconnected handles + */ +unsigned int HandleHelper::getDisconnectedHandles(vector &dhV, vector &pvV) { +#define __METHOD__ "HandleHelper::getDisconnectedHandles()" + + dhV.clear(); + pvV.clear(); + dhV.reserve(cs.size()); + pvV.reserve(cs.size()); + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if ((*itcs).isConnected()) {continue;}; + dhV.push_back((*itcs).handle); + pvV.push_back((*itcs).getPV()); + } + return dhV.size(); +#undef __METHOD__ +} + + +/** + * \brief Prints Conduit member values for all disconnected CAFEConduit objects (handles) + * \return Total number of disconnected handles; + */ +unsigned int HandleHelper::printDisconnectedHandles() { +#define __METHOD__ "HandleHelper::printDisconnectedHandles" + + unsigned int noDisconnectedHandles = 0; + + // Loop through all elements and search for pv/ca_client_context match + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ((*itcs).isConnected()) {continue;}; + + if (noDisconnectedHandles==0) { + cout << endl << "--------------------------------------------------" << endl; + cout << " DISCONNECTED HANDLES " << endl; + cout << "--------------------------------------------------" << endl; + } + cout << "--------------------------------------------------" << endl; + cout << "HANDLE= " << (*itcs).handle << " "; + if ((*itcs).getGroupHandle()>0) { + cout << "groupHandle= " << (*itcs).getGroupHandle() << endl; + } + else { + cout << endl; + } + cout << "PV Name= " << (*itcs).getPV() << endl; + if ( strcmp((*itcs).getPV(),(*itcs).getPVAlias()) ) { + cout << "PV Alias= " << (*itcs).getPVAlias() << endl; + } + cout << "cxt/chid: " << (*itcs).getClientContext() + <<"/"<<(*itcs).getChannelID()<< endl; + //"/"<< (*itcs).uniqueID<< endl; + // Returns normal completion + // cout << "status= " << cafeStatus.csi.message((*itcs).getStatus()) << endl; + cout << "isConnected?: " ; + if ((*itcs).isConnected()) { cout << "Yes" << endl; } + else { cout << "No" << endl; } + + vector mids=getMonitorIDs((*itcs).getHandle()); + if (mids.size()>0) { + cout << "Monitor ID: " ; + for (int i=0; i< mids.size(); ++i) { cout << mids[i] << " " << endl; } + } + + + cout << "--------------------------------------------------" << endl; + + ++noDisconnectedHandles; + + } + + if (noDisconnectedHandles==0) { + cout << "--------------------------------------------------" << endl; + cout << " GOOD NEWS: THERE ARE NO DISCONNECTED HANDLES " << endl; + cout << "--------------------------------------------------" << endl; + } + else { + cout << "--------------------------------------------------" << endl; + cout << " END DISCONNECTED HANDLES " << endl; + cout << "--------------------------------------------------" << endl << endl; + + } + return noDisconnectedHandles; +#undef __METHOD__ +} + +////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * \brief Sets the alarm, severity ts in conduit (used by get method WITH_CALLBACK) + * \param _handle input: Conduit object reference + * \param a input: alarm + * \param s input: severity + * \param ets input: epicsTimeStamp + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::setSTS(unsigned int _handle, dbr_short_t a, dbr_short_t s, epicsTimeStamp ets) { +#define __METHOD__ "HandleHelper::setTS(unsigned int _handle, dbr_short_t a, dbr_short_t s, epicsTimeStamp ets)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + int status=ICAFE_NORMAL; + + if (it_handle != handle_index.end()) { + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_alarmStatus(a)); + handle_index.modify(it_handle, change_alarmSeverity(s)); + handle_index.modify(it_handle, change_epicsTimeStamp(ets)); + if(MUTEX){cafeMutex.unlock();} + } + else { + + status=ECAFE_INVALID_HANDLE; + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return status; +#undef __METHOD__ +} + + + +/** + * \brief Sets the cafeDbrType (e.g. DBR_TIME) and associated dbrDataTpe (e.g. DBR_TIME_zzz) + * \param _handleV input: vector Conduit object references + * \param cdt input: CAFENUM::DBR_TYPE + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::setCafeDbrTypeV(vector _handleV, CAFENUM::DBR_TYPE cdt ) { +#define __METHOD__ "HandleHelper::setCafeDbrType(vector _handle, CAFENUM::DBR_TYPE cdt)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + + + int status=ICAFE_NORMAL; + + for (unsigned int i=0; i<_handleV.size(); ++i ) { + + it_handle = handle_index.find(_handleV[i]); + + if (it_handle != handle_index.end()) { + + channelRequestMetaDataClient=(*it_handle).getChannelRequestMetaDataClient(); + channelRequestMetaDataClient.setDbrTypesFromCafeDbrType(cdt); + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + channelRequestMetaData.setDbrTypesFromCafeDbrType(cdt); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaDataClient( + channelRequestMetaDataClient)); + handle_index.modify(it_handle, change_channelRequestMetaData( + channelRequestMetaData)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + status=ECAFE_INVALID_HANDLE; + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + cout << "Handle=" << _handleV[i] << " either never existed or no longer exists " << endl; + } + } + + } + return status; +#undef __METHOD__ +} + + + + +/** + * \brief Sets the cafeDbrType (e.g. DBR_TIME) and associated dbrDataTpe (e.g. DBR_TIME_zzz) + * \param _handle input: Conduit object reference + * \param cdt input: CAFENUM::DBR_TYPE + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::setCafeDbrType(unsigned int _handle, CAFENUM::DBR_TYPE cdt ) { +#define __METHOD__ "HandleHelper::setCafeDbrType(unsigned int _handle, CAFENUM::DBR_TYPE cdt)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + int status=ICAFE_NORMAL; + + if (it_handle != handle_index.end()) { + + channelRequestMetaDataClient=(*it_handle).getChannelRequestMetaDataClient(); + channelRequestMetaDataClient.setDbrTypesFromCafeDbrType(cdt); + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + channelRequestMetaData.setDbrTypesFromCafeDbrType(cdt); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaDataClient( + channelRequestMetaDataClient)); + handle_index.modify(it_handle, change_channelRequestMetaData( + channelRequestMetaData)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + status=ECAFE_INVALID_HANDLE; + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return status; +#undef __METHOD__ +} + + + + + + +/** + * \brief Gets the cafeDbrType (e.g. DBR_TIME) + * \param _handle input: Conduit object reference + * \param cdt output: CAFENUM::DBR_TYPE + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getCafeDbrType(unsigned int _handle, CAFENUM::DBR_TYPE &cdt ) { +#define __METHOD__ "HandleHelper::getCafeDbrType(unsigned int _handle, CAFENUM::DBR_TYPE &cdt)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + int status=ICAFE_NORMAL; + + if (it_handle != handle_index.end()) { + + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + cdt=channelRequestMetaData.getCafeDbrType(); + } + else { + status=ECAFE_INVALID_HANDLE; + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + return status; +#undef __METHOD__ +} + + + +/** + * \brief Gets the dataType requested (e.g. DBR_STRING etc.) + * \param _handle input: Conduit object reference + * \param rdt output: DBR_XXX + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getDataTypeRequest(unsigned int _handle, chtype &rdt ) { +#define __METHOD__ "HandleHelper::getDataTypeRequest(unsigned int _handle, chtype &rdt)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + int status=ICAFE_NORMAL; + + if (it_handle != handle_index.end()) { + + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + rdt=channelRequestMetaData.getDataType(); + } + else { + status=ECAFE_INVALID_HANDLE; + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(status); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return status; +#undef __METHOD__ +} + + + +/** + * + * \brief HandleHelper::addMonitorAction \n + * + * \param _handle input: handle identifying Conduit object + * \param monitorAction input: string giviing the monitor action + * \return ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::addMonitorAction(unsigned int _handle, string monitorAction) { +#define __METHOD__ "HandleHelper::addMonitorAction(unsigned int _handle, string monitorAction" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + handle_index.modify(it_handle, change_monitorAction(monitorAction)); + } else { + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + +/** + * + * \brief HandleHelper::clearMonitorAction for all handles \n + * + * \return ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::clearMonitorAction() { +#define __METHOD__ "HandleHelper::clearMonitorAction()" + + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + localStatus=clearMonitorAction( (*itcs).getHandle()); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + return gStatus; + +#undef __METHOD__ +} + + +/** + * + * \brief HandleHelper::clearMonitorAction \n + * + * \param _handle input: handle identifying Conduit object + * \return ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::clearMonitorAction(unsigned int _handle) { +#define __METHOD__ "HandleHelper::clearMonitorAction(unsigned int _handle)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + handle_index.modify(it_handle, change_monitorActionClear()); + } else { + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + +/** + * + * \brief HandleHelper::eraseMonitorAction \n + * + * \param _handle input: handle identifying Conduit object + * \return ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::eraseMonitorAction(unsigned int _handle) { +#define __METHOD__ "HandleHelper::eraseMonitorAction(unsigned int _handle)" + vector msV; + msV.clear(); msV.reserve(2); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + msV=(*it_handle).getMonitorAction(); + for (unsigned int i=0; i giving the monitor actions + * \return ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getMonitorAction(unsigned int _handle, vector & msV) { +#define __METHOD__ "HandleHelper::getMonitorAction(unsigned int _handle, vector msV" + + msV.clear(); msV.reserve(2); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + msV=(*it_handle).getMonitorAction(); + return ICAFE_NORMAL; + } else { + + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + return ECAFE_INVALID_HANDLE; + } + + +#undef __METHOD__ +} + + +/** + * + * \brief HandleHelper::getMonitorAction retrieves list of actions to perform on change of value \n + * If input boolean is true; then only oustantanding actions are listed + * \param onlyIfNewData input: boolean to + * \return string of actions + */ +vector HandleHelper::getMonitorAction(bool onlyIfNewData) { +#define __METHOD__ "HandleHelper::getMonitorAction()" + + vector msActionV; msActionV.clear(); + unsigned int nReserve=min( (unsigned int) cs.size(), (unsigned int) 50); + msActionV.reserve(nReserve); //conservative + std::vector::iterator pos; + vector msLocal; + // Loop through all elements and search for handles + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + if ( ((*itcs).getHasNewData() && onlyIfNewData) || !onlyIfNewData) { + msLocal.clear(); msLocal.reserve(2); + msLocal=(*itcs).getMonitorAction(); + //Add to global vector + for (size_t i=0; i< msLocal.size(); ++i) { + pos = find(msActionV.begin(), msActionV.end(), msLocal.begin()[i]); + //No duplicates! + if(pos==msActionV.end()) { + msActionV.push_back(msLocal.begin()[i]); + } + } + cafeConduit_set_by_handle & handle_index = cs.get (); + + + if(MUTEX) {cafeMutex.lock();} + handle_index.modify(itcs, change_hasNewData(false)); + if(MUTEX) {cafeMutex.unlock();} + } + } + + return msActionV; + +#undef __METHOD__ +} + + + +/** + * + * \brief HandleHelper::getMonitorHandlesAndActions retrieves list of handles and + * their actions to perform on change of value \n + * \param handleV output: Vector of handles + * \param actionV output: Vector of monitor actios + * \return ICAFE_NORMAL + */ +int HandleHelper::getMonitorHandlesAndActions(vector & handleV, vector & actionV) { +#define __METHOD__ "HandleHelper::getMonitorHandlesAndActions(&handleV, &actionV)" + + actionV.clear(); + handleV.clear(); + unsigned int nReserve=min( (unsigned int) cs.size(), (unsigned int) 50); + actionV.reserve(nReserve); //conservative + handleV.reserve(nReserve); //conservative + // Loop through all elements and search for handles + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + //if Monitor check action + + vector mids=getMonitorIDs((*itcs).getHandle()); + vector midsiw=getMonitorIDsInWaiting((*itcs).getHandle()); + if (mids.size()==0 && midsiw.size()==0) {continue;} + + vector msV; + HandleHelper::getMonitorAction((*itcs).getHandle(), msV); + + for (int i=0; imsV.size()) { + handleV.push_back((*itcs).handle); + actionV.push_back(""); + } + + + } + + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + + +/** + * \brief Gets vector of MonitorIDs in waiting (value=0), i.e., waiting for channel connection + * \param _handle input : Conduit object reference + * \return returns vector of MonitorIDsInWaiting; length 0 is none or invalid handle + */ +vector HandleHelper::getMonitorIDsInWaiting(unsigned int _handle){ + vector mpVec; + mpVec.clear(); + getMonitorPolicyInWaitingVector(_handle, mpVec); + vector monidList; + monidList.clear(); + monidList.reserve(mpVec.size()); + for (unsigned int i=0; i HandleHelper::getMonitorIDs(unsigned int _handle){ + vector mpVec; + mpVec.clear(); + getMonitorPolicyVector(_handle, mpVec); + vector monidList; + monidList.clear(); + monidList.reserve(mpVec.size()); + for (unsigned int i=0; i mpVec; + mpVec.clear(); + getMonitorPolicyVector(_handle, mpVec); + return mpVec.size(); +} + +/** + * \brief Gets Number of MonitorPolicyVectors for <= DBR_TIME type + * \param _handle input : Conduit object reference + * \return nmon output: No. of <= DBR_TIME type monitors + * \return ICAFE_NORMAL else ECAFE_INVILID_HANDLE + */ +int HandleHelper::getNmonitorData(unsigned int _handle) { + vector mpVec; + mpVec.clear(); + getMonitorPolicyVector(_handle, mpVec); + unsigned int nmonData=0; + //Loop mpVec + for (unsigned int i=0; i mpVec; + mpVec.clear(); + getMonitorPolicyVector(_handle, mpVec); + unsigned int nmonCtrl=0; + //Loop mpVec + for (unsigned int i=0; i= CAFENUM::DBR_GR && mpVec[i].getCafeDbrType()<= CAFENUM::DBR_CTRL) { + ++nmonCtrl; + } + } + return nmonCtrl; +} + +/** + * \brief Gets the MonitorPolicyVector + * \param _handle input : Conduit object reference + * \param mpV output: vector + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getMonitorPolicyVector(unsigned int _handle, vector &mpV) { +#define __METHOD__ \ + "HandleHelper::getMonitorPolicyVector(unsigned int _handle, vector &mpV" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + int status=ICAFE_NORMAL; + + if (it_handle != handle_index.end()) { + mpV=(*it_handle).getMonitorPolicyVector(); + } + else { + status=ECAFE_INVALID_HANDLE; + if (printErrorPolicy.getInvalidHandle()) { + cafeStatus.report(status); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return status; +#undef __METHOD__ +} + + +/** + * \brief Gets the MonitorPolicyVector + * \param _handle input : Conduit object reference + * \param mpV output: vector + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getMonitorPolicyInWaitingVector(unsigned int _handle, vector &mpV) { +#define __METHOD__ \ + "HandleHelper::getMonitorPolicyInWaitingVector(unsigned int _handle, vector &mpV" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + int status=ICAFE_NORMAL; + + if (it_handle != handle_index.end()) { + mpV=(*it_handle).getMonitorPolicyInWaitingVector(); + } + else { + status=ECAFE_INVALID_HANDLE; + if (printErrorPolicy.getInvalidHandle()) { + cafeStatus.report(status); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return status; +#undef __METHOD__ +} + + +/** + * \brief Sets the no of elements to read out from an array, e.g. waveform, to native value for all handles + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int HandleHelper::setNelem() { +#define __METHOD__ "HandleHelper::setNelem()" + + + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + localStatus=setNelem( (*itcs).getHandle()); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + + return gStatus; + +#undef __METHOD__ +} + + + +/** + * \brief Sets the no of elements to read out from an array, e.g. waveform, to native value + * \param _handle input: Conduit object reference + * \return no of elements else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::setNelem(unsigned int _handle) { +#define __METHOD__ "HandleHelper::setNelem(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + + nelemForDataTransfer=(*it_handle).getChannelRegalia().getNelem() ; + + nelemForDataTransfer= max(nelemForDataTransfer, (unsigned int) 1); // Should not really be needed + + channelRequestMetaDataClient=(*it_handle).getChannelRequestMetaDataClient(); + channelRequestMetaDataClient.setNelem( nelemForDataTransfer ); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaDataClient( + channelRequestMetaDataClient)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Sets the no of elements to read out from an array, e.g. waveform + * \param _handle input: Conduit object reference + * \param _nelem input: No of elements for ca data transfer + * \return no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::setNelem(unsigned int _handle, unsigned int _nelem) { +#define __METHOD__ "HandleHelper::setNelem(unsigned int _handle, unsigned int _nelem)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + + nelemForDataTransfer= min( (*it_handle).getChannelRegalia().getNelem(),_nelem); + nelemForDataTransfer= max(nelemForDataTransfer, (unsigned int) 1); + channelRequestMetaDataClient=(*it_handle).getChannelRequestMetaDataClient(); + + channelRequestMetaDataClient.setNelem( nelemForDataTransfer ); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaDataClient( + channelRequestMetaDataClient)); + if(MUTEX){cafeMutex.unlock();} + + //Check on getNelemCache in channelRequestMetaData + //Can't use this as this method is also used by set! + //A set to a WF for one element then sets nelemCache to 1! + /* + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + if (nelemForDataTransfer < channelRequestMetaData.getNelemCache() ) { + channelRequestMetaData.setNelemCache( nelemForDataTransfer ); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaData( + channelRequestMetaData)); + if(MUTEX){cafeMutex.unlock();} + } + */ + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + +/** + * \brief Sets the no of elements to read out from an cached array to native value, e.g. waveform + * \param _handle input: Conduit object reference + * \return no of elements (*it_handle).getChannelRegalia().getNelem() + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::setNelemToRetrieveFromCache (unsigned int _handle) { +#define __METHOD__ "HandleHelper::setNelemToRetrieveFromCache(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + + nelemForDataTransfer= (*it_handle).getChannelRegalia().getNelem(); + nelemForDataTransfer= max(nelemForDataTransfer, (unsigned int) 1); + + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + //lessen the number if less in buffer + nelemForDataTransfer= min(nelemForDataTransfer, channelRequestMetaData.getNelem()-channelRequestMetaData.getOffset()); + channelRequestMetaData.setNelemCache( nelemForDataTransfer ); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaData( + channelRequestMetaData)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Sets the no of elements to read out from an cached array, e.g. waveform + * \param _handle input: Conduit object reference + * \param _nelem input: No of elements for data transfer from cache + * \return no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::setNelemToRetrieveFromCache (unsigned int _handle, unsigned int _nelem) { +#define __METHOD__ "HandleHelper::setNelemToRetrieveFromCache(unsigned int _handle, unsigned int _nelem)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + + nelemForDataTransfer= min( (*it_handle).getChannelRegalia().getNelem(),_nelem); + nelemForDataTransfer= max(nelemForDataTransfer, (unsigned int) 1); + + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + //lessen the number if less in buffer + nelemForDataTransfer= min(nelemForDataTransfer,channelRequestMetaData.getNelem()-channelRequestMetaData.getOffset() ); + + channelRequestMetaData.setNelemCache( nelemForDataTransfer ); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaData( + channelRequestMetaData)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + +/** + * \brief Sets the no of elements to read out from an cached array to min(native, ) value, e.g. waveform + * \param _handle input: Conduit object reference + * \return no of elements (*it_handle).getChannelRegalia().getNelem() + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::setNelemToRetrieveFromCtrlCache (unsigned int _handle) { +#define __METHOD__ "HandleHelper::setNelemToRetrieveFromCtrlCache(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + + + nelemForDataTransfer= min(nelemForDataTransfer, MAX_NELEM_FOR_CTRL_BUFFER); + nelemForDataTransfer= max(nelemForDataTransfer, (unsigned int) 1); + channelRequestMetaCtrl=(*it_handle).getChannelRequestMetaCtrl(); + //lessen the number if less in buffer + nelemForDataTransfer= min(nelemForDataTransfer, channelRequestMetaCtrl.getNelem()-channelRequestMetaCtrl.getOffset()); + channelRequestMetaCtrl.setNelemCache( nelemForDataTransfer ); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaCtrl( + channelRequestMetaCtrl)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Sets the no of elements to read out from an cached array, e.g. waveform + * \param _handle input: Conduit object reference + * \param _nelem input: No of elements for data transfer from cache + * \return no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::setNelemToRetrieveFromCtrlCache (unsigned int _handle, unsigned int _nelem) { +#define __METHOD__ "HandleHelper::setNelemToRetrieveFromCtrlCache(unsigned int _handle, unsigned int _nelem)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + + nelemForDataTransfer= min( (*it_handle).getChannelRegalia().getNelem(),_nelem); + nelemForDataTransfer= min(nelemForDataTransfer, MAX_NELEM_FOR_CTRL_BUFFER); + nelemForDataTransfer= max(nelemForDataTransfer, (unsigned int) 1); + channelRequestMetaCtrl=(*it_handle).getChannelRequestMetaCtrl(); + //lessen the number if less in buffer + nelemForDataTransfer= min(nelemForDataTransfer, channelRequestMetaCtrl.getNelem()-channelRequestMetaCtrl.getOffset()); + channelRequestMetaCtrl.setNelemCache( nelemForDataTransfer ); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaCtrl( + channelRequestMetaCtrl)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Gets the no of elements to be read out from a cached array, e.g. waveform + * \param _handle input: Conduit object reference + * \return no of elements from channelRequestMetaData.getNelemCache(); + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::getNelemToRetrieveFromCache (unsigned int _handle) { +#define __METHOD__ "HandleHelper::getNelemToRetrieveFromCache(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemFromCache=0; + + if (it_handle != handle_index.end()) { + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + + //There may be less in buffer than requested + //cout <<__METHOD__ << __LINE__ << endl; + //cout << channelRequestMetaData.getNelemCache() << " // " << channelRequestMetaData.getNelem() << endl; + nelemFromCache=min(channelRequestMetaData.getNelemCache(),channelRequestMetaData.getNelem()-channelRequestMetaData.getOffset()) ; + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemFromCache; +#undef __METHOD__ +} + + + +/** + * \brief Gets the no of elements to be read out from a cached array, e.g. waveform + * \param _handle input: Conduit object reference + * \return no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::getNelemToRetrieveFromCtrlCache (unsigned int _handle) { +#define __METHOD__ "HandleHelper::getNelemToRetrieveFromCtrlCache(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemFromCache=0; + + if (it_handle != handle_index.end()) { + channelRequestMetaCtrl=(*it_handle).getChannelRequestMetaCtrl(); + //There may be less in buffer than requested + nelemFromCache=min(channelRequestMetaCtrl.getNelemCache(),channelRequestMetaCtrl.getNelem()-channelRequestMetaCtrl.getOffset()) ; + //nelemFromCache=channelRequestMetaCtrl.getNelemCache(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists " << endl; + } + } + return nelemFromCache; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves the no of elements to read out from an array, e.g. waveform as requested by client + * \param _handle input: Conduit object reference + * \return no of elements from (*it_handle).getChannelRequestMetaDataClient().getNelem() + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::getNelemClient(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getNelem(unsigned int _handle, unsigned int _nelem)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + nelemForDataTransfer= (*it_handle).getChannelRequestMetaDataClient().getNelem(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + +/** + * \brief Retrieves the no of elements to read out from an array, e.g. waveform as delivered to ca + * \param _handle input: Conduit object reference + * \return no of elements from (*it_handle).getChannelRequestMetaData().getNelem() + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::getNelemRequest(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getNelemRequest(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + nelemForDataTransfer= (*it_handle).getChannelRequestMetaData().getNelem(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + +/** + * \brief Retrieves the no of native elements + * \param _handle input: Conduit object reference + * \return no of elements from (*it_handle).getChannelRegalia().getNelem() + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::getNelemNative(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getNelemNative(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + nelemForDataTransfer= (*it_handle).getChannelRegalia().getNelem(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves the no of elements as initiated by client, no of native elements, + * no of elements requested to ca + * \param _handle input: Conduit object reference + * \param c output: no of elements as stated by client + * \param n output: no of native elements + * \param r output: no of elements as requested to ca + * \return ICAFE_NORMAL else ECAFE_INVALID_HANDLE + */ +int HandleHelper::getNelem(unsigned int _handle, + unsigned int &c, unsigned int &n, unsigned int &r) { +#define __METHOD__ "HandleHelper::getNelem(unsigned int _handle, client, native, request)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + c= (*it_handle).getChannelRequestMetaDataClient().getNelem(); + n= (*it_handle).getChannelRegalia().getNelem(); + r= (*it_handle).getChannelRequestMetaData().getNelem(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Retrieves the no of elements read out from an array + * e.g. waveform, as delivered to ca through DBR_CTRL + * \param _handle input: Conduit object reference + * \return no of elements from (*it_handle).getChannelRequestMetaCtrl().getNelem() + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::getNelemRequestCtrl(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getNelemRequestCtrl(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + nelemForDataTransfer= (*it_handle).getChannelRequestMetaCtrl().getNelem(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves the no of elements read out from an array + * e.g. waveform, as delivered to ca through DBR_CTRL + * \param _handle input: Conduit object reference + * \return no of elements from (*it_handle).getChannelRequestMetaCtrl().getNelem() + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::getNelemClientCtrl(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getNelemClientCtrl(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + nelemForDataTransfer= (*it_handle).getChannelRequestMetaCtrlClient().getNelem(); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Sets the no of elements to read out from an array, e.g. waveform, via DBR_CTRL + * \param _handle input: Conduit object reference + * \param _nelem input: No of elements for ca data transfer + * \return no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) + * else 0 if ECAFE_INVALID_HANDLE + */ +unsigned int HandleHelper::setNelemCtrl(unsigned int _handle, unsigned int _nelem) { +#define __METHOD__ "HandleHelper::setNelemCtrl(unsigned int _handle, unsigned int _nelem)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int nelemForDataTransfer=0; + + if (it_handle != handle_index.end()) { + + nelemForDataTransfer= min( (*it_handle).getChannelRegalia().getNelem(),_nelem); + nelemForDataTransfer= min(nelemForDataTransfer, MAX_NELEM_FOR_CTRL_BUFFER); + nelemForDataTransfer= max(nelemForDataTransfer, (unsigned int) 1); //precaution + channelRequestMetaCtrlClient=(*it_handle).getChannelRequestMetaCtrlClient(); + channelRequestMetaCtrlClient.setNelem( nelemForDataTransfer ); + + + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaCtrlClient( + channelRequestMetaCtrlClient)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return nelemForDataTransfer; +#undef __METHOD__ +} + +/** + * \brief Sets the offset; give element no from which data should be returned + * \param _handle input: Conduit object reference + * \param _offset input: Offset value + * \return offset: min( (*it_handle).getChannelRegalia().getNelem()-1, _offset)) + */ +unsigned int HandleHelper::setOffset(unsigned int _handle, unsigned int _offset) { +#define __METHOD__ "HandleHelper::setOffset(unsigned int _handle, unsigned int _offset)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int offsetForDataTransfer=0; + + if (it_handle != handle_index.end()) { + offsetForDataTransfer= min( (*it_handle).getChannelRegalia().getNelem()-1, _offset); + channelRequestMetaDataClient=(*it_handle).getChannelRequestMetaDataClient(); + channelRequestMetaDataClient.setOffset( offsetForDataTransfer); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestMetaDataClient( + channelRequestMetaDataClient)); + if(MUTEX){cafeMutex.unlock();} + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return offsetForDataTransfer; +#undef __METHOD__ +} + + + +/** + * \brief Retrieves the offset; gives element no from which data should be returned + * \param _handle input: Conduit object reference + * \return offset: Offset valu + */ +unsigned int HandleHelper::getOffset(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getOffset(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int offsetForDataTransfer=0; + + if (it_handle != handle_index.end()) { + channelRequestMetaDataClient=(*it_handle).getChannelRequestMetaDataClient(); + offsetForDataTransfer=channelRequestMetaDataClient.getOffset( ); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return offsetForDataTransfer; +#undef __METHOD__ +} + + +/** + * \brief Retrieves the last offset; gives element no from which data was actually returned + * \param _handle input: Conduit object reference + * \return offset: Offset valu + */ +unsigned int HandleHelper::getOffsetLast(unsigned int _handle) { +#define __METHOD__ "HandleHelper::getOffsetLast(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + unsigned int offsetForDataTransfer=0; + + if (it_handle != handle_index.end()) { + channelRequestMetaData=(*it_handle).getChannelRequestMetaData(); + offsetForDataTransfer=channelRequestMetaData.getOffset( ); + } + else { + if (printErrorPolicy.getInvalidHandle()) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cafeStatus.report(ECAFE_INVALID_HANDLE); + cout << "Handle=" << _handle << " either never existed or no longer exists! " << endl; + } + } + return offsetForDataTransfer; +#undef __METHOD__ +} + + +/** + * \brief Retrieves groupHandle from groupName from within a given ca context + * \param _groupName input: group Name + * \param ccc input: ca client context + * \return groupHandle else 0 if group not found + */ +unsigned int HandleHelper::getGroupHandleFromGroupName(const char * _groupName, ca_client_context * ccc){ +#define __METHOD__ "HandleHelper::getGroupHandleFromGroupName" + + cafeGroup_set_by_groupName & groupName_index = gs.get (); + cafeGroup_set_by_groupName::iterator it_groupName; + + it_groupName = groupName_index.find(_groupName); + + if (it_groupName != groupName_index.end()) { + if (ccc == (*it_groupName).getClientContext()) { + return (*it_groupName).groupHandle; + } else { + // Loop through all elements and search for pv/ca_client_context match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + //cout << "overload-1 " << *itgs << " " << (*itgs).getClientContext() << endl; + if (!strcmp((*itgs).getGroupName(), _groupName) && (*itgs).getClientContext() == ccc) { + return (*itgs).groupHandle; + } + } + } + } else { + // Loop through all elements and search for pv/ca_client_context match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + if ((strcmp((*itgs).getGroupName(), _groupName) == 0) && ((*itgs).getClientContext() == ccc)) { + // cout << " MATCH FOUND Handle Number is= " << (*itgs).groupHandle << endl; + return (*itgs).groupHandle; + } + } + } + + return 0; //Handle Not found +#undef __METHOD__ +} + + +/** + * \brief Retrieves groupName from grouphanlde + * \param _groupHandle input: handle to groupConduit object + * \return groupName else "" if groupHandle not found + */ +std::string HandleHelper::getGroupNameFromGroupHandle(unsigned int _groupHandle) { + +#define __METHOD__ "HandleHelper::getGroupNameFromGroupHandle" + + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + + it_groupHandle = groupHandle_index.find(_groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + + return (*it_groupHandle).groupName; + + } else { + // Loop through all elements and search for grouphandle match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + //ConduitGroup cg = *itgs; + + if ((*itgs).getGroupHandle() == _groupHandle ) { + // cout << " MATCH FOUND Handle Number is= " << (cg).groupHandle << endl; + return (*itgs).groupName; + } + } + } + + cafeStatus.report(ECAFE_UNKNOWN_GROUP); + return ""; //GroupName Not found +#undef __METHOD__ +} + +/** + * \brief Retrieves number of process variables within a group as identified by the groupHandle + * \param _groupHandle input: handle to groupConduit object + * \return number of PVs within group + */ +unsigned int HandleHelper::getGroupNPV(unsigned int _groupHandle) { + +#define __METHOD__ "HandleHelper::getGroupNPV(unsigned int)" + + cafeGroup_set_by_groupHandle & groupHandle_index = gs.get (); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + + it_groupHandle = groupHandle_index.find(_groupHandle); + + if (it_groupHandle != groupHandle_index.end()) { + return (*it_groupHandle).getNMember(); + + } else { + // Loop through all elements and search for grouphandle match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + + if ((*itgs).getGroupHandle() == _groupHandle ) { + // cout << " MATCH FOUND Handle Number is= " << (cg).groupHandle << endl; + return (*itgs).getNMember(); + } + } + } + + cafeStatus.report(ECAFE_UNKNOWN_GROUP); + return 0; //GroupHandle Not found +#undef __METHOD__ +} + +/** + * \brief Retrieves number of process variables within a group for a given ca client context + * \param _groupName input: name of CAFAE PVGroup + * \param ccc input: ca_client_context + * \return number of PVs within group + */ +unsigned int HandleHelper::getGroupNPV(const char * _groupName, ca_client_context * ccc){ +#define __METHOD__ "HandleHelper::getGroupNPV" + + cafeGroup_set_by_groupName & groupName_index = gs.get (); + cafeGroup_set_by_groupName::iterator it_groupName; + + it_groupName = groupName_index.find(_groupName); + + if (it_groupName != groupName_index.end()) { + if (ccc == (*it_groupName).getClientContext()) { + return (*it_groupName).getNMember(); + } else { + // Loop through all elements and search for pv/ca_client_context match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + //cout << "overload-1 " << *itgs << " " << (*itgs).getClientContext() << endl; + if (!strcmp((*itgs).getGroupName(), _groupName) && (*itgs).getClientContext() == ccc) { + return (*itgs).getNMember(); + } + } + } + } else { + // Loop through all elements and search for pv/ca_client_context match + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + + if ((strcmp((*itgs).getGroupName(), _groupName) == 0) && ((*itgs).getClientContext() == ccc)) { + // cout << " MATCH FOUND Handle Number is= " << (*itgs).groupHandle << endl; + return (*itgs).getNMember(); + } + } + } + + return 0; //Handle Not found +#undef __METHOD__ +} diff --git a/src/helper.cpp b/src/helper.cpp new file mode 100644 index 0000000..e0bd5a0 --- /dev/null +++ b/src/helper.cpp @@ -0,0 +1,272 @@ +/// +/// \file helper.cc +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 + +//include "connect.h" +//include "conduit.h" +//#include "cafeConduitFriends.h" + +#include "helper.h" + + +using namespace std; + + + +/** + * \brief Removes leading and trailing blanks + * \param pv input: process variable name + * \param pvStripped output: process variable name stripped of forward and trailing spaces + */ +void Helper::removeLeadingAndTrailingSpacesDbrString(const char * pv, char pvStripped[MAX_STRING_SIZE]) { +#define __METHOD__ "Helper::removeLeadingAndTrailingSpacesDbrString(const char * pv, char[MAX_STRING_SIZE])" + // Remove leading and trailing blanks + std::string pvS=pv; + + size_t found1 = pvS.find_first_not_of(" "); + size_t found2 = pvS.find_last_not_of (" "); + + if (found1!=std::string::npos && found2 !=std::string::npos) { + + size_t found21 = std::min((int)((found2+1)-found1), (int) (MAX_STRING_SIZE-1)); + size_t length = pvS.copy(pvStripped,found21,found1); + + pvStripped[length]='\0'; //required + + } + else { + std::strcpy(pvStripped,""); + + } + + return; +#undef __METHOD__ +} + + +/** + * \brief Removes leading and trailing blanks + * \param pv input: process variable name + * \param pvStripped output: process variable name stripped of forward and trailing spaces + */ +void Helper::removeLeadingAndTrailingSpacesPseudo(const char * pv, char pvStripped[PVGROUP_PSEUDO_SIZE]) { +#define __METHOD__ "Helper::removeLeadingAndTrailingSpacesPseudo(const char * pv, char[PVGROUP_PSEUDO_SIZE])" + // Remove leading and trailing blanks + std::string pvS=pv; + + size_t found1 = pvS.find_first_not_of(" "); + size_t found2 = pvS.find_last_not_of (" "); + + if (found1!=std::string::npos && found2 !=std::string::npos) { + + size_t found21 = std::min((int)((found2+1)-found1), (int) (PVGROUP_PSEUDO_SIZE-1)); + size_t length = pvS.copy(pvStripped,found21,found1); + + pvStripped[length]='\0'; //required + + } + else { + std::strcpy(pvStripped,"isEmpty"); + + } + + return; +#undef __METHOD__ +} + + +/** + * \brief Removes leading and trailing blanks + * \param pv input: process variable name + * \param pvStripped output: process variable name stripped of forward and trailing spaces + */ +void Helper::removeLeadingAndTrailingSpaces(const char * pv, char pvStripped[PVNAME_SIZE]) { +#define __METHOD__ "Helper::removeLeadingAndTrailingSpaces(const char * pv, char[PVNAME_SIZE])" + // Remove leading and trailing blanks + std::string pvS=pv; + + size_t found1 = pvS.find_first_not_of(" "); + size_t found2 = pvS.find_last_not_of (" "); + + if (found1!=std::string::npos && found2 !=std::string::npos) { + + size_t found21 = std::min((int)((found2+1)-found1), (int) (PVNAME_SIZE-1)); + size_t length = pvS.copy(pvStripped,found21,found1); + + pvStripped[length]='\0'; //required + + } + else { + std::strcpy(pvStripped,"isEmpty"); + + } + + return; +#undef __METHOD__ +} + + +/** + * \brief Produces a unique identifier from the pvName, ca_client_context, group handle size \n + * for entry into hash table + * \param pv input: process variable name + * \param ccc input: current context + * \param ghs input: size of gs (group handle set) + * \return unique identifier + */ +unsigned int Helper::convertToUniqueNumber(const char * pv, ca_client_context * ccc, unsigned int ghs) { +#define __METHOD__ "Helper::convertToUniqueNumber(const char * pv, ca_client_context * ccc, unsigned int ghs)" + + std::string myString=pv; + char s[12]; + + sprintf(s,"%ld", (unsigned long) ccc); + + + unsigned int numberPV = 0; + unsigned int numberContext =0 ; + double dpow=0; + unsigned int ld=0; + + + numberContext = atoi(s); + + unsigned int intValueIs=0; + unsigned int iL=0; + + for (unsigned int i=0; i< myString.size(); i++) { + + intValueIs= (unsigned int) myString[i]; + ld=1; + + if ( (intValueIs >47 && intValueIs < 58) || + (intValueIs >64 && intValueIs < 91) || + (intValueIs >97 && intValueIs < 123) ) { + dpow=pow((float) 42, (int) iL%4); + ld = static_cast(dpow); + ++iL; + } + else { + iL=0; + } + + numberPV += (intValueIs*ld*(i+1)); + } + + + + unsigned int final=(numberPV+numberContext+((ghs+1)*10000+ghs)); + + return final; +#undef __METHOD__ +} + +/** + * \brief Produces a unique identifier from the pvName and ca_client_context for entry into hash table + * \param pv input: process variable name + * \param ccc input: current context + * \return unique identifier + */ +unsigned int Helper::convertToUniqueNumber(const char * pv, ca_client_context * ccc) { +#define __METHOD__ "Helper::convertToUniqueNumber(const char * pv, ca_client_context * ccc)" + + std::string myString=pv; + char s[12]; + + sprintf(s,"%ld", (unsigned long) ccc); + + unsigned int numberPV = 0; + unsigned int numberContext =0 ; + double dpow=0; + unsigned int ld=0; + + numberContext = atoi(s); + + + unsigned int intValueIs=0; + unsigned int iL=0; + + for (unsigned int i=0; i< myString.size(); i++) { + + intValueIs= (unsigned int) myString[i]; + ld=1; + + if ( (intValueIs >47 && intValueIs < 58) || + (intValueIs >64 && intValueIs < 91) || + (intValueIs >97 && intValueIs < 123) ) { + dpow=pow((float)42, (int)iL%4); + ld = static_cast(dpow); + ++iL; + } + else { + iL=0; + } + + numberPV += (intValueIs*ld*(i+1)); + + } + + return (numberPV+numberContext); +#undef __METHOD__ +} + +/** + * \brief enum CAFENUM::DBR_TYPE {DBR_PRIMITIVE=333,DBR_STS,DBR_TIME, + * DBR_GR,DBR_CTRL,DBR_NONE}; \n + * Extracts the CAFENUM::DBR_TYPE from the channel type + * \param _chtype input: channel type + * \return CAFENUM::DBR_TYPE + */ +CAFENUM::DBR_TYPE Helper::convertToCAFEDbrTypeClass(const chtype _chtype) const { +#define __METHOD__ "Helper::convertToCAFEDbrTypeClass(const chtype _chtype)" + + if (_chtype>=DBR_STRING && _chtype <= DBR_DOUBLE) { + return CAFENUM::DBR_PRIMITIVE; + } + else if (_chtype>=DBR_STS_STRING && _chtype <= DBR_STS_DOUBLE) { + return CAFENUM::DBR_STS; + } + else if (_chtype>=DBR_TIME_STRING && _chtype <= DBR_TIME_DOUBLE) { + return CAFENUM::DBR_TIME; + } + else if (_chtype>=DBR_GR_STRING && _chtype <= DBR_GR_DOUBLE) { + return CAFENUM::DBR_GR; + } + else if (_chtype>=DBR_CTRL_STRING && _chtype <= DBR_CTRL_DOUBLE) { + return CAFENUM::DBR_CTRL; + } + else if (_chtype==DBR_PUT_ACKT || _chtype==DBR_PUT_ACKS) { + return CAFENUM::DBR_PUT; + } + else if (_chtype==DBR_STSACK_STRING) { + return CAFENUM::DBR_STSACK; + } + else if (_chtype==DBR_CLASS_NAME) { + return CAFENUM::DBR_CLASS; + } + else { + return CAFENUM::DBR_NONE; + } + +#undef __METHOD__ +} + +/** + * \brief Concatinates dbr_char_t(unsigned char) into a string + * \param inpChar input: Array of dbr_char_t data types + * \param nChar input: size of array + * \return std:string The concatinated string + */ +std::string Helper::concatToString(dbr_char_t * inpChar, unsigned int nChar){ + + std::string psWF = ""; + + for (unsigned int i=0; i +#include + +const QString&loadGroupXMLParser::tagCollection_list = "config"; +const QString&loadGroupXMLParser::tagGroup = "group"; +const QString&loadGroupXMLParser::tagDescription = "description"; +const QString&loadGroupXMLParser::tagStatusGroup = "statusGroup"; +const QString&loadGroupXMLParser::tagMember = "member"; +const QString&loadGroupXMLParser::tagName = "name"; +const QString&loadGroupXMLParser::tagNelem = "nelem"; +const QString&loadGroupXMLParser::tagStatus = "status"; +const QString&loadGroupXMLParser::tagRule = "rule"; +const QString&loadGroupXMLParser::tagDataType = "datatype"; +const QString&loadGroupXMLParser::tagCollection = "collection"; +const QString&loadGroupXMLParser::tagId = "id"; +const QString&loadGroupXMLParser::tagAttrib = "attribute"; +const QString&loadGroupXMLParser::tagCollectiveType = "collectivetype"; + +loadGroupXMLParser::loadGroupXMLParser() { +} + +loadGroupXMLParser::~loadGroupXMLParser() { +} + +bool loadGroupXMLParser::startElement(const QString& namespaceURI, const QString& localName, + const QString& qName, const QXmlAttributes& atts) { + + bool error = false; + + if (localName.compare(tagCollection_list, Qt::CaseInsensitive) == 0) { + + }else if (localName.compare(tagGroup, Qt::CaseInsensitive) == 0) { + group = deviceGroup(); + group.id = atts.value("id").toAscii().constData(); + + } else if (localName.compare(tagDescription, Qt::CaseInsensitive) == 0) { + state = WaitingForDescription; + } else if (localName.compare(tagStatusGroup, Qt::CaseInsensitive) == 0) { + state = WaitingForStatusGroup; + } else if (localName.compare(tagMember, Qt::CaseInsensitive) == 0) { + state = WaitingForMember; + } else if (localName.compare(tagName, Qt::CaseInsensitive) == 0) { + state = WaitingForName; + } else if (localName.compare(tagNelem, Qt::CaseInsensitive) == 0) { + state = WaitingForNelem; + } else if (localName.compare(tagStatus, Qt::CaseInsensitive) == 0) { + state = WaitingForStatus; + } else if (localName.compare(tagRule, Qt::CaseInsensitive) == 0) { + state = WaitingForRule; + } else if (localName.compare(tagDataType, Qt::CaseInsensitive) == 0) { + state = WaitingForDataType; + } else if (localName.compare(tagCollection, Qt::CaseInsensitive) == 0) { + collection = collectionInGroup(); + } else if (localName.compare(tagId, Qt::CaseInsensitive) == 0) { + state = WaitingForId; + } else if (localName.compare(tagAttrib, Qt::CaseInsensitive) == 0) { + state = WaitingForAttrib; + } else if (localName.compare(tagCollectiveType, Qt::CaseInsensitive) == 0) { + state = WaitingForCollectiveType; + } else { + error = true; + + } + return !error; +} + +bool loadGroupXMLParser::endElement(const QString& namespaceURI, +const QString& localName, const QString& qName) { + if (localName.compare(tagGroup, Qt::CaseInsensitive) == 0) { + groups.push_back(group); + } else if (localName.compare(tagMember, Qt::CaseInsensitive) == 0) { + group.xmlMembers.push_back(xmlMem); + } else if (localName.compare(tagCollection, Qt::CaseInsensitive) == 0) { + group.collections.push_back(collection); + } + return true; +} + +bool loadGroupXMLParser::characters(const QString& ch) { + bool error = false; + + std::string data = ch.trimmed().toAscii().constData(); + + switch (state) { + case WaitingForDescription: + group.description = data; + break; + case WaitingForStatusGroup: + case WaitingForMember: + break; + + case WaitingForName: + xmlMem=data; + break; + case WaitingForNelem: + + break; + case WaitingForStatus: + + break; + case WaitingForRule: + + break; + case WaitingForDataType: + + break; + case WaitingForId: + collection.id = data; + break; + case WaitingForAttrib: + collection.attrib = data; + break; + case WaitingForCollectiveType: + break; + default: + error = true; + printf("Unexpected state in loadGroupXMLParser::characters: '%s'\n", data.c_str()); + break; + } + return !error; +} + +#endif diff --git a/src/makeManualWin.make b/src/makeManualWin.make new file mode 100644 index 0000000..3da74e8 --- /dev/null +++ b/src/makeManualWin.make @@ -0,0 +1,27 @@ +INCLUDES = -Ic:\CAFE\CAFE\cpp\include -Ic:\CAFE\CAFE\cpp -Ic:\local\boost_1_62_0\boost \ +-Ic:\local\boost_1_62_0 -Ic:\epics\base-3.14.12.5\include -Ic:\epics\base-3.14.12.5\include\os\WIN32 \ +-Ic:\Qt\4.8.4\include +CXX=cl +CXXFLAGS = /W4 /EHsc /c +OUTPUT_OPTION = /o $@ +LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \ +C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_62.lib \ +C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_62.lib \ +C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib +LIBS = -lca -lCom + +OBJS= src\cafeCache.obj src\cafeGroup.obj src\cafe.obj src\cafeVectors.obj \ + src\cafeXML.obj src\callbackHandlerCreate.obj src\callbackHandlerMonitor.obj src\conduitGroup.obj src\conduit.obj \ + src\connectCallbacks.obj src\connectGroup.obj \ + src\connect.obj src\exceptionsHelper.obj src\granules.obj src\handleHelper.obj src\helper.obj \ + src\loadCollectionXMLParser.obj src\loadGroupXMLParser.obj src\methodCallbacks.obj src\policyHelper.obj \ + src\restorePVGroupXMLParser.obj src\transpose.obj $(LIB_LOCAL) + +cafe.lib: $(OBJS) + LIB $(OBJS) /out:cafe.lib + +%.obj: %.cpp + $(CXX) $(CXXFLAGS) $(INCLUDES) $< + + + diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..033f578 --- /dev/null +++ b/src/makefile @@ -0,0 +1,568 @@ +# makefile.in generated by automake 1.11.1 from makefile.am. +# src/makefile. Generated from makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/cafe +pkgincludedir = $(includedir)/cafe +pkglibdir = $(libdir)/cafe +pkglibexecdir = $(libexecdir)/cafe +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +#am__append_1 = PyCafe.cpp +subdir = src +DIST_COMMON = $(srcdir)/makefile.am $(srcdir)/makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/./include/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libcafe_la_LIBADD = +am__libcafe_la_SOURCES_DIST = cafe.cpp cafeCache.cpp cafeGroup.cpp \ + cafeVectors.cpp cafeXML.cpp callbackHandlerCreate.cpp \ + callbackHandlerMonitor.cpp conduit.cpp connect.cpp \ + connectCallbacks.cpp exceptionsHelper.cpp granules.cpp \ + handleHelper.cpp loadCollectionXMLParser.cpp \ + loadGroupXMLParser.cpp methodCallbacks.cpp helper.cpp \ + policyHelper.cpp conduitGroup.cpp connectGroup.cpp \ + transpose.cpp restorePVGroupXMLParser.cpp PyCafe.cpp +#am__objects_1 = PyCafe.lo +am_libcafe_la_OBJECTS = cafe.lo cafeCache.lo cafeGroup.lo \ + cafeVectors.lo cafeXML.lo callbackHandlerCreate.lo \ + callbackHandlerMonitor.lo conduit.lo connect.lo \ + connectCallbacks.lo exceptionsHelper.lo granules.lo \ + handleHelper.lo loadCollectionXMLParser.lo \ + loadGroupXMLParser.lo methodCallbacks.lo helper.lo \ + policyHelper.lo conduitGroup.lo connectGroup.lo transpose.lo \ + restorePVGroupXMLParser.lo $(am__objects_1) +libcafe_la_OBJECTS = $(am_libcafe_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/./include +depcomp = $(SHELL) $(top_srcdir)/./depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libcafe_la_SOURCES) +DIST_SOURCES = $(am__libcafe_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run aclocal-1.11 +AMTAR = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run tar + +#if HAVE_ZEROMQ +#libcafe_la_SOURCES += cafeService.cpp +#endif +AM_CPPFLAGS = -fexceptions -fPIC -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml -I$(top_srcdir)/include +AM_LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64 +AR = ar +AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoconf +AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoheader +AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run automake-1.11 +AWK = gawk +CAFE_CPPFLAGS = -I$(top_srcdir)/include +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = -fexceptions -fPIC -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64 +LIBOBJS = +LIBS = -lQtXml -lQtCore +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = cafe +PACKAGE_BUGREPORT = Bug reports to: jan.chrin@psi.ch +PACKAGE_NAME = CAFE +PACKAGE_STRING = CAFE 1.0.0 +PACKAGE_TARNAME = cafe +PACKAGE_VERSION = 1.0.0 +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.0.0 +abs_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/src +abs_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/src +abs_top_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +abs_top_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh +libdir = /opt/gfa/cafe/cpp/cafe-1.3.0-final-1/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /opt/gfa/cafe/cpp/cafe-1.3.0-final-1 +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +lib_LTLIBRARIES = libcafe.la +libcafe_la_SOURCES = cafe.cpp cafeCache.cpp cafeGroup.cpp \ + cafeVectors.cpp cafeXML.cpp callbackHandlerCreate.cpp \ + callbackHandlerMonitor.cpp conduit.cpp connect.cpp \ + connectCallbacks.cpp exceptionsHelper.cpp granules.cpp \ + handleHelper.cpp loadCollectionXMLParser.cpp \ + loadGroupXMLParser.cpp methodCallbacks.cpp helper.cpp \ + policyHelper.cpp conduitGroup.cpp connectGroup.cpp \ + transpose.cpp restorePVGroupXMLParser.cpp $(am__append_1) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/makefile.in: $(srcdir)/makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/makefile +.PRECIOUS: makefile +makefile: $(srcdir)/makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libcafe.la: $(libcafe_la_OBJECTS) $(libcafe_la_DEPENDENCIES) + $(CXXLINK) -rpath $(libdir) $(libcafe_la_OBJECTS) $(libcafe_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/PyCafe.Plo +include ./$(DEPDIR)/cafe.Plo +include ./$(DEPDIR)/cafeCache.Plo +include ./$(DEPDIR)/cafeGroup.Plo +include ./$(DEPDIR)/cafeVectors.Plo +include ./$(DEPDIR)/cafeXML.Plo +include ./$(DEPDIR)/callbackHandlerCreate.Plo +include ./$(DEPDIR)/callbackHandlerMonitor.Plo +include ./$(DEPDIR)/conduit.Plo +include ./$(DEPDIR)/conduitGroup.Plo +include ./$(DEPDIR)/connect.Plo +include ./$(DEPDIR)/connectCallbacks.Plo +include ./$(DEPDIR)/connectGroup.Plo +include ./$(DEPDIR)/exceptionsHelper.Plo +include ./$(DEPDIR)/granules.Plo +include ./$(DEPDIR)/handleHelper.Plo +include ./$(DEPDIR)/helper.Plo +include ./$(DEPDIR)/loadCollectionXMLParser.Plo +include ./$(DEPDIR)/loadGroupXMLParser.Plo +include ./$(DEPDIR)/methodCallbacks.Plo +include ./$(DEPDIR)/policyHelper.Plo +include ./$(DEPDIR)/restorePVGroupXMLParser.Plo +include ./$(DEPDIR)/transpose.Plo + +.cpp.o: + $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: + $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: + $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/makefile.am b/src/makefile.am new file mode 100644 index 0000000..f42a399 --- /dev/null +++ b/src/makefile.am @@ -0,0 +1,24 @@ +## makefile.am - processed by automake to produce makefile.in +## +## input file for production of cafe library +## + + +lib_LTLIBRARIES = libcafe.la +libcafe_la_SOURCES = cafe.cpp cafeCache.cpp cafeGroup.cpp cafeVectors.cpp cafeXML.cpp \ + callbackHandlerCreate.cpp callbackHandlerMonitor.cpp conduit.cpp connect.cpp connectCallbacks.cpp \ + exceptionsHelper.cpp granules.cpp handleHelper.cpp loadCollectionXMLParser.cpp \ + loadGroupXMLParser.cpp methodCallbacks.cpp helper.cpp policyHelper.cpp \ + conduitGroup.cpp connectGroup.cpp transpose.cpp restorePVGroupXMLParser.cpp + + +if HAVE_PYCAFE_EXT +libcafe_la_SOURCES += PyCafe.cpp +endif + +#if HAVE_ZEROMQ +#libcafe_la_SOURCES += cafeService.cpp +#endif + +AM_CPPFLAGS = @AM_CPPFLAGS@ @CAFE_CPPFLAGS@ +AM_LDFLAGS= @AM_LDFLAGS@ diff --git a/src/methodCallbacks.cpp b/src/methodCallbacks.cpp new file mode 100644 index 0000000..6475745 --- /dev/null +++ b/src/methodCallbacks.cpp @@ -0,0 +1,570 @@ +/// +/// \file methodCallbacks.cc +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 + +#include "conduitEventHandlerArgs.h" +#include "methodCallbacks.h" +#include "connect.h" + +//in methodCallbacks.h +//include + +//#if HAVE_PYTHON_H +//#include +//#endif + + +#if HAVE_PYTHON_H + +/** + * Callback function for when putWithCallback method is invoked + * \param args input: event handler_args structure + */ +void CALLBACK_CAFE::PyHandlerPut( struct event_handler_args args) { +#define __METHOD__ "CALLBACK_CAFE::PyHandlerPut" + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + + // cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + + unsigned int _handle = (unsigned long) args.usr; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int) _handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX)cafeMutex.lock(); + + //Change Channel Policy to NO_WAIT(?) + + ChannelRequestStatus channelRequestStatusPut=(*it_handle).getChannelRequestStatusPut(); + + channelRequestStatusPut.setCallbackKind(false, true); + + handle_index.modify(it_handle, change_channelRequestStatusPut(channelRequestStatusPut)); + + if(MUTEX)cafeMutex.unlock(); + + + //if HAVE_PYTHON_H + + (*it_handle).PyPutHandler(); + + //endif + + } + else { + + bool internalFlag=false; + cafeConduit_set::iterator itcs; + // Loop through all elements and search for handle + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ( (*itcs).getHandle()==_handle) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " INFORMATION to author: MATCHed Handle= " << _handle << " to PV= " << (*itcs).getPV() << endl; + cout << " by looping through itcs::iterator, since the by_handle::iterator was NOT found! " << endl; + + if(MUTEX)cafeMutex.lock(); + ChannelRequestStatus channelRequestStatusPut=(*itcs).getChannelRequestStatusPut(); + channelRequestStatusPut.setCallbackKind(false, true); + handle_index.modify(itcs, change_channelRequestStatusPut(channelRequestStatusPut)); + if(MUTEX)cafeMutex.unlock(); + + //if HAVE_PYTHON_H + (*it_handle).PyPutHandler(); + //endif + + internalFlag=true; + break; + } + } + + if (!internalFlag) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + + } + +return; +#undef __METHOD__ +}; + +//#endif + + +//#if HAVE_PYTHON_H + +/** + * Callback function for getCallback method is invoked + * with a pointer to the retrieved value + * \param args input: event handler arguments + */ +void CALLBACK_CAFE::PyHandlerGet( struct event_handler_args args) { + +#define __METHOD__ "CALLBACK_CAFE::PyHandlerGet" + + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + + unsigned int _handle = (unsigned long) args.usr; // ca_puser(args.chid); + + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + ChannelRequestStatus channelRequestStatusGet=(*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackKind(false, true); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + //cout << __METHOD__ << " CALLBACK DONE " << (*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() << endl; + if(MUTEX){cafeMutex.unlock();} + + + //if HAVE_PYTHON_H + (*it_handle).PyGetHandler(); + //endif + + } + else { + + bool internalFlag=false; + cafeConduit_set::iterator itcs; + // Loop through all elements and search for handle + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ( (*itcs).getHandle()==_handle) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " INFORMATION to author: MATCHed Handle= " << _handle << " to PV= " << (*itcs).getPV() << endl; + cout << " by looping through tcs::iterator, since the by_handle::iterator was NOT found! " << endl; + + ChannelRequestStatus channelRequestStatusGet=(*itcs).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackKind(false, true); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_eventHandlerArgs (args)); + handle_index.modify(itcs, change_channelRequestStatusGet(channelRequestStatusGet)); + if(MUTEX){cafeMutex.unlock();} + + + //if HAVE_PYTHON_H + (*it_handle).PyGetHandler(); + //endif + + + internalFlag=true; + break; + } + } + + if (!internalFlag) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + + + + } + + +return; +#undef __METHOD__ + +}; + + +#endif + + + +/** + * Callback function for when putWithCallback method is invoked + * \param args input: event handler_args structure + */ +void CALLBACK_CAFE::handlerPut( struct event_handler_args args) { +#define __METHOD__ "CALLBACK_CAFE::handlerPut" + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) args.usr; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find((unsigned int) _handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX)cafeMutex.lock(); + + //Change Channel Policy to NO_WAIT(?) + + ChannelRequestStatus channelRequestStatusPut=(*it_handle).getChannelRequestStatusPut(); + + channelRequestStatusPut.setCallbackKind(false, true); + + handle_index.modify(it_handle, change_channelRequestStatusPut(channelRequestStatusPut)); + + if(MUTEX)cafeMutex.unlock(); + + + } + else { + + bool internalFlag=false; + cafeConduit_set::iterator itcs; + // Loop through all elements and search for handle + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + + if ( (*itcs).getHandle()==_handle) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " INFORMATION to author: MATCHed Handle= " << _handle << " to PV= " << (*itcs).getPV() << endl; + cout << " by looping through itcs::iterator, since the by_handle::iterator was NOT found! " << endl; + + if(MUTEX)cafeMutex.lock(); + ChannelRequestStatus channelRequestStatusPut=(*itcs).getChannelRequestStatusPut(); + channelRequestStatusPut.setCallbackKind(false, true); + handle_index.modify(itcs, change_channelRequestStatusPut(channelRequestStatusPut)); + if(MUTEX)cafeMutex.unlock(); + + + internalFlag=true; + break; + } + } + + if (!internalFlag) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + + } + +return; +#undef __METHOD__ +}; + + + +/** + * Callback function for getCallback method is invoked + * with a pointer to the retrieved value + * \param args input: event handler arguments + */ +void CALLBACK_CAFE::handlerGet( struct event_handler_args args) { +#define __METHOD__ "CALLBACK_CAFE::handlerGet" + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) args.usr; // ca_puser(args.chid); + + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + ChannelRequestStatus channelRequestStatusGet=(*it_handle).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackKind(false, true); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet)); + //cout << __METHOD__ << " CALLBACK DONE " << (*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() << endl; + if(MUTEX){cafeMutex.unlock();} + } + else { + + bool internalFlag=false; + cafeConduit_set::iterator itcs; + // Loop through all elements and search for handle + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ( (*itcs).getHandle()==_handle) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " INFORMATION to author: MATCHed Handle= " << _handle << " to PV= " << (*itcs).getPV() << endl; + cout << " by looping through tcs::iterator, since the by_handle::iterator was NOT found! " << endl; + + ChannelRequestStatus channelRequestStatusGet=(*itcs).getChannelRequestStatusGet(); + channelRequestStatusGet.setCallbackKind(false, true); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_eventHandlerArgs (args)); + handle_index.modify(itcs, change_channelRequestStatusGet(channelRequestStatusGet)); + if(MUTEX){cafeMutex.unlock();} + + internalFlag=true; + break; + } + } + + if (!internalFlag) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + } + + +return; +#undef __METHOD__ +}; + + +/** + * Callback function for handlerGetCtrl method is invoked + * with a pointer to the retrieved value + * \param args input: event handler arguments + */ +void CALLBACK_CAFE::handlerGetCtrl( struct event_handler_args args) { +#define __METHOD__ "CALLBACK_CAFE::handlerGetCtrl " + + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) args.usr; // ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + + if (it_handle != handle_index.end()) { + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + ChannelRequestStatus channelRequestStatusGetCtrl=(*it_handle).getChannelRequestStatusGetCtrl(); + channelRequestStatusGetCtrl.setCallbackKind(false, true); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + + bool internalFlag=false; + cafeConduit_set::iterator itcs; + // Loop through all elements and search for handle + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ( (*itcs).getHandle()==_handle) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " INFORMATION to author: MATCHed Handle= " << _handle << " to PV= " << (*itcs).getPV() << endl; + cout << " by looping through itcs::iterator, since the by_handle::iterator was NOT found! " << endl; + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + ChannelRequestStatus channelRequestStatusGetCtrl=(*itcs).getChannelRequestStatusGetCtrl(); + channelRequestStatusGetCtrl.setCallbackKind(false, true); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_channelRequestStatusGetCtrl(channelRequestStatusGetCtrl)); + if(MUTEX){cafeMutex.unlock();} + + internalFlag=true; + break; + } + } + + if (!internalFlag) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + } + +return; +#undef __METHOD__ +}; + + + +/** + * Callback function for handlerSTSACK method is invoked + * with a pointer to the retrieved value + * \param args input: event handler arguments + */ +void CALLBACK_CAFE::handlerGetSTSACK( struct event_handler_args args) { +#define __METHOD__ "CALLBACK_CAFE::handlerGetSTSACK " + + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + + return; + } + + + unsigned int _handle = (unsigned long) args.usr; // ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + ChannelRequestStatus channelRequestStatusGetSTSACK=(*it_handle).getChannelRequestStatusGetSTSACK(); + + channelRequestStatusGetSTSACK.setCallbackKind(false, true); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestStatusGetSTSACK(channelRequestStatusGetSTSACK)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + + bool internalFlag=false; + cafeConduit_set::iterator itcs; + // Loop through all elements and search for handle + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ( (*itcs).getHandle()==_handle) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " INFORMATION to author: MATCHed Handle= " << _handle << " to PV= " << (*itcs).getPV() << endl; + cout << " by looping through itcs::iterator, since the by_handle::iterator was NOT found! " << endl; + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + ChannelRequestStatus channelRequestStatusGetSTSACK=(*itcs).getChannelRequestStatusGetSTSACK(); + channelRequestStatusGetSTSACK.setCallbackKind(false, true); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_channelRequestStatusGetSTSACK(channelRequestStatusGetSTSACK)); + if(MUTEX){cafeMutex.unlock();} + internalFlag=true; + break; + } + } + + if (!internalFlag) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + } + + +return; +#undef __METHOD__ +}; + + + +/** + * Callback function for handlerClassName method is invoked + * with a pointer to the retrieved value + * \param args input: event handler arguments + */ +void CALLBACK_CAFE::handlerGetClassName( struct event_handler_args args) { +#define __METHOD__ "CALLBACK_CAFE::handlerGetClassName " + + + if (args.status !=ECA_NORMAL) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl; + return; + } + + unsigned int _handle = (unsigned long) args.usr; // ca_puser(args.chid); + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + + ChannelRequestStatus channelRequestStatusGetClassName=(*it_handle).getChannelRequestStatusGetClassName(); + + channelRequestStatusGetClassName.setCallbackKind(false, true); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestStatusGetClassName(channelRequestStatusGetClassName)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + + bool internalFlag=false; + cafeConduit_set::iterator itcs; + // Loop through all elements and search for handle + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if ( (*itcs).getHandle()==_handle) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " INFORMATION to author: MATCHed Handle= " << _handle << " to PV= " << (*itcs).getPV() << endl; + cout << " by looping through tcs::iterator, since the by_handle::iterator was NOT found! " << endl; + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_eventHandlerArgs (args)); + if(MUTEX){cafeMutex.unlock();} + ChannelRequestStatus channelRequestStatusGetClassName=(*it_handle).getChannelRequestStatusGetClassName(); + channelRequestStatusGetClassName.setCallbackKind(false, true); + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_channelRequestStatusGetClassName(channelRequestStatusGetClassName)); + if(MUTEX){cafeMutex.unlock();} + + internalFlag=true; + break; + } + } + + if (!internalFlag) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl; + } + } + +return; +#undef __METHOD__ +}; + + + + + + + diff --git a/src/policyHelper.cpp b/src/policyHelper.cpp new file mode 100644 index 0000000..51fa6c4 --- /dev/null +++ b/src/policyHelper.cpp @@ -0,0 +1,1640 @@ +/// +/// \file policyHelper.cc +/// \author Jan Chrin, PSI +/// \date Release: February 2015 +/// \version CAFE 1.0.0 +/// + +#include "policyHelper.h" +#include "global.h" + +using namespace std; + +////////////////////////////////// REQUEST POLICIES /////////////////////////////////////////////////////////// + +/** + * \brief PolicyHelper::getChannelGetCacheWaitPolicy \n + * Retrieves ChannelGetCacheWaitPolicy object whose method getWhenKind() \n + * determines if ChannelGetCacheWaitPolicyKind CAFENUM::GET_CACHE_NO_WAIT + * or CAFENUM::GET_CACHE_WAIT \n + * \param _handle input: reference handle + * \param cwp output: ChannelGetCacheWaitPolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::getChannelGetCacheWaitPolicy(unsigned int _handle, + ChannelGetCacheWaitPolicy & cwp){ +#define __METHOD__ "policyHelper::getChannelGetCacheWaitPolicy(handle, ChannelGetCacheWaitPolicy & cwp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + cwp=(*it_handle).getChannelGetCacheWaitPolicy(); + } + else { + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief PolicyHelper::setChannelGetCacheWaitPolicy \n + * Sets ChannelGetCacheWaitPolicy object whose method getWhenKind() \n + * determines if ChannelGetCacheWaitPolicyKind CAFENUM::GET_CACHE_NO_CHECK + * CAFENUM::GET_CACHE_NO_WAIT or CAFENUM::GET_CACHE_WAIT \n + * \param _handle input: reference handle + * \param cwp input: ChannelGetCacheWaitPolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::setChannelGetCacheWaitPolicy(unsigned int _handle, + ChannelGetCacheWaitPolicy cwp){ +#define __METHOD__ "policyHelper:setChannelGetCacheWaitPolicy(handle, ChannelGetCacheWaitPolicy cwp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if (cwp.getWaitKind() < CAFENUM::GET_CACHE_NO_CHECK || cwp.getWaitKind() > CAFENUM::GET_CACHE_WAIT) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Handle= "<< (*it_handle).getHandle() << " PV= " << (*it_handle).getPV() << endl; + cout << cwp.getWaitKind() << " is an unknown policy!" << endl; + cout << "Valid types are GET_CACHE_NO_CHECK(0) GET_CACHE_NO_WAIT(1) or GET_CACHE_WAIT(2)" << endl; + return ECAFE_INVALID_CAFENUM_POLICY_TYPE; + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelGetCacheWaitPolicy(cwp)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + + +/** + * \brief PolicyHelper::setChannelGetCacheWaitPolicy \n + * Sets the ChannelGetCacheWaitPolicy object (for all handles) whose method getWhenKind() \n + * determines if ChannelGetCacheWaitPolicyKind CAFENUM::GET_CACHE_NO_CEHCK + * CAFENUM::GET_CACHE_NO_WAIT or CAFENUM::GET_CACHE_WAIT \n + * \param cwp input: ChannelGetCacheWaitPolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::setChannelGetCacheWaitPolicy( ChannelGetCacheWaitPolicy cwp){ +#define __METHOD__ "policyHelper:setChannelGetCacheWaitPolicy(ChannelGetCacheWaitPolicy cwp)" + + int localStatus=ICAFE_NORMAL; + int gStatus=ICAFE_NORMAL; bool sflag=false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus= setChannelGetCacheWaitPolicy ((*itcs).getHandle(), cwp); + if (localStatus !=ICAFE_NORMAL && !sflag) {gStatus=localStatus; sflag=true;} + } + return gStatus; + +#undef __METHOD__ +} + + + +/** + * \brief PolicyHelper::getChannelGetActionWhenMonitorPolicy \n + * Retrieves ChannelGetActionWhenMonitorPolicy object whose method getWhenKind() \n + * determines if ChannelGetActionWhenMonitorPolicyKind CAFENUM::GET_FROM_CACHE + * or CAFENUM::GET_FROM_IOC \n + * \param _handle input: reference handle + * \param awmp output: ChannelGetActionWhenMonitorPolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::getChannelGetActionWhenMonitorPolicy(unsigned int _handle, + ChannelGetActionWhenMonitorPolicy & awmp){ +#define __METHOD__ "policyHelper::getChannelGetActionWhenMonitorPolicy(handle, ChannelGetActionWhenMonitorPolicy & awmp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + awmp=(*it_handle).getChannelGetActionWhenMonitorPolicy(); + } + else { + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief PolicyHelper::setChannelGetActionWhenMonitorPolicy \n + * Retrieves ChannelGetActionWhenMonitorPolicy object whose method getWhenKind() \n + * determines if ChannelGetActionWhenMonitorPolicyKind CAFENUM::GET_FROM_CACHE + * CAFENUM::GET_FROM_IOC \n + * \param _handle input: reference handle + * \param awmp input: ChannelGetActionWhenMonitorPolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::setChannelGetActionWhenMonitorPolicy(unsigned int _handle, + ChannelGetActionWhenMonitorPolicy awmp){ +#define __METHOD__ "policyHelper::setChannelGetActionWhenMonitorPolicy(handle, ChannelGetActionWhenMonitorPolicy awmp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if (awmp.getActionKind()!=CAFENUM::GET_FROM_CACHE && awmp.getActionKind()!=CAFENUM::GET_FROM_IOC) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Handle= "<< (*it_handle).getHandle() << " PV= " << (*it_handle).getPV() << endl; + cout << awmp.getActionKind() << " is an unknown policy!" << endl; + cout << "Valid types are: GET_FROM_CACHE (0) or GET_FROM_IOC (1)" << endl; + return ECAFE_INVALID_CAFENUM_POLICY_TYPE; + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelGetActionWhenMonitorPolicy(awmp)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief PolicyHelper::setChannelGetActionWhenMonitorPolicy \n + * Retrieves ChannelGetActionWhenMonitorPolicy object (for all handles) whose method getWhenKind() \n + * determines if ChannelGetActionWhenMonitorPolicyKind CAFENUM::GET_FROM_CACHE + * or CAFENUM::GET_FROM_IOC \n + * \param awmp input: ChannelGetActionWhenMonitorPolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::setChannelGetActionWhenMonitorPolicy(ChannelGetActionWhenMonitorPolicy awmp){ +#define __METHOD__ "policyHelper::setChannelGetActionWhenMonitorPolicy(ChannelGetActionWhenMonitorPolicy awmp)" + + int localStatus=ICAFE_NORMAL; + int gStatus=ICAFE_NORMAL; bool sflag=false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus= setChannelGetActionWhenMonitorPolicy ((*itcs).getHandle(), awmp); + if (localStatus !=ICAFE_NORMAL && !sflag) {gStatus=localStatus; sflag=true;} + } + return gStatus; + + +#undef __METHOD__ +} + +/** + * \brief PolicyHelper::getChannelRequestDataTypePolicy \n + * Retrieves ChannelRequestDataTypePolicy object whose method getRequestKind() \n + * determines if ChannelRequestDataTypePolicyKind CAFENUM::NATIVE_DATATYPE + * or CAFENUM::LOWEST_DATATYPE, \n + * which is the smaller in byte size of type requested and native datatype, \n + * is being used for get/set operations + * \param _handle input: reference handle + * \param crdtp output: ChannelRequestDataTypePolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::getChannelRequestDataTypePolicy(unsigned int _handle, + ChannelRequestDataTypePolicy & crdtp){ +#define __METHOD__ "policyHelper::getChannelRequestDataTypePolicy(handle, ChannelRequestDataTypePolicy & crdtp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + crdtp=(*it_handle).getChannelRequestDataTypePolicy(); + } + else { + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief PolicyHelper::setChannelRequestDataTypePolicy \n + * + * Sets ChannelRequestDataTypePolicy object (for all handles) whose \n + * method setRequestKind(ChannelRequestDataTypePolicyKind) \n + * determines if CAFENUM::NATIVE_DATATYPE or CAFENUM::LOWEST_DATATYPE, \n + * which is the smaller in byte size of type requested and native datatype, \n + * is being used for get/set operations + * \param crdtp input: ChannelRequestDataTypePolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::setChannelRequestDataTypePolicy(ChannelRequestDataTypePolicy crdtp){ +#define __METHOD__ "policyHelper::setChannelRequestDataTypePolicy(ChannelRequestDataTypePolicy crdtp)" + + int localStatus=ICAFE_NORMAL; + int gStatus=ICAFE_NORMAL; bool sflag=false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus= setChannelRequestDataTypePolicy ((*itcs).getHandle(), crdtp); + if (localStatus !=ICAFE_NORMAL && !sflag) {gStatus=localStatus; sflag=true;} + } + return gStatus; + +#undef __METHOD__ +} + + +/** + * \brief PolicyHelper::setChannelRequestDataTypePolicy \n + * + * Sets ChannelRequestDataTypePolicy object whose method \n + * setRequestKind(ChannelRequestDataTypePolicyKind) \n + * determines if CAFENUM::NATIVE_DATATYPE or CAFENUM::LOWEST_DATATYPE, \n + * which is the smaller in byte size of type requested and native datatype, \n + * is being used for get/set operations + * \param _handle input: reference handle + * \param crdtp input: ChannelRequestDataTypePolicy object + * \return status ICAFE_NORMAL else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::setChannelRequestDataTypePolicy(unsigned int _handle, + ChannelRequestDataTypePolicy crdtp){ +#define __METHOD__ "policyHelper::setChannelRequestDataTypePolicy(handle, ChannelRequestDataTypePolicy crdtp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if (crdtp.getRequestKind()!=CAFENUM::NATIVE_DATATYPE && + crdtp.getRequestKind()!=CAFENUM::LOWEST_DATATYPE) { + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Handle= "<< (*it_handle).getHandle() << " PV= " << (*it_handle).getPV() << endl; + cout << crdtp.getRequestKind() << " is an unknown policy!" << endl; + cout << "Valid types are: NATIVE_DATATYPE (0) or LOWEST_DATATYPE (1)" << endl; + return ECAFE_INVALID_CAFENUM_POLICY_TYPE; + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestDataTypePolicy(crdtp)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief PolicyHelper::getChannelRequestPolicyGet \n + * + * Retrieves the Callback Policy for get operations + * + * \param _handle input: reference handle + * \param crpg output: ChannelRequestPolicyGet object + * \return status ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE + * + */ +int PolicyHelper::getChannelRequestPolicyGet(unsigned int _handle, ChannelRequestPolicy & crpg){ +#define __METHOD__ "policyHelper::getChannelRequestPolicyGet(unsigned int handle, ChannelRequestPolicy & crpg)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + crpg=(*it_handle).getChannelRequestPolicyGet(); + } + else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + +#undef __METHOD__ +} + +/** + * \brief PolicyHelper::setChannelRequestPolicyGet \n + * + * Sets the Blocking Policy for get operations + * + * \param _handle input: reference handle + * \param crpg input: Channel.RequestPolicyGet object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::setChannelRequestPolicyGet(unsigned int _handle, ChannelRequestPolicy crpg){ +#define __METHOD__ "policyHelper::setChannelRequestPolicyGet(unsigned int handle, ChannelRequestPolicy crpg)" + + int status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if (crpg.getMethodKind()==WITH_CALLBACK_USER_SUPPLIED && crpg.getHandler()==NULL) { + crpg.setMethodKind(WITH_CALLBACK_DEFAULT); + status=ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << " Policy Conflict!" << endl; + cout << "Handle= "<< (*it_handle).getHandle() << " PV= " << (*it_handle).getPV() << endl; + cout << "Changing ChannelRequestPolicyGet methodKind from WITH_CALLBACK_USER_SUPPLIED " << endl; + cout << "to WITH_CALLBACK_DEFAULT as user supplied handler is NULL!" << endl; + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelRequestPolicyGet(crpg)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + return ECAFE_INVALID_HANDLE; + } + + return status; + + +#undef __METHOD__ +} + + + +/** + * \brief PolicyHelper::setChannelRequestPolicyGet \n + * + * Sets the Blocking Policy for all handles within context + * + * \param crpg input: Channel.RequestPolicyGet object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::setChannelRequestPolicyGet(ChannelRequestPolicy crpg){ +#define __METHOD__ "policyHelper::setChannelRequestPolicyGet(ChannelRequestPolicy crpg)" + + int status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if (crpg.getMethodKind()==WITH_CALLBACK_USER_SUPPLIED && crpg.getHandler()==NULL) { + crpg.setMethodKind(WITH_CALLBACK_DEFAULT); + status=ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + cout << "Handle= "<< (*itcs).getHandle() << " PV= " << (*itcs).getPV() << endl; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << " Policy Conflict!" << endl; + cout << "Changing ChannelRequestPolicyGet BlockingKind from WITH_CALLBACK_USER_SUPPLIED " << endl; + cout << "to WITH_CALLBACK_DEFAULT as user supplied handler is NULL!" << endl; + } + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(itcs, change_channelRequestPolicyGet(crpg)); + if(MUTEX){cafeMutex.unlock();} + + } + + return status; + +#undef __METHOD__ +} + + + +/** + * \brief PolicyHelper::getChannelRequestPolicyPut \n + * + * Retrieves the Blocking Policy for put operations + * + * \param _handle input: reference handle + * \param crpp output: ChannelRequestPolicyPut object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::getChannelRequestPolicyPut(unsigned int _handle, ChannelRequestPolicy & crpp){ +#define __METHOD__ "PolicyHelper::getChannelRequestPolicyPut(unsigned int handle, ChannelRequestPolicy & crpp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + crpp=(*it_handle).getChannelRequestPolicyPut(); + } + else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + + +#undef __METHOD__ +} + + +/** + * \brief PolicyHelper::setChannelRequestPolicyPut \n + * + * Sets the Blocking Policy for put operations + * + * \param _handle input: reference handle + * \param crpp input: ChannelRequestPolicyPut object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::setChannelRequestPolicyPut(unsigned int _handle, ChannelRequestPolicy crpp){ +#define __METHOD__ "PolicyHelper::getChannelRequestPolicyPut(unsigned int handle, ChannelMethodRequesyPolicy crpp)" + + int status=ICAFE_NORMAL; + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if (crpp.getMethodKind()==WITH_CALLBACK_USER_SUPPLIED && crpp.getHandler()==NULL) { + crpp.setMethodKind(WITH_CALLBACK_DEFAULT); + status=ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << " Policy Conflict!" << endl; + cout << "Handle= "<< (*itcs).getHandle() << " PV= " << (*itcs).getPV() << endl; + cout << "Changing ChannelRequestPolicyPut BlockingKind from WITH_CALLBACK_USER_SUPPLIED " << endl; + cout << "to WITH_CALLBACK_DEFAULT as user supplied handler is NULL!" << endl; + } + + + if(MUTEX)cafeMutex.lock(); + handle_index.modify(it_handle, change_channelRequestPolicyPut(crpp)); + if(MUTEX)cafeMutex.unlock(); + + } + else { + return ECAFE_INVALID_HANDLE; + } + + return status; + + +#undef __METHOD__ +} + + +/** + * \brief PolicyHelper::setChannelRequestPolicyPut\n + * + * Sets the Blocking Policy for put operations + * + * \param crpp input: ChannelRequestPolicyPut object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::setChannelRequestPolicyPut(ChannelRequestPolicy crpp){ +#define __METHOD__ "PolicyHelper::getChannelRequestPolicyPut(ChannelMethodRequesyPolicy crpp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + + int status=ICAFE_NORMAL; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + if (crpp.getMethodKind()==WITH_CALLBACK_USER_SUPPLIED && crpp.getHandler()==NULL) { + crpp.setMethodKind(WITH_CALLBACK_DEFAULT); + status=ICAFE_CHANNEL_BLOCKING_POLICY_CONFLICT; + + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << " Policy Conflict!" << endl; + cout << "Handle= "<< (*itcs).getHandle() << " PV= " << (*itcs).getPV() << endl; + cout << "Changing ChannelRequestPolicyPut BlockingKind from WITH_CALLBACK_USER_SUPPLIED " << endl; + cout << "to WITH_CALLBACK_DEFAULT as user supplied handler is NULL!" << endl; + } + + + if(MUTEX)cafeMutex.lock(); + handle_index.modify(itcs, change_channelRequestPolicyPut(crpp)); + if(MUTEX)cafeMutex.unlock(); + + } + + return status; + + +#undef __METHOD__ +} + + +////////////////////////////////// TIMEOUTS /////////////////////////////////////////////////////////// + +/** + * \brief PolicyHelper::getChannelTimeoutPolicyGet \n + * + * Retrieves the Timeout Policy for get operations + * + * \param _handle input: reference handle + * \param ctpg output: ChannelTimeoutPolicyGet object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::getChannelTimeoutPolicyGet(unsigned int _handle, ChannelTimeoutPolicy & ctpg){ +#define __METHOD__ "PolicyHelper::getChannelTimeoutPolicyGet(unsigned int handle, ChannelTimeoutPolicy & ctpg)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + ctpg=(*it_handle).getChannelTimeoutPolicyGet(); + } + else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + + +#undef __METHOD__ +} + + +/** + * \brief PolicyHelper::setChannelTimeoutPolicyGet \n + * + * Sets the Timeout Policy for put operations + * + * \param _handle input: reference handle + * \param ctpg input: ChannelTimeoutPolicyGet object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::setChannelTimeoutPolicyGet(unsigned int _handle, ChannelTimeoutPolicy ctpg){ +#define __METHOD__ "PolicyHelper::getChannelTimeoutPolicyGet(unsigned int handle, ChannelTimeoutPolicy ctpg)" + + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelTimeoutPolicyGet(ctpg)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + + +#undef __METHOD__ +} + + + +/** + * \brief PolicyHelper::getChannelTimeoutPolicyPut \n + * + * Retrieves the Timeout Policy for put operations + * + * \param _handle input: reference handle + * \param ctpp output: ChannelTimeoutPolicyPut object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::getChannelTimeoutPolicyPut(unsigned int _handle, ChannelTimeoutPolicy & ctpp){ +#define __METHOD__ "PolicyHelper::getChannelTimeoutPolicyPut(unsigned int handle, ChannelTimeoutPolicy & cptp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + ctpp=(*it_handle).getChannelTimeoutPolicyPut(); + } + else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + +/** + * \brief PolicyHelper::setChannelTimeoutPolicyPut \n + * + * Sets the Timout Policy for put operations + * + * \param _handle input: reference handle + * \param ctpp input: ChannelTimeoutPolicyPut object + * \return status ICAFE_NORMAL if all OK + * + */ +int PolicyHelper::setChannelTimeoutPolicyPut(unsigned int _handle, ChannelTimeoutPolicy ctpp){ +#define __METHOD__ "PolicyHelper::setChannelTimeoutPolicyPut(unsigned int handle, ChannelTimeoutPolicy cptp)" + + cafeConduit_set_by_handle & handle_index = cs.get (); + cafeConduit_set_by_handle::iterator it_handle; + + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelTimeoutPolicyPut(ctpp)); + if(MUTEX){cafeMutex.unlock();} + + } + else { + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; + + +#undef __METHOD__ +} + + + +/////////////////////////////////////// TIMOUT HELPERS ///////////////////////////////////////////// + + + + +/** + * \brief Allows user to set the policy that governs the corrective adaption of timeouts for put/get operations + * for all handles + * \param b input: bool + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSelfGoverningTimeout(bool b) { +#define __METHOD__ "PolicyHelper::setSelfGoverningTimout(bool b)" + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus=setSelfGoverningTimeout((*itcs).getHandle(),b); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + return gStatus; +#undef __METHOD__ +} + + + +/** + * \brief Allows user to set the policy that governs the corrective adaption of timeouts for put/get operations + * for a given handle + * \param _handle input: Conduit object reference + * \param b input: bool + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSelfGoverningTimeout(unsigned int _handle, bool b){ +#define __METHOD__ "PolicyHelper::setSelfGoverningTimeout(unsigned int _handle, bool b)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_handle).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*it_handle).getChannelTimeoutPolicyGet(); + + ctp.setSelfGoverningTimeout(b); + ctg.setSelfGoverningTimeout(b); + + + if(MUTEX)cafeMutex.lock(); + handle_index.modify(it_handle, change_channelTimeoutPolicyPut(ctp)); + handle_index.modify(it_handle, change_channelTimeoutPolicyGet(ctg)); + if(MUTEX)cafeMutex.unlock(); + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Allows user to rerieve the policy that governs the corrective adaption of timeouts for put/get operations + * for a given handle + * \param _handle input: Conduit object reference + * \param p output: bool for put operations + * \param g output: bool for get operations + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::getSelfGoverningTimeout(unsigned int _handle, bool &p, bool &g){ +#define __METHOD__ "PolicyHelper::setSelfGoverningTimeout(unsigned int _handle, bool &p, bool &g)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_handle).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*it_handle).getChannelTimeoutPolicyGet(); + + p=ctp.getSelfGoverningTimeout(); + g=ctg.getSelfGoverningTimeout(); + } + else { + p=false; g=false; + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + + +/** + * \brief Allows user to set the policy that governs the corrective adaption of timeouts for put operations + * for a given handle + * \param _handle input: Conduit object reference + * \param b input: bool + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSelfGoverningTimeoutPut(unsigned int _handle, bool b){ +#define __METHOD__ "PolicyHelper::setSelfGoverningTimeoutPut(unsigned int _handle, bool b)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + ChannelTimeoutPolicy ctp=(*it_handle).getChannelTimeoutPolicyPut(); + ctp.setSelfGoverningTimeout(b); + + if(MUTEX)cafeMutex.lock(); + handle_index.modify(it_handle, change_channelTimeoutPolicyPut(ctp)); + if(MUTEX)cafeMutex.unlock(); + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Allows user to set the policy that governs the corrective adaption of timeouts for get operations + * for a given handle + * \param _handle input: Conduit object reference + * \param b input: bool + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSelfGoverningTimeoutGet(unsigned int _handle, bool b){ +#define __METHOD__ "PolicyHelper::setSelfGoverningTimeoutGet(unsigned int _handle, bool b)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + ChannelTimeoutPolicy ctg=(*it_handle).getChannelTimeoutPolicyGet(); + ctg.setSelfGoverningTimeout(b); + if(MUTEX)cafeMutex.lock(); + handle_index.modify(it_handle, change_channelTimeoutPolicyGet(ctg)); + if(MUTEX)cafeMutex.unlock(); + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Allows user to retrieve timeout for put/get operations \n + * \param _handle input: Conduit object reference + * \param p output: put timeout + * \param g output: get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::getTimeout(unsigned int _handle, double & p, double & g) { +#define __METHOD__ "PolicyHelper::getTimeout(unsigned int _handle, double &p, double &g)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_handle).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*it_handle).getChannelTimeoutPolicyGet(); + + p=ctp.getTimeout(); + g=ctg.getTimeout(); + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Allows user to retrieve minimum timeout for put/get operations + * \param p: output: put timeout + * \param g: output: get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::getTimeoutMin(double & p, double & g) { +#define __METHOD__ "PolicyHelper::getTimeoutMin(double &p, double &g)" + + double a=TIMEOUT_PEND_IO_MAX ; double b=TIMEOUT_PEND_IO_MAX ; + + bool isFound=false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + ChannelTimeoutPolicy ctp=(*itcs).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*itcs).getChannelTimeoutPolicyGet(); + + a=std::min(a,ctp.getTimeout()); + b=std::min(b,ctg.getTimeout()); + isFound=true; + } + if (isFound) { + p=a; g=b; + } + else { + p=DEFAULT_TIMEOUT_PEND_IO; + g=DEFAULT_TIMEOUT_PEND_IO; + } + + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Allows user to retrieve minimum timeout for put/get operations + * \param p: output: put timeout + * \param g: output: get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::getTimeoutMax(double & p, double & g) { +#define __METHOD__ "PolicyHelper::getTimeoutMin(double &p, double &g)" + + double a=TIMEOUT_PEND_IO_MIN ; double b=TIMEOUT_PEND_IO_MIN; + + bool isFound=false; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + ChannelTimeoutPolicy ctp=(*itcs).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*itcs).getChannelTimeoutPolicyGet(); + + a=std::max(a,ctp.getTimeout()); + b=std::max(b,ctg.getTimeout()); + isFound=true; + } + if (isFound) { + p=a; g=b; + } + else { + p=DEFAULT_TIMEOUT_PEND_IO; + g=DEFAULT_TIMEOUT_PEND_IO; + } + + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + +/** + * \brief Prints timeout for put/get operations + * \return ICAFE_NORMAL + */ +int PolicyHelper::printTimeout() { +#define __METHOD__ "PolicyHelper::printTimeout()" + + + short pvstrl=0; + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + pvstrl=std::max(pvstrl,(short) (*itcs).pv.length()); + } + + string spv="Process Variable Name"; + + cout << "---------------------TIMEOUTS---------------------" << endl; + printf("%s %s %*s %s %s\n", "Hndle",spv.c_str(), + std::max((int) (pvstrl-spv.length()),(int) 0),"","PUTtim","GETtim"); + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + + ChannelTimeoutPolicy ctp=(*itcs).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*itcs).getChannelTimeoutPolicyGet(); + //cout << std::setw(40) << cc.pv << std::setw(3) << cc.getHandle() + // << std::setw(10) << ctp.getTimeout() + // << std::setw(10) << ctg.getTimeout() << endl; + printf("%5d %s %*s %6.3f %6.3f\n", (*itcs).getHandle(),(*itcs).pv.c_str(), + std::max((int) (pvstrl-(*itcs).pv.length()),(int) 0),"", + ctp.getTimeout(), ctg.getTimeout() ) ; + } + cout << "--------------------------------------------------" << endl; + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Prints timeout for put/get operations for given handle + * \param _handle input: handle to Conduit Object + * \return ICAFE_NORMAL + */ +int PolicyHelper::printTimeout(unsigned int _handle) { +#define __METHOD__ "PolicyHelper::printTimeout(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + //Conduit cc=(*it_handle); + ChannelTimeoutPolicy ctp=(*it_handle).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*it_handle).getChannelTimeoutPolicyGet(); + + string spv="Process Variable Name"; + int wantedl= std::max(28,(int) (*it_handle).pv.length()); + printf("%s %s %*s %s %s\n", "Handle",spv.c_str(), + std::max((int) (wantedl-spv.length()),(int) 0),"","PUTtim","GETtim"); + printf("%5d %s %*s %6.3f %6.3f\n", (*it_handle).getHandle(),(*it_handle).pv.c_str(), + std::max((int)(wantedl-(*it_handle).pv.length()),(int) 0),"", + ctp.getTimeout(),ctg.getTimeout()); + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + + +/** + * \brief Allows user to reset timeout for put/get operations to default values + * for all handles + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setTimeoutToDefault() { +#define __METHOD__ "PolicyHelper::setTimeoutToDefault()" + + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus=setTimeoutToDefault((*itcs).getHandle()); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + return gStatus; +#undef __METHOD__ +} + + + +/** + * \brief Allows user to reset timeout for put/get operations to default values + * for given handle + * \param _handle input: Conduit object reference + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setTimeoutToDefault(unsigned int _handle) { +#define __METHOD__ "PolicyHelper::setTimeoutToDefault(unsigned int _handle)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_handle).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*it_handle).getChannelTimeoutPolicyGet(); + + double a=(double) NULL, b= (double) NULL; + a=ctp.setTimeoutToDefault(); + b=ctg.setTimeoutToDefault(); + + if(MUTEX){cafeMutex.lock();} + handle_index.modify(it_handle, change_channelTimeoutPolicyPut(ctp)); + handle_index.modify(it_handle, change_channelTimeoutPolicyGet(ctg)); + if(MUTEX){cafeMutex.unlock();} + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + + +/** + * \brief Allows user to set timeout for put/get operations (within allowed default min/max values) + * for all handles + * \param p input: put timeout + * \param g input: get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setTimeout(double p, double g) { +#define __METHOD__ "PolicyHelper::setTimeout(double p, double g)" + + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itcs = cs.begin(); itcs != cs.end(); ++itcs) { + localStatus=setTimeout((*itcs).getHandle(),p,g); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + return gStatus; +#undef __METHOD__ +} + + + +/** + * \brief Allows user to set timeoout for put/get operations (within allowed default min/max values) + * \param _handle input: Conduit object reference + * \param p input: put timeout + * \param g input: get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setTimeout(unsigned int _handle, double p, double g) { +#define __METHOD__ "PolicyHelper::setTimeout(unsigned int _handle, double p, double g)" + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + if (it_handle != handle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_handle).getChannelTimeoutPolicyPut(); + ChannelTimeoutPolicy ctg=(*it_handle).getChannelTimeoutPolicyGet(); + + double a=(double) NULL, b= (double) NULL; + if (p!=(double) NULL) {a=ctp.setTimeout(p);} + if (g!=(double) NULL) {b=ctg.setTimeout(g);} + + if (a != p || b != g) { + cout << "------------------------------------------------------" << endl; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "PV = " << (*it_handle).pv << " Handle = " << (*it_handle).handle; + cout << ": Requested timeout is not within allowed limits" << endl; + + if (a != p) { + cout << "Timeout Granted (Requested) for put operation = " + << a << " (" << p <<")" <(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + ChannelTimeoutPolicy ctp=(*it_groupHandle).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*it_groupHandle).getChannelTimeoutPolicySGGet(); + + ctp.setSelfGoverningTimeout(b); + ctg.setSelfGoverningTimeout(b); + if(MUTEX)cafeMutex.lock(); + groupHandle_index.modify(it_groupHandle, change_channelTimeoutPolicySGPut(ctp)); + groupHandle_index.modify(it_groupHandle, change_channelTimeoutPolicySGGet(ctg)); + if(MUTEX)cafeMutex.unlock(); + //cout << __METHOD__ << " Setting group Handle " << _gHandle << " SG sef-gov policy to " << b << endl; + + + } + else { + cafeStatus.report(ECAFE_INVALID_GROUP_HANDLE); + return ECAFE_INVALID_GROUP_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + +/** + * \brief Allows user to retrieve the policy that governs the corrective adaption of timeouts for put/get operations + * for a given handle + * \param _gHandle input: Conduit Group object reference + * \param p output: bool for put operations + * \param g output: bool for get operations + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::getSGSelfGoverningTimeout(unsigned int _gHandle, bool &p, bool &g){ +#define __METHOD__ "PolicyHelper::getSGSelfGoverningTimeout(unsigned int _gHandle, bool &p, bool &g)" + cafeGroup_set_by_groupHandle & groupHandle_index=gs.get(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_groupHandle).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*it_groupHandle).getChannelTimeoutPolicySGGet(); + + p=ctp.getSelfGoverningTimeout(); + g=ctg.getSelfGoverningTimeout(); + } + else { + p=false; g=false; + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + + +/** + * \brief Allows user to set the policy that governs the corrective adaption of timeouts for SG put operations + * for a given group handle + * \param _gHandle input: Conduit Group object reference + * \param b input: bool + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSGSelfGoverningTimeoutPut(unsigned int _gHandle, bool b){ +#define __METHOD__ "PolicyHelper::setSGSelfGoverningTimeoutPut(unsigned int _ghandle, bool b)" + + cafeGroup_set_by_groupHandle & groupHandle_index=gs.get(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_groupHandle).getChannelTimeoutPolicySGPut(); + + ctp.setSelfGoverningTimeout(b); + if(MUTEX)cafeMutex.lock(); + groupHandle_index.modify(it_groupHandle, change_channelTimeoutPolicySGPut(ctp)); + if(MUTEX)cafeMutex.unlock(); + + } + else { + cafeStatus.report(ECAFE_INVALID_GROUP_HANDLE); + return ECAFE_INVALID_GROUP_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + +/** + * \brief Allows user to set the policy that governs the corrective adaption of timeouts for SG get operations + * for a given group handle + * \param _gHandle input: Conduit Group object reference + * \param b input: bool + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSGSelfGoverningTimeoutGet(unsigned int _gHandle, bool b){ +#define __METHOD__ "PolicyHelper::setSGSelfGoverningTimeoutGet(unsigned int _gHandle, bool b)" + + cafeGroup_set_by_groupHandle & groupHandle_index=gs.get(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + + ChannelTimeoutPolicy ctg=(*it_groupHandle).getChannelTimeoutPolicySGGet(); + + ctg.setSelfGoverningTimeout(b); + + if(MUTEX)cafeMutex.lock(); + groupHandle_index.modify(it_groupHandle, change_channelTimeoutPolicySGGet(ctg)); + if(MUTEX)cafeMutex.unlock(); + } + else { + cafeStatus.report(ECAFE_INVALID_GROUP_HANDLE); + return ECAFE_INVALID_GROUP_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + +/** + * \brief Allows user to retrieve minimum timeout for SG put/get operations + * \param p: output: SG put timeout + * \param g: output: SG get timeout + * \return ICAFE_NORMAL + */ +int PolicyHelper::getSGTimeoutMin(double & p, double & g) { +#define __METHOD__ "PolicyHelper::getSGTimeoutMin(double &p, double &g)" + + double a=TIMEOUT_PEND_IO_MAX ; double b=TIMEOUT_PEND_IO_MAX ; + bool isFound=false; + // Loop through all elements + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + + ChannelTimeoutPolicy ctp=(*itgs).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*itgs).getChannelTimeoutPolicySGGet(); + + a=std::min(a,ctp.getTimeout()); + b=std::min(b,ctg.getTimeout()); + + isFound=true; + } + if (isFound) { + p=a; g=b; + } + else { + p=DEFAULT_TIMEOUT_SG_PEND_IO; + g=DEFAULT_TIMEOUT_SG_PEND_IO; + } + + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Allows user to retrieve minimum timeout for put/get operations + * \param p: output: SG put timeout + * \param g: output: SG get timeout + * \return ICAFE_NORMAL + */ +int PolicyHelper::getSGTimeoutMax(double & p, double & g) { +#define __METHOD__ "PolicyHelper::getSGTimeoutMin(double &p, double &g)" + + double a=TIMEOUT_PEND_IO_MIN ; double b=TIMEOUT_PEND_IO_MIN; + bool isFound=false; + // Loop through all elements + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + + ChannelTimeoutPolicy ctp=(*itgs).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*itgs).getChannelTimeoutPolicySGGet(); + + a=std::max(a,ctp.getTimeout()); + b=std::max(b,ctg.getTimeout()); + + isFound=true; + } + if (isFound) { + p=a; g=b; + } + else { + p=DEFAULT_TIMEOUT_SG_PEND_IO; + g=DEFAULT_TIMEOUT_SG_PEND_IO; + } + + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + + +/** + * \brief Allows user to reset synchronous group timeout for put/get operations to default values + * for all group handles + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSGTimeoutToDefault() { +#define __METHOD__ "PolicyHelper::setSGTimeoutToDefault()" + + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + localStatus=setSGTimeoutToDefault((*itgs).getGroupHandle()); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + return gStatus; +#undef __METHOD__ +} + + + +/** + * \brief Allows user to reset synchronous group timeout for put/get operations to default values + * for given handle + * \param _gHandle input: ConduitGroup object reference + * \return ICAFE_NORMAL or ECAFE_INVALID_HANDLE + */ +int PolicyHelper::setSGTimeoutToDefault(unsigned int _gHandle) { +#define __METHOD__ "PolicyHelper::setSGTimeoutToDefault(unsigned int _gHandle)" + + cafeGroup_set_by_groupHandle & groupHandle_index=gs.get(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_groupHandle).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*it_groupHandle).getChannelTimeoutPolicySGGet(); + + double a=(double) NULL, b= (double) NULL; + a=ctp.setTimeoutToDefault(); + b=ctg.setTimeoutToDefault(); + + if(MUTEX){cafeMutex.lock();} + groupHandle_index.modify(it_groupHandle, change_channelTimeoutPolicySGPut(ctp)); + groupHandle_index.modify(it_groupHandle, change_channelTimeoutPolicySGGet(ctg)); + if(MUTEX){cafeMutex.unlock();} + } + else { + cafeStatus.report(ECAFE_INVALID_GROUP_HANDLE); + return ECAFE_INVALID_GROUP_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + + + + + + +/** + * \brief Prints timeout for SG put/get operations + * \return ICAFE_NORMAL + */ +int PolicyHelper::printSGTimeout() { +#define __METHOD__ "PolicyHelper::printSGTimeout()" + + + short pvstrl=0; + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + pvstrl=std::max(pvstrl,(short) (*itgs).groupName.length()); + } + + string spv="Group"; + + cout << "---------------------TIMEOUTS---------------------" << endl; + printf("%s %s %*s %s %s\n", "Hndle",spv.c_str(), + std::max((int) (pvstrl-spv.length()),(int) 0),"","PUTtim","GETtim"); + // Loop through all elements + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + + ChannelTimeoutPolicy ctp=(*itgs).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*itgs).getChannelTimeoutPolicySGGet(); + + printf("%5d %s %*s %6.3f %6.3f\n", (*itgs).getGroupHandle(),(*itgs).groupName.c_str(), + std::max((int) (pvstrl-(*itgs).groupName.length()),(int) 0),"", + ctp.getTimeout(), ctg.getTimeout() ) ; + } + cout << "--------------------------------------------------" << endl; + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Prints timeout for put/get operations for given handle + * \param _gHandle input: handle to ConduitGroup Object + * \return ICAFE_NORMAL + */ +int PolicyHelper::printSGTimeout(unsigned int _gHandle) { +#define __METHOD__ "PolicyHelper::printTimeout(unsigned int _handle)" + cafeGroup_set_by_groupHandle & groupHandle_index=gs.get(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + //Conduit cc=(*it_handle); + ChannelTimeoutPolicy ctp=(*it_groupHandle).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*it_groupHandle).getChannelTimeoutPolicySGGet(); + + string spv="Group"; + int wantedl= std::max(28,(int) (*it_groupHandle).groupName.length()); + printf("%s %s %*s %s %s\n", "Handle",spv.c_str(), + std::max((int) (wantedl-spv.length()),(int) 0),"","PUTtim","GETtim"); + printf("%5d %s %*s %6.3f %6.3f\n", (*it_groupHandle).getGroupHandle(),(*it_groupHandle).groupName.c_str(), + std::max((int)(wantedl-(*it_groupHandle).groupName.length()),(int) 0),"", + ctp.getTimeout(),ctg.getTimeout()); + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + + + + + + +/** + * \brief Allows user to retrieve timeout for SG put/get operations \n + * \param _gHandle input: Conduit Group object reference + * \param p output: SG put timeout + * \param g output: SG get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_GROUP_HANDLE + */ +int PolicyHelper::getSGTimeout(unsigned int _gHandle, double & p, double & g) { +#define __METHOD__ "PolicyHelper::getSGTimeout(unsigned int _gHandle, double &p, double &g)" + cafeGroup_set_by_groupHandle & groupHandle_index=gs.get(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_groupHandle).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*it_groupHandle).getChannelTimeoutPolicySGGet(); + + p=ctp.getTimeout(); + g=ctg.getTimeout(); + } + else { + cafeStatus.report(ECAFE_INVALID_GROUP_HANDLE); + return ECAFE_INVALID_GROUP_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Allows user to set timeout for SG put/get operations (within allowed default min/max values) + * for all handles + * \param p input: SG put timeout + * \param g input: SG get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_GROUP_HANDLE + */ +int PolicyHelper::setSGTimeout(double p, double g) { +#define __METHOD__ "PolicyHelper::setSGTimeout(double p, double g)" + + int gStatus=ICAFE_NORMAL; + int localStatus; + + // Loop through all elements + for (itgs = gs.begin(); itgs != gs.end(); ++itgs) { + localStatus=setSGTimeout((*itgs).getGroupHandle(),p,g); + if (localStatus !=ICAFE_NORMAL) {gStatus=localStatus;} + } + return gStatus; +#undef __METHOD__ +} + +/** + * \brief Allows user to set timeoout for SG put/get operations (within allowed default min/max values) + * \param _gHandle input: Conduit Group object reference + * \param p input: SG put timeout + * \param g input: SG get timeout + * \return ICAFE_NORMAL or ECAFE_INVALID_GROUP_HANDLE + */ +int PolicyHelper::setSGTimeout(unsigned int _gHandle, double p, double g) { +#define __METHOD__ "PolicyHelper::setSGTimeout(unsigned int _handle, double p, double g)" + cafeGroup_set_by_groupHandle & groupHandle_index=gs.get(); + cafeGroup_set_by_groupHandle::iterator it_groupHandle; + it_groupHandle = groupHandle_index.find(_gHandle); + if (it_groupHandle != groupHandle_index.end()) { + + ChannelTimeoutPolicy ctp=(*it_groupHandle).getChannelTimeoutPolicySGPut(); + ChannelTimeoutPolicy ctg=(*it_groupHandle).getChannelTimeoutPolicySGGet(); + + double a=(double) NULL, b= (double) NULL; + if (p!=(double) NULL) {a=ctp.setTimeout(p);} + if (g!=(double) NULL) {b=ctg.setTimeout(g);} + + if (a != p || b != g) { + cout << "------------------------------------------------------" << endl; + cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl; + cout << "Synch. Group = " << (*it_groupHandle).groupName << " Handle = " << (*it_groupHandle).groupHandle; + cout << ": Requested timeout is not within allowed limits" << endl; + + if (a != p) { + cout << "Timeout Granted (Requested) for put operation = " + << a << " (" << p <<")" < +#include +#include + +vector SplitString(const char *str, char c) +{ + vector result; + do { + const char *begin = str; + while(*str != c && *str) { + str++; + } + result.push_back(string(begin, str)); + } while (0 != *str++); + return result; +} + + +const QString&restorePVGroupXMLParser::tagConfig = "config"; +const QString&restorePVGroupXMLParser::tagGroup = "group"; +const QString&restorePVGroupXMLParser::tagNPV = "npv"; +const QString&restorePVGroupXMLParser::tagDescription = "description"; +const QString&restorePVGroupXMLParser::tagStatusGroup = "statusGroup"; +const QString&restorePVGroupXMLParser::tagMember = "member"; +const QString&restorePVGroupXMLParser::tagName = "name"; +const QString&restorePVGroupXMLParser::tagNelem = "nelem"; +const QString&restorePVGroupXMLParser::tagStatus = "status"; +const QString&restorePVGroupXMLParser::tagRule = "rule"; +const QString&restorePVGroupXMLParser::tagVal = "val"; +const QString&restorePVGroupXMLParser::tagSettable = "settable"; + +restorePVGroupXMLParser::restorePVGroupXMLParser() { icount=0; +} + +restorePVGroupXMLParser::~restorePVGroupXMLParser() { +} + + + +bool restorePVGroupXMLParser::startElement(const QString& namespaceURI, const QString& localName, + const QString& qName, const QXmlAttributes& atts) { + + + bool error = false; + + if (localName.compare(tagConfig, Qt::CaseInsensitive) == 0) { + + state = WaitingForConfig; + } else if (localName.compare(tagGroup, Qt::CaseInsensitive) == 0) { + group = PVGroup(); + group.setName ( atts.value("id").toAscii().constData() ); + pvd = new PVDataHolder[500]; //read in npv + state = WaitingForGroup; + } else if (localName.compare(tagNPV, Qt::CaseInsensitive) == 0) { + state = WaitingForNPV; + } else if (localName.compare(tagDescription, Qt::CaseInsensitive) == 0) { + state = WaitingForDescription; + } else if (localName.compare(tagStatusGroup, Qt::CaseInsensitive) == 0) { + state = WaitingForStatusGroup; + } else if (localName.compare(tagMember, Qt::CaseInsensitive) == 0) { + state = WaitingForMember; + } else if (localName.compare(tagName, Qt::CaseInsensitive) == 0) { + state = WaitingForName; + } else if (localName.compare(tagNelem, Qt::CaseInsensitive) == 0) { + state = WaitingForNelem; + } else if (localName.compare(tagStatus, Qt::CaseInsensitive) == 0) { + state = WaitingForStatus; + } else if (localName.compare(tagRule, Qt::CaseInsensitive) == 0) { + state = WaitingForRule; + } else if (localName.compare(tagVal, Qt::CaseInsensitive) == 0) { + + state = WaitingForVal; + } else if (localName.compare(tagSettable, Qt::CaseInsensitive) == 0) { + state = WaitingForSettable; + } else { + error = true; + } + return !error; +} + +bool restorePVGroupXMLParser::endElement(const QString& namespaceURI, +const QString& localName, const QString& qName) { + if (localName.compare(tagGroup, Qt::CaseInsensitive) == 0) { + group.setPVData(pvd); + group.npv=icount; + + + } else if (localName.compare(tagMember, Qt::CaseInsensitive) == 0) { + if(settable)++icount; + } else if (localName.compare(tagNPV, Qt::CaseInsensitive) == 0) { + + + } + + return true; +} + + + + +bool restorePVGroupXMLParser::characters(const QString& ch) { + + bool error = false; + + std::string data = ch.trimmed().toAscii().constData(); + + + switch (state) { + case WaitingForDescription: + + case WaitingForGroup: + case WaitingForConfig: + case WaitingForStatusGroup: + + case WaitingForMember: + + break; + case WaitingForNPV: + + break; + case WaitingForName: + + strcpy(pvd[icount].pv,data.c_str()); + break; + case WaitingForNelem: + pvd[icount].setNelem ( strtol(data.c_str(), NULL, 10) ); + break; + case WaitingForStatus: + + break; + case WaitingForRule: + + break; + case WaitingForVal: + + //if elements > 1, then break up string + //read no of elements and break up with space as deliminater! + if ( pvd[icount].getNelem() >1) { + //parse string + + vector v; v.clear(); v.reserve(pvd[icount].getNelem()); + v = SplitString(data.c_str(), ' '); + dbr_string_t * arr = new dbr_string_t[ pvd[icount].getNelem()]; + + for (size_t i=0; i::putString + (const unsigned int _handle, dbr_string_t * val) +{ +#define __METHOD__ "Transpose::putString" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getPutBuffer (); + nelem = (*it_handle).getChannelRequestMetaPrimitive().getNelem(); + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaPrimitive().getDbrDataType(); + + dbr_ctrl_enum * dataEnum; + dbr_short_t noStrings =0; + + bool allStringsAreValid=true; + // Client is String + // Native type is one of the following + + istringstream ss; + + switch(dbrTypeRequest_DataBuffer) { + + case DBR_STRING://0 + + + for (unsigned int i=0; i>s; + + if ( !ss.fail()) { + *((dbr_short_t *) (PVDataL) + i ) = s; + } + else { + cout << __FILE__<< "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_SHORT CONVERSION for ELEMENT " << i + << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO SHORT; PUT REQUEST NOT MADE!" << endl; + //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + allStringsAreValid=false; + } + } + break; + + case DBR_FLOAT://2 + for (unsigned int i=0; i>f; + + if ( !ss.fail()) { + *((dbr_float_t *) (PVDataL) + i ) = f; + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_FLOAT CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO FLOAT; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE! " << endl; + allStringsAreValid=false; + } + } + break; + + case DBR_ENUM: //3 + // CHANGE THE STRING TO CORRESPONDING ENUM! + dataEnum = (dbr_ctrl_enum *) (*it_handle).getCtrlBuffer(); + char stig [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]; + + noStrings = ((struct dbr_ctrl_enum *) dataEnum)->no_str; + + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig )) ; + + + for (unsigned int i=0; i= b) + { + if (*c == ' ') { + *c = '\0'; + // This was reported at www.programmingforums.org/thread35790.html to cause a bus error!? + } + else { + break; + } + c--; + } + + sprintf(a, "%s", b); + + bool isValidString=false; + for (int j=0; j>us; + + // Is this a valid number? + if ( !ss.fail()) { + if (us==0 || (us>0 && us >ch; + char *b = (char *) val[i]; + + + //cout << b << " " << *b << endl; + //cout << (unsigned short *) b << " " << (unsigned short *) *b << endl; + + + if ( !ss.fail()) { + *((dbr_char_t *) (PVDataL) + i ) = ch; + } + + else if (b != '\0') { + + *((dbr_char_t *) (PVDataL) + i ) = *b; + + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_CHAR CONVERSION for ELEMENT index " << i << " in array of length " << nelem; + cout << ", i.e., with index range [0-" << (nelem-1) << "] " << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO UNSIGNED CHAR; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + allStringsAreValid=false; + } + } + break; + + case DBR_LONG: //5 + for (unsigned int i=0; i>l; + + if ( !ss.fail()) { + *((dbr_long_t *) (PVDataL) + i ) = l; + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_LONG CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO LONG; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + + allStringsAreValid=false; + } + } + break; + + case DBR_DOUBLE: //6 + for (unsigned int i=0; i>d; + + if ( !ss.fail()) { + *((dbr_double_t *) (PVDataL) + i ) = d; + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i]; + cout << " TO DOUBLE; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //PUT REQUEST NOT MADE!" << endl; + + allStringsAreValid=false; + + // *((dbr_double_t *) (PVDataL) + i ) = (dbr_double_t) strtod(val[i],NULL); + } + + }//for + break; + } //switch + + if(!allStringsAreValid) {return ECAFE_NO_CONVERT;} + else {return ICAFE_NORMAL;} + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + +/** + * \brief Converts data from CTYPE to native type + * in preparation for transmission to CA Server + * \param _handle input: handel to Conduit object + * \param val input: Array of values of datatype dbr_string_t + * \return ICAFE_NORMAL as local data conversion should not incur an error + */ +int Transpose::putString(const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val) +{ +#define __METHOD__ "Transpose::putString " + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getPutBuffer (); + nelem = (*it_handle).getChannelRequestMetaPrimitive().getNelem(); + + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaPrimitive().getDbrDataType(); + + + dbr_ctrl_enum * dataEnum; + dbr_short_t noStrings =0; + + bool allStringsAreValid=true; + // Client is String + // Native type is one of the following + + istringstream ss; + + switch(dbrTypeRequest_DataBuffer) { + + case DBR_STRING://0 + + for (unsigned int i=0; i>s; + + if ( !ss.fail()) { + *((dbr_short_t *) (PVDataL) + i ) = s; + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_SHORT CONVERSION for ELEMENT " << i + << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i].str; + cout << " TO SHORT; PUT REQUEST NOT MADE!" << endl; + //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + allStringsAreValid=false; + } + } + break; + + case DBR_FLOAT://2 + for (unsigned int i=0; i>f; + + if ( !ss.fail()) { + *((dbr_float_t *) (PVDataL) + i ) = f; + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_FLOAT CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i].str; + cout << " TO FLOAT; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE! " << endl; + allStringsAreValid=false; + } + } + break; + + case DBR_ENUM: //3 + // CHANGE THE STRING TO CORRESPONDING ENUM! + dataEnum = (dbr_ctrl_enum *) (*it_handle).getCtrlBuffer(); + char stig [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]; + + noStrings = ((struct dbr_ctrl_enum *) dataEnum)->no_str; + + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig )) ; + + + for (unsigned int i=0; i= b) + { + if (*c == ' ') { + *c = '\0'; + // This was reported at www.programmingforums.org/thread35790.html to cause a bus error!? + } + else { + break; + } + c--; + } + + sprintf(a, "%s", b); + + bool isValidString=false; + for (int j=0; j>us; + + // Is this a valid number? + if ( !ss.fail()) { + if (us==0 || (us>0 && us >ch; + + char *b = (char *) val[i].str; + + if ( !ss.fail()) { + *((dbr_char_t *) (PVDataL) + i ) = ch; + } + else if (b != '\0') { + *((dbr_char_t *) (PVDataL) + i ) = *b; + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_CHAR CONVERSION for ELEMENT index " << i << " in array of length " << nelem; + cout << ", i.e., with index range [0-" << (nelem-1) << "] " << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i].str; + cout << " TO UNSIGNED CHAR; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + allStringsAreValid=false; + } + + } + break; + + case DBR_LONG: //5 + for (unsigned int i=0; i>l; + + if ( !ss.fail()) { + *((dbr_long_t *) (PVDataL) + i ) = l; + } + else { + cout << __FILE__ << "//" << __METHOD__ << "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_int CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i].str; + cout << " TO LONG; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //NOT MADE!" << endl; + + allStringsAreValid=false; + } + } + break; + + case DBR_DOUBLE: //6 + for (unsigned int i=0; i>d; + + if ( !ss.fail()) { + *((dbr_double_t *) (PVDataL) + i ) = d; + } + else { + cout << __FILE__ << "//" << __METHOD__<< "//" << __LINE__ << endl; + cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION for ELEMENT " << i << " of " << nelem << " !! " << endl; + cout << "***WARNING*** COULD NOT CONVERT: "; + cout << val[i].str; + cout << " TO DOUBLE; PUT REQUEST NOT MADE!" << endl; //AT THE MERCY OF THE CA SERVER!" << endl; //PUT REQUEST NOT MADE!" << endl; + + allStringsAreValid=false; + + // *((dbr_double_t *) (PVDataL) + i ) = (dbr_double_t) strtod(val[i],NULL); + } + + }//for + break; + } //switch + + if(!allStringsAreValid) {return ECAFE_NO_CONVERT;} + else {return ICAFE_NORMAL;} + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; + +#undef __METHOD__ +} + + +/** + * \brief Retrieves data transmitted by CA with dbrTypeRequest_DataBuffer + * and then converts to dbr_string_t (char[40]) + * \param _handle input: handle to Conduit object + * \param val output: array of CTYPE datatype + * \param alarmStatus output: dbr_short_t + * \param alarmSeverity output: dbr_short_t + * \param ts output: epicsTimeStamp + * \param isCacheRequest input: bool, set to true for cached data + * \return ICAFE_NORMAL as local data conversion should not incur an error + */ +int Transpose::get( + const unsigned int _handle, + dbr_string_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, + bool isCacheRequest) +{ +#define __METHOD__ "Transpose::get()" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getDataBuffer (); + offset = (*it_handle).getChannelRequestMetaDataClient().getOffset(); + + + + if(isCacheRequest) { + offset = (*it_handle).getChannelRequestMetaData().getOffset( ); + nelem = (*it_handle).getChannelRequestMetaData().getNelemCache(); //-(*it_handle).getChannelRequestMetaData().getOffset(); //-offset; + //nelem = min(nelem, (*it_handle).getChannelRequestMetaData().getNelem()-offset); + } + else { + nelem = (*it_handle).getChannelRequestMetaData().getNelem()-offset; + + } + + + + //Something wrong, just read last element + if (nelem <=0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Something funny with the offset; just read last element! " << endl; + cout << "Changing offset from=" << offset; + + offset = (*it_handle).getChannelRequestMetaData().getNelem()-1; + if(isCacheRequest) { + nelem = (*it_handle).getChannelRequestMetaData().getNelemCache(); //-(*it_handle).getChannelRequestMetaData().getOffset(); //-offset; + } + else { + nelem = (*it_handle).getChannelRequestMetaData().getNelem()-offset; + } + + cout << " to=" << offset << endl; + } + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaData().getDbrDataType(); + + + dbr_ctrl_enum * dataEnum; + dbr_short_t noStrings =0; + + ts.secPastEpoch=0; + ts.nsec =0; + alarmStatus =0; + alarmSeverity =0; + /// stringstream ssss;//create a stringstream + + //dbrTypeRequest_DataBuffer is the chtype used in ca_get + //Only ever fille the Union with the native type as + + + switch (dbrTypeRequest_DataBuffer) + { + case DBR_CHAR: + for (unsigned int i=0; icharval)+i+offset))); + } + break; + + case DBR_FLOAT: + for (unsigned int i=0; ifltval)+i+offset))); + } + break; + + case DBR_DOUBLE: + for (unsigned int i=0; idoubleval)+i+offset))); + } + break; + + case DBR_SHORT: + for (unsigned int i=0; ishrtval)+i+offset))); + } + break; + + case DBR_LONG: + for (unsigned int i=0; ilongval)+i+offset))); + } + break; + + case DBR_ENUM: + for (unsigned int i=0; ino_str; + + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig )) ; + + + + + unsigned int noEmptyStrings=0; + //Check for empty strings: + for (unsigned int j=0; jtenmval.value)+i+offset)) < noStrings) && (noStrings!=noEmptyStrings)) { + sprintf(val[i], "%s", stig[(*(&((PVDataL)->tenmval.value)+i+offset))] ); + } + else { + sprintf(val[i], "%d", (*(&((PVDataL)->tenmval.value)+i+offset)) ); + if ( ((*(&((PVDataL)->tenmval.value)+i+offset)) >= noStrings) ) { + cout << "*** WARNING FROM " << __METHOD__ << " *** " << endl; + cout << "ENUM UNSIGNED SHORT VALUE IS GREATER THAN THE NO OF ENUMERATED TYPES" << endl; + cout << "VALUE (unsigned short) = " << (*(&((PVDataL)->tenmval.value)+i+offset)) << endl; + cout << "NO OF ENUMERATED STRINGS = " << noStrings << " WITH VALUES: " << endl; + for (unsigned int j=0; jenmval)+i+offset))] ); + // } + } + break; + + case DBR_STRING: + memcpy( val, &(&((PVDataL)->strval))[offset], sizeof(dbr_string_t)*nelem) ; + break; + + + case DBR_STS_CHAR: + for (unsigned int i=0; ischrval.value)+i+offset))); + } + alarmStatus = ((struct dbr_sts_char *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_char *) PVDataL)->severity; + break; + + case DBR_STS_FLOAT: + for (unsigned int i=0; isfltval.value)+i+offset))); + } + alarmStatus = ((struct dbr_sts_float *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_float *) PVDataL)->severity; + break; + + case DBR_STS_DOUBLE: + for (unsigned int i=0; isdblval.value)+i+offset))); + } + alarmStatus = ((struct dbr_sts_double *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_double *) PVDataL)->severity; + break; + + case DBR_STS_SHORT: + for (unsigned int i=0; isshrtval.value)+i+offset))); + } + alarmStatus = ((struct dbr_sts_short *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_short *) PVDataL)->severity; + break; + + case DBR_STS_LONG: + for (unsigned int i=0; islngval.value)+i+offset))); + } + alarmStatus = ((struct dbr_sts_int *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_int *) PVDataL)->severity; + break; + + case DBR_STS_ENUM: + for (unsigned int i=0; ino_str; + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig)) ; + + + + unsigned int noEmptyStrings=0; + //Check for empty strings: + for (unsigned int j=0; jtenmval.value)+i+offset)) < noStrings) && (noStrings!=noEmptyStrings)) { + sprintf(val[i], "%s", stig[(*(&((PVDataL)->tenmval.value)+i+offset))] ); + } + else { + sprintf(val[i], "%d", (*(&((PVDataL)->tenmval.value)+i+offset)) ); + if ( ((*(&((PVDataL)->tenmval.value)+i+offset)) >= noStrings) ) { + cout << "*** WARNING FROM " << __METHOD__ << " *** " << endl; + cout << "ENUM UNSIGNED SHORT VALUE IS GREATER THAN THE NO OF ENUMERATED TYPES" << endl; + cout << "VALUE (unsigned short) = " << (*(&((PVDataL)->tenmval.value)+i+offset)) << endl; + cout << "NO OF ENUMERATED STRINGS = " << noStrings << " WITH VALUES: " << endl; + for (unsigned int j=0; jsenmval.value)+i+offset))] ); + //} + } + alarmStatus = ((struct dbr_sts_enum *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_enum *) PVDataL)->severity; + break; + + case DBR_STS_STRING: + for (unsigned int i=0; isstrval.value)+i+offset))) ; + } + alarmStatus = ((struct dbr_sts_string *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_string *) PVDataL)->severity; + break; + + + case DBR_TIME_CHAR: + for (unsigned int i=0; itchrval.value)+i+offset))); + } + //cout << "TRANSPOSE " << val[0] << endl; + ts = ((struct dbr_time_char *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_char *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_char *) PVDataL)->severity; + break; + + case DBR_TIME_FLOAT: + + for (unsigned int i=0; itfltval.value)+i+offset))); + } + ts = ((struct dbr_time_float *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_float *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_float *) PVDataL)->severity; + + + break; + + case DBR_TIME_DOUBLE: + for (unsigned int i=0; itdblval.value)+i+offset))); + } + ts = ((struct dbr_time_double *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_double *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_double *) PVDataL)->severity; + break; + + case DBR_TIME_SHORT: + for (unsigned int i=0; itshrtval.value)+i+offset))); + } + ts = ((struct dbr_time_short *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_short *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_short *) PVDataL)->severity; + break; + + case DBR_TIME_LONG: + for (unsigned int i=0; itlngval.value)+i+offset))); + } + ts = ((struct dbr_time_long *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_long *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_long *) PVDataL)->severity; + break; + + case DBR_TIME_ENUM: + for (unsigned int i=0; ino_str; + + memcpy( stig, &(((struct dbr_ctrl_enum *) dataEnum)->strs), sizeof(stig )) ; + + //if native DataType is ENUM then overwrite call Enum method and then convert to string! + //Check data type + //cout << "Classname " << (*it_handle).getChannelRegalia().getClassName() << endl; + + unsigned int noEmptyStrings=0; + //Check for empty strings: + for (unsigned int j=0; jtenmval.value)+i+offset)) < noStrings) && (noStrings!=noEmptyStrings)) { + sprintf(val[i], "%s", stig[(*(&((PVDataL)->tenmval.value)+i+offset))] ); + } + else { + sprintf(val[i], "%d", (*(&((PVDataL)->tenmval.value)+i+offset)) ); + if ( ((*(&((PVDataL)->tenmval.value)+i+offset)) >= noStrings) ) { + cout << "*** WARNING FROM " << __METHOD__ << " *** " << endl; + cout << "ENUM UNSIGNED SHORT VALUE IS GREATER THAN THE NO OF ENUMERATED TYPES" << endl; + cout << "VALUE (unsigned short) = " << (*(&((PVDataL)->tenmval.value)+i+offset)) << endl; + cout << "NO OF ENUMERATED STRINGS = " << noStrings << " WITH VALUES: " << endl; + for (unsigned int j=0; jstamp; + alarmStatus = ((struct dbr_time_enum *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_enum *) PVDataL)->severity; + break; + + case DBR_TIME_STRING: + for (unsigned int i=0; itstrval.value)+i+offset))); + } + ts = ((struct dbr_time_string *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_string *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_string *) PVDataL)->severity; + break; + } + + //helper function to set TimeStamps! + //cout <<__METHOD__ << endl; + //cout << "_dbrType" << _dbrTypeRequest_DataBuffer<< endl; + //cout << ts.secPastEpoch << " " << ts.nsec << endl; + + if(!isCacheRequest) { + HandleHelper handleHelper; + handleHelper.setSTS(_handle, alarmStatus, alarmSeverity, ts); + } + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + + + + return ICAFE_NORMAL; +#undef __METHOD__ +} + + +/** + * \brief Retrieves ctrl data from buffer + * \param _handle input: handle to Conduit object + * \param val input: dbr_string_t + * \param alarmStatus input: dbr_short_t + * \param alarmSeverity input: dbr_short_t + * \param isCacheRequest input: bool, set to true for cached data + * \return ICAFE_NORMAL + */ +int Transpose::getCtrl( + const unsigned int _handle, dbr_string_t * val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, + bool isCacheRequest){ +#define __METHOD__ "Transpose::getCtrl" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getCtrlBuffer (); + + offset = (*it_handle).getChannelRequestMetaCtrlClient().getOffset(); + + if (isCacheRequest) { + offset = (*it_handle).getChannelRequestMetaCtrl().getOffset( ); + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelemCache(); //-(*it_handle).getChannelRequestMetaCtrl().getOffset(); //-offset; + //nelem = min(nelem, (*it_handle).getChannelRequestMetaCtrl().getNelem()-offset); + + } + else { + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelem()-offset; + } + //Something wrong, just read last element + if (nelem <=0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Something funny with the offset; just read last element! " << endl; + cout << "Changing offset from=" << offset; + + offset = (*it_handle).getChannelRequestMetaCtrl().getNelem()-1; + if(isCacheRequest) { + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelemCache(); //-(*it_handle).getChannelRequestMetaCtrl().getOffset(); //-offset; + } + else { + nelem = (*it_handle).getChannelRequestMetaCtrl().getNelem()-offset; + } + cout << " to=" << offset << endl; + } + + dbrTypeRequest_CtrlBuffer = (*it_handle).getChannelRequestMetaCtrl().getDbrDataType(); + + + //cout << __METHOD__ << endl; + //cout << " dbrTypeRequest_CtrlBuffer " << dbrTypeRequest_CtrlBuffer << endl; + + + + alarmStatus = -1; + alarmSeverity = -1; + + switch (dbrTypeRequest_CtrlBuffer) { + case DBR_CTRL_STRING: + memcpy(val, &(&((PVDataL)->cstrval.value))[offset], sizeof(dbr_string_t)*nelem); + alarmStatus = ((struct dbr_sts_string *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_string *) PVDataL)->severity; + break; + + default: + break; + } + + } + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + + return ICAFE_NORMAL; +#undef __METHOD__ +}; + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +/** + * \brief Retrieves data transmitted by CA with dbrTypeRequest_DataBuffer + * and then converts to CAFE_DATATYPE_UNION_SEQ + * \param _handle input: handle to Conduit object + * \param val output: CTYPE datatype + * \param ts output: epicsTimeStamp + * \param alarmStatus output: dbr_short_t + * \param alarmSeverity output: dbr_short_t + * \param ts output: epicsTimeStamp + * \param isCacheRequest input: bool, set to true for cached data + * \return ICAFE_NORMAL as local data conversion should not incur an error + */ +int Transpose::get(//const CAFEConduit &cc, + const unsigned int _handle, CAFE_DATATYPE_UNION_SEQ val, + dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, bool isCacheRequest) +{ +#define __METHOD__ "Transpose::get()" + + cafeConduit_set_by_handle & handle_index=cs.get(); + cafeConduit_set_by_handle::iterator it_handle; + it_handle = handle_index.find(_handle); + + + if (it_handle != handle_index.end()) { + + PVDataL = (*it_handle).getDataBuffer (); + + offset = (*it_handle).getChannelRequestMetaDataClient().getOffset(); + + + + if(isCacheRequest) { + offset = (*it_handle).getChannelRequestMetaData().getOffset( ); + nelem = (*it_handle).getChannelRequestMetaData().getNelemCache(); //-offset; + //nelem = min(nelem, (*it_handle).getChannelRequestMetaData().getNelem()-offset); + + } + else { + nelem = (*it_handle).getChannelRequestMetaData().getNelem()-offset; + } + + + //Something wrong, just read last element + if (nelem <=0) { + cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl; + cout << "Something funny with the offset; just read last element! " << endl; + cout << "Changing offset from=" << offset; + //offset = cc.getNelemRequest()-1; + //nelem = cc.getNelemRequest()-offset; + offset = (*it_handle).getChannelRequestMetaData().getNelem()-1; + if(isCacheRequest) { + nelem = (*it_handle).getChannelRequestMetaData().getNelemCache(); //-offset; + } + else { + nelem = (*it_handle).getChannelRequestMetaData().getNelem()-offset; + } + cout << " to=" << offset << endl; + } + + dbrTypeRequest_DataBuffer = (*it_handle).getChannelRequestMetaData().getDbrDataType(); + + ts.secPastEpoch=0; + ts.nsec =0; + alarmStatus =-1; + alarmSeverity =-1; + + //dbrTypeRequest_DataBuffer is the chtype used in ca_get + //Only ever fille the Union with the native type as + + switch (dbrTypeRequest_DataBuffer) + { + case DBR_CHAR: + for (unsigned int i=0; icharval)+i+offset)); + } + break; + + case DBR_FLOAT: + for (unsigned int i=0; ifltval)+i+offset)); + } + + break; + + case DBR_DOUBLE: + for (unsigned int i=0; idoubleval)+i+offset)); + } + break; + + case DBR_SHORT: + for (unsigned int i=0; ishrtval)+i+offset)); + } + break; + + case DBR_LONG: + for (unsigned int i=0; ilongval)+i+offset)); + } + break; + + case DBR_ENUM: + for (unsigned int i=0; ienmval)+i+offset)); + } + break; + + case DBR_STRING: + for (unsigned int i=0; istrval)+i+offset))); + } + break; + + + case DBR_STS_CHAR: + for (unsigned int i=0; ischrval.value)+i+offset)); + } + alarmStatus = ((struct dbr_sts_char *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_char *) PVDataL)->severity; + break; + + case DBR_STS_FLOAT: + for (unsigned int i=0; isfltval.value)+i+offset)); + } + alarmStatus = ((struct dbr_sts_float *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_float *) PVDataL)->severity; + break; + + case DBR_STS_DOUBLE: + for (unsigned int i=0; isdblval.value)+i+offset)); + } + alarmStatus = ((struct dbr_sts_double *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_double *) PVDataL)->severity; + break; + + case DBR_STS_SHORT: + for (unsigned int i=0; isshrtval.value)+i+offset)); + } + alarmStatus = ((struct dbr_sts_short *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_short *) PVDataL)->severity; + break; + + case DBR_STS_LONG: + for (unsigned int i=0; islngval.value)+i+offset)); + } + alarmStatus = ((struct dbr_sts_int *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_int *) PVDataL)->severity; + break; + + case DBR_STS_ENUM: + for (unsigned int i=0; isenmval.value)+i+offset)); + } + alarmStatus = ((struct dbr_sts_enum *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_enum *) PVDataL)->severity; + break; + + case DBR_STS_STRING: + for (unsigned int i=0; isstrval.value)+i+offset))) ; + } + alarmStatus = ((struct dbr_sts_string *) PVDataL)->status; + alarmSeverity = ((struct dbr_sts_string *) PVDataL)->severity; + break; + + + case DBR_TIME_CHAR: + for (unsigned int i=0; itchrval.value)+i+offset)) ; + } + ts = ((struct dbr_time_char *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_char *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_char *) PVDataL)->severity; + break; + + case DBR_TIME_FLOAT: + for (unsigned int i=0; itfltval.value)+i+offset)) ; + } + ts = ((struct dbr_time_float *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_float *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_float *) PVDataL)->severity; + break; + + case DBR_TIME_DOUBLE: + for (unsigned int i=0; itdblval.value)+i+offset)) ; + } + ts = ((struct dbr_time_double *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_double *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_double *) PVDataL)->severity; + break; + + case DBR_TIME_SHORT: + for (unsigned int i=0; itshrtval.value)+i+offset)); + } + ts = ((struct dbr_time_short *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_short *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_short *) PVDataL)->severity; + break; + + case DBR_TIME_LONG: + for (unsigned int i=0; itlngval.value)+i+offset)); + } + ts = ((struct dbr_time_long *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_long *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_long *) PVDataL)->severity; + break; + + case DBR_TIME_ENUM: + for (unsigned int i=0; itenmval.value)+i+offset)); + } + ts = ((struct dbr_time_enum *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_enum *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_enum *) PVDataL)->severity; + break; + + case DBR_TIME_STRING: + for (unsigned int i=0; itstrval.value)+i+offset))); + } + ts = ((struct dbr_time_string *) PVDataL)->stamp; + alarmStatus = ((struct dbr_time_string *) PVDataL)->status; + alarmSeverity = ((struct dbr_time_string *) PVDataL)->severity; + break; + } + } + //helper function to set TimeStamps! + //cout <<__METHOD__ << endl; + //cout << "_dbrType" << _dbrTypeRequest_DataBuffer<< endl; + //cout << ts.secPastEpoch << " " << ts.nsec << endl; + + if(!isCacheRequest) { + HandleHelper handleHelper; + handleHelper.setSTS(_handle, alarmStatus, alarmSeverity, ts); + } + + else { + cafeStatus.report(ECAFE_INVALID_HANDLE); + return ECAFE_INVALID_HANDLE; + } + return ICAFE_NORMAL; +#undef __METHOD__ +}; + + +#endif diff --git a/stamp-h1 b/stamp-h1 new file mode 100644 index 0000000..493790a --- /dev/null +++ b/stamp-h1 @@ -0,0 +1 @@ +timestamp for ./config.h diff --git a/usePy3 b/usePy3 new file mode 100644 index 0000000..ca1cb78 --- /dev/null +++ b/usePy3 @@ -0,0 +1,8 @@ +cd include +rm -f PyCafe_api.h +ln -s PyCafe3_api.h PyCafe_api.h +cd ../src +rm -f PyCafe.cpp +ln -s PyCafe3.cpp PyCafe.cpp +cd ../ +