add header

This commit is contained in:
Michael Davidsaver
2013-03-30 13:23:55 -04:00
parent 327159a6e1
commit 131dddac05
5 changed files with 25 additions and 6 deletions

View File

@ -16,6 +16,8 @@
#include <alarm.h> #include <alarm.h>
#include <cantProceed.h> #include <cantProceed.h>
#include "pydevsup.h"
typedef struct { typedef struct {
dbCommon *precord; dbCommon *precord;
@ -235,6 +237,11 @@ typedef struct {
static dset5 pydevsupCom = {{5, NULL, (DEVSUPFUN)&init, (DEVSUPFUN)&init_record, NULL}, (DEVSUPFUN)&process_record}; static dset5 pydevsupCom = {{5, NULL, (DEVSUPFUN)&init, (DEVSUPFUN)&init_record, NULL}, (DEVSUPFUN)&process_record};
static dset5 pydevsupCom2 = {{5, NULL, (DEVSUPFUN)&init, (DEVSUPFUN)&init_record2, NULL}, (DEVSUPFUN)&process_record}; static dset5 pydevsupCom2 = {{5, NULL, (DEVSUPFUN)&init, (DEVSUPFUN)&init_record2, NULL}, (DEVSUPFUN)&process_record};
int isPyRecord(dbCommon *prec)
{
return prec->dset==(dset*)&pydevsupCom || prec->dset==(dset*)&pydevsupCom2;
}
#include <epicsExport.h> #include <epicsExport.h>
epicsExportAddress(dset, pydevsupCom); epicsExportAddress(dset, pydevsupCom);

View File

@ -13,6 +13,8 @@
#include <dbAccess.h> #include <dbAccess.h>
#include <dbStaticLib.h> #include <dbStaticLib.h>
#include "pydevsup.h"
#ifdef HAVE_NUMPY #ifdef HAVE_NUMPY
static int dbf2np_map[DBF_ENUM+1] = { static int dbf2np_map[DBF_ENUM+1] = {
NPY_BYTE, NPY_BYTE,

View File

@ -11,6 +11,8 @@
#include <dbStaticLib.h> #include <dbStaticLib.h>
#include <dbScan.h> #include <dbScan.h>
#include "pydevsup.h"
typedef struct { typedef struct {
PyObject_HEAD PyObject_HEAD

13
devsupApp/src/pydevsup.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef PYDEVSUP_H
#define PYDEVSUP_H
int pyField_prepare(void);
void pyField_setup(PyObject *module);
void PyField_cleanup(void);
int pyRecord_prepare(void);
void pyRecord_setup(PyObject *module);
int isPyRecord(dbCommon *);
#endif // PYDEVSUP_H

View File

@ -21,12 +21,7 @@
#include <epicsThread.h> #include <epicsThread.h>
#include <epicsExit.h> #include <epicsExit.h>
int pyField_prepare(void); #include "pydevsup.h"
void pyField_setup(PyObject *module);
void PyField_cleanup(void);
int pyRecord_prepare(void);
void pyRecord_setup(PyObject *module);
/* dictionary of initHook names */ /* dictionary of initHook names */
static PyObject *hooktable; static PyObject *hooktable;