itom 1.0.14
D:/git-itom/sources/itom/Qitom/python/pythonPlugins.h
00001 /* ********************************************************************
00002     itom software
00003     URL: http://www.uni-stuttgart.de/ito
00004     Copyright (C) 2013, Institut für Technische Optik (ITO),
00005     Universität Stuttgart, Germany
00006 
00007     This file is part of itom.
00008   
00009     itom is free software; you can redistribute it and/or modify it
00010     under the terms of the GNU Library General Public Licence as published by
00011     the Free Software Foundation; either version 2 of the Licence, or (at
00012     your option) any later version.
00013 
00014     itom is distributed in the hope that it will be useful, but
00015     WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
00017     General Public Licence for more details.
00018 
00019     You should have received a copy of the GNU Library General Public License
00020     along with itom. If not, see <http://www.gnu.org/licenses/>.
00021 *********************************************************************** */
00022 
00023 #ifndef PYTHONPLUGINS
00024 #define PYTHONPLUGINS
00025 
00026 #include <string>
00027 /* includes */
00028 //python
00029 // see http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3
00030 #ifdef _DEBUG
00031     #undef _DEBUG
00032     #if (defined linux) | (defined CMAKE)
00033         #include "Python.h"
00034     #else
00035         #include "Python.h"
00036     #endif
00037     #define _DEBUG
00038 #else
00039     #ifdef linux
00040         #include "Python.h"
00041     #else
00042         #include "Python.h"
00043     #endif
00044 #endif
00045 
00046 #include "../common/addInInterface.h"
00047 
00048 namespace ito
00049 {
00050 
00063 class PythonPlugins
00064 {
00065    public:
00066        typedef struct
00067        {
00068            PyObject_HEAD
00069            ito::AddInActuator *actuatorObj;
00070            PyObject* base;
00071        }
00072        PyActuatorPlugin;
00073 
00074        typedef struct
00075        {
00076            PyObject_HEAD
00077            ito::ActuatorAxis *axisObj;
00078            PyObject* base;
00079        }
00080        PyActuatorAxis;
00081 
00082        typedef struct
00083        {
00084            PyObject_HEAD
00085            ito::AddInDataIO *dataIOObj;
00086            PyObject* base;
00087        }
00088        PyDataIOPlugin;
00089 
00090        typedef struct
00091        {
00092            PyObject_HEAD
00093            ito::AddInAlgo *algoObj;
00094            PyObject* base;
00095        }
00096        PyAlgoPlugin;
00097        
00098        // Actuator
00099        static void PyActuatorPlugin_dealloc(PyActuatorPlugin *self);
00100        static PyObject *PyActuatorPlugin_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
00101        static int PyActuatorPlugin_init(PyActuatorPlugin *self, PyObject *args, PyObject *kwds);
00102        static PyObject* PyActuatorPlugin_repr(PyActuatorPlugin *self);
00103 
00104        static PyObject *PyActuatorPlugin_name(PyActuatorPlugin *self);
00105        static PyObject *PyActuatorPlugin_getParamList(PyActuatorPlugin *self);
00106            static PyObject *PyActuatorPlugin_getParamListInfo(PyActuatorPlugin *self,  PyObject *args);
00107        static PyObject* PyActuatorPlugin_getExecFuncsInfo(PyActuatorPlugin* self, PyObject *args);
00108        static PyObject *PyActuatorPlugin_getParam(PyActuatorPlugin *self, PyObject *args);
00109        static PyObject *PyActuatorPlugin_setParam(PyActuatorPlugin *self, PyObject *args);
00110            static PyObject *PyActuatorPlugin_getType(PyActuatorPlugin *self);
00111        static PyObject *PyActuatorPlugin_execFunc(PyActuatorPlugin *self, PyObject *args, PyObject *kwds);
00112        static PyObject *PyActuatorPlugin_showConfiguration(PyActuatorPlugin *self);
00113        static PyObject *PyActuatorPlugin_showToolbox(PyActuatorPlugin *self);
00114        static PyObject *PyActuatorPlugin_hideToolbox(PyActuatorPlugin *self);
00115 
00116        static PyObject *PyActuatorPlugin_calib(PyActuatorPlugin *self, PyObject *args);
00117        static PyObject *PyActuatorPlugin_setOrigin(PyActuatorPlugin *self, PyObject *args);
00118        static PyObject *PyActuatorPlugin_getStatus(PyActuatorPlugin *self, PyObject *args);
00119        static PyObject *PyActuatorPlugin_getPos(PyActuatorPlugin *self, PyObject *args);
00120        static PyObject *PyActuatorPlugin_setPosAbs(PyActuatorPlugin *self, PyObject *args);
00121        static PyObject *PyActuatorPlugin_setPosRel(PyActuatorPlugin *self, PyObject *args);
00122 
00123        static PyMemberDef  PyActuatorPlugin_members[];
00124        static PyMethodDef  PyActuatorPlugin_methods[];
00125        static PyTypeObject PyActuatorPluginType;
00126        static PyModuleDef  PyActuatorPluginModule;
00127 
00128        // pending for deletion
00129 /*
00130        // Actuator axis
00131        static void PyActuatorAxis_dealloc(PyActuatorAxis *self);
00132        static PyObject *PyActuatorAxis_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
00133        static int PyActuatorAxis_init(PyActuatorAxis *self, PyObject *args, PyObject *kwds);
00134 
00135        static PyObject *PyActuatorAxis_getStatus(PyActuatorAxis *self, PyObject *args);
00136        static PyObject *PyActuatorAxis_getPos(PyActuatorAxis *self, PyObject *args);
00137        static PyObject *PyActuatorAxis_setPosAbs(PyActuatorAxis *self, PyObject *args);
00138        static PyObject *PyActuatorAxis_setPosRel(PyActuatorAxis *self, PyObject *args);
00139           
00140        static PyMemberDef  PyActuatorAxis_members[];
00141        static PyMethodDef  PyActuatorAxis_methods[];
00142        static PyTypeObject PyActuatorAxisType;
00143        static PyModuleDef  PyActuatorAxisModule;
00144 */
00145        //DataIO
00146        static void PyDataIOPlugin_dealloc(PyDataIOPlugin *self);
00147        static PyObject *PyDataIOPlugin_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
00148        static int PyDataIOPlugin_init(PyDataIOPlugin *self, PyObject *args, PyObject *kwds);
00149        static PyObject* PyDataIOPlugin_repr(PyDataIOPlugin *self);
00150 
00151        static PyObject *PyDataIOPlugin_name(PyDataIOPlugin *self);
00152        static PyObject *PyDataIOPlugin_getParamList(PyDataIOPlugin *self);
00153        static PyObject* PyDataIOPlugin_getParamListInfo(PyDataIOPlugin* self,  PyObject *args);
00154        static PyObject* PyDataIOPlugin_getExecFuncsInfo(PyDataIOPlugin* self, PyObject *args);
00155        static PyObject *PyDataIOPlugin_getParam(PyDataIOPlugin *self, PyObject *args);
00156        static PyObject *PyDataIOPlugin_setParam(PyDataIOPlugin *self, PyObject *args);
00157            static PyObject *PyDataIOPlugin_getType(PyDataIOPlugin *self);
00158        static PyObject *PyDataIOPlugin_execFunc(PyDataIOPlugin *self, PyObject *args, PyObject *kwds);
00159        static PyObject *PyDataIOPlugin_showConfiguration(PyDataIOPlugin *self);
00160        static PyObject *PyDataIOPlugin_showToolbox(PyDataIOPlugin *self);
00161        static PyObject *PyDataIOPlugin_hideToolbox(PyDataIOPlugin *self);
00162 
00163        static PyObject *PyDataIOPlugin_startDevice(PyDataIOPlugin *self, PyObject *args);
00164        static PyObject *PyDataIOPlugin_stopDevice(PyDataIOPlugin *self, PyObject *args);
00165        static PyObject *PyDataIOPlugin_acquire(PyDataIOPlugin *self, PyObject *args);
00166        static PyObject *PyDataIOPlugin_getVal(PyDataIOPlugin *self, PyObject *args);
00167        static PyObject *PyDataIOPlugin_copyVal(PyDataIOPlugin *self, PyObject *args);
00168        static PyObject *PyDataIOPlugin_setVal(PyDataIOPlugin *self, PyObject *args);
00169        static PyObject *PyDataIOPlugin_enableAutoGrabbing(PyDataIOPlugin *self, PyObject *args);
00170        static PyObject *PyDataIOPlugin_disableAutoGrabbing(PyDataIOPlugin *self, PyObject *args);
00171        static PyObject *PyDataIOPlugin_setAutoGrabbing(PyDataIOPlugin *self, PyObject *args);
00172        static PyObject *PyDataIOPlugin_getAutoGrabbing(PyDataIOPlugin *self, PyObject *args);
00173            
00174        static PyMemberDef  PyDataIOPlugin_members[];
00175        static PyMethodDef  PyDataIOPlugin_methods[];
00176        static PyTypeObject PyDataIOPluginType;
00177        static PyModuleDef  PyDataIOPluginModule;
00178        static void PyDataIOPlugin_addTpDict(PyObject *tp_dict);
00179 
00180 
00181        // Algo
00182        static void PyAlgoPlugin_dealloc(PyAlgoPlugin *self);
00183        static PyObject *PyAlgoPlugin_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
00184        static int PyAlgoPlugin_init(PyAlgoPlugin *self, PyObject *args, PyObject *kwds);
00185        static PyObject *PyAlgoPlugin_name(PyAlgoPlugin *self);
00186        static PyObject *PyAlgoPlugin_getParamList(PyAlgoPlugin *self);
00187        static PyObject *PyAlgoPlugin_getParamListInfo(PyAlgoPlugin *self, PyObject *args);
00188        static PyObject* PyAlgoPlugin_getExecFuncsInfo(PyAlgoPlugin* self, PyObject *args);
00189        static PyObject *PyAlgoPlugin_getParam(PyAlgoPlugin *self, PyObject *args);
00190        static PyObject *PyAlgoPlugin_setParam(PyAlgoPlugin *self, PyObject *args);
00191            static PyObject *PyAlgoPlugin_getType(PyAlgoPlugin *self);
00192 
00193        static PyMemberDef  PyAlgoPlugin_members[];
00194        static PyMethodDef  PyAlgoPlugin_methods[];
00195        static PyTypeObject PyAlgoPluginType;
00196        static PyModuleDef  PyAlgoPluginModule;
00197 };
00198 
00199 } //end namespace ito
00200 
00201 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends