Commit e723c680 authored by bliss administrator's avatar bliss administrator Committed by Sebastien Petitdemange

first loadable Xpad module

parent 01774d95
......@@ -415,7 +415,7 @@ endif
ifneq ($(COMPILE_XPAD),0)
XPAD_LDLIBS :=
XPAD_LDLIBS := -L/home/xpix_user/PCI_VALIDATED/trunk/sw/xpci_lib -lxpci_lib -L../third-party/yat/lib/i386/static -lyat
name := xpad
xpad-objs := ../camera/xpad/src/Xpad.o
version-file := ../camera/xpad/VERSION
......
xpad @ 15d7b62c
Subproject commit e62630101c5422a1e8506de2fcb27c1a8ca89081
Subproject commit 15d7b62c95159e301c74a25396823b72d4e62ca0
......@@ -135,6 +135,14 @@ ANDOR_MAJ_VERSION = $(shell echo $(ANDOR_FULL_VERSION) | cut -d. -f1)
INSTALL_ANDOR_VDIR = $(INSTALL_ANDOR_DIR)/v$(ANDOR_FULL_VERSION)
endif
ifneq ($(COMPILE_XPAD), 0)
INSTALL_XPAD_DIR = $(INSTALL_PLAT_DIR)/Xpad
XPAD_FULL_VERSION = $(shell cat camera/xpad/VERSION)
XPAD_MAJ_VERSION = $(shell echo $(XPAD_FULL_VERSION) | cut -d. -f1)
INSTALL_XPAD_VDIR = $(INSTALL_XPAD_DIR)/v$(XPAD_FULL_VERSION)
endif
.PHONY: install
PROCESSOR_TYPE := $(shell uname -i)
......@@ -269,3 +277,12 @@ ifneq ($(COMPILE_ANDOR), 0)
cp -d build/liblimaandor.so.$(ANDOR_MAJ_VERSION) $(INSTALL_LIB_DIR)
cp sip/andor/limaandor.so $(INSTALL_ANDOR_VDIR)
endif
ifneq ($(COMPILE_XPAD), 0)
mkdir -p $(INSTALL_XPAD_VDIR)
cp camera/xpad/python/__init__.py $(INSTALL_XPAD_DIR)
rm -rf $(INSTALL_LIB_DIR)/liblimaxpad.so*
cp build/liblimaxpad.so.$(XPAD_FULL_VERSION) $(INSTALL_LIB_DIR)
cp -d build/liblimaxpad.so.$(XPAD_MAJ_VERSION) $(INSTALL_LIB_DIR)
cp sip/xpad/limaxpad.so $(INSTALL_XPAD_VDIR)
endif
......@@ -71,6 +71,10 @@ ifneq ($(COMPILE_ANDOR), 0)
sip-modules += andor
endif
ifneq ($(COMPILE_XPAD), 0)
sip-modules += xpad
endif
all: src
src:
......
......@@ -148,6 +148,8 @@ def main():
extra_cxxflags += ['-D__LINUX__']
elif(modName == 'andor') :
extraIncludes += ['/usr/local/include']
elif(modName == 'xpad'):
extraIncludes += ['../../third-party/yat/include','/home/xpix_user/PCI_VALIDATED/trunk/sw/xpci_lib']
extraIncludes += findModuleIncludes(modName)
......
......@@ -117,6 +117,40 @@ return aReturnListPt;
};
%MappedType std::vector<long>
{
%TypeHeaderCode
#include <vector>
%End
%ConvertToTypeCode
if (sipIsErr == NULL)
{
bool aReturnFlag = PyList_Check(sipPy);
for(int i = 0;aReturnFlag && i < PyList_Size(sipPy);++i)
aReturnFlag = PyInt_Check(PyList_GET_ITEM(sipPy,i));
return aReturnFlag;
}
*sipCppPtr = new std::vector<long>(PyList_Size(sipPy));
for(int i = 0;i < PyList_Size(sipPy);++i)
(*sipCppPtr)->operator[](i) = PyInt_AS_LONG(PyList_GET_ITEM(sipPy,i));
return sipGetState(sipTransferObj);
%End
%ConvertFromTypeCode
PyObject* aReturnListPt = PyList_New(sipCpp->size());
std::vector<long>::iterator vIter = sipCpp->begin();
for(int i = 0;vIter != sipCpp->end();++vIter,++i)
PyList_SET_ITEM(aReturnListPt,i,PyInt_FromLong(*vIter));
return aReturnListPt;
%End
};
%MappedType std::list<double>
{
%TypeHeaderCode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment