esrf-bliss / lima-camera-andor Goto Github PK
View Code? Open in Web Editor NEWLima andor plugin
Home Page: lima.blissgarden.org
License: GNU General Public License v3.0
Lima andor plugin
Home Page: lima.blissgarden.org
License: GNU General Public License v3.0
Hello,
I have an iDus 401 CCD USB camera connected to a Windows 10 PC. However, I cannot load it after executing the Andor.Camera() command. The following error is popping out.
`In [2]: cam = Andor.Camera(r"C:\Program Files (x86)\Andor iDus\Drivers", 0)
Traceback (most recent call last):
File "", line 1, in
cam = Andor.Camera(r"C:\Program Files (x86)\Andor iDus\Drivers", 0)
Exception: Hardware: lima::Andor::Camera::initPGain(c:\miniconda3\conda-bld\lima-camera-andor_1549982997152\work\src\andorcamera.cpp, 1303): Error: Failed to get gainerror_code(ret_code)=DRV_P1INVALID`
Best regards,
George
Hi,
I've just looked at the andor code because of random errors of its tango server in our facility.
Therefore I would like to ask if someone test the code with respect of thread-safety, i.e.
In AnodorCamera
there is an implementation of thread AcqThread
(in threadFunction()
) which shares non-atomics (std::atomic
) variables with the main thread, e.g.:
m_cam.m_wait_flag
read in AcqThread
(without lock) but it can be changed in startAcq
or 'stopAcq' (with lock) in the main threadm_cam.m_nb_frames
read in AcqThread
(without lock) but it can be changed in setNbFrames
(without lock) in the main threadm_cam.m_image_number
changed/read in AcqThread
(without lock) but it can be read in getNbHwAcquiredFrames
in the main thread (without lock)Moreover access to m_cam.m_buffer_ctrl_obj
(without locks) in both threads looks suspicious
(e.g. newFrameReady(...)
and getFrameBufferPtr(...)
) .
Finally, WaitForAcquisition()
and GetNumberNewImages(...)
and GetImages16(...)
are implemented in a thread-safe way (Otherwise one has to use mutex for all andor native commands).
Best regards,
Jan
With the submodule revision included from esrf-bliss/Lima master:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/build/camera/andor/sip/siplimaandorpart1.cpp: In function 'void assign_Andor_Interface(void*, Py_ssize_t, void*)':
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/build/camera/andor/sip/siplimaandorpart1.cpp:2237:113: error: use of deleted function 'lima::Andor::Interface& lima::Andor::Interface::operator=(const lima::Andor::Interface&)'
[ 118s] reinterpret_cast< ::Andor::Interface *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::Andor::Interface *>(sipSrc);
[ 118s] ^
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:47:21: note: 'lima::Andor::Interface& lima::Andor::Interface::operator=(const lima::Andor::Interface&)' is implicitly deleted because the default definition would be ill-formed:
[ 118s] class ANDOR_EXPORT Interface : public HwInterface
[ 118s] ^~~~~~~~~
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:47:21: error: non-static reference member 'lima::Andor::Camera& lima::Andor::Interface::m_cam', can't use default assignment operator
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:47:21: error: use of deleted function 'lima::Andor::DetInfoCtrlObj& lima::Andor::DetInfoCtrlObj::operator=(const lima::Andor::DetInfoCtrlObj&)'
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:29,
[ 118s] from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorDetInfoCtrlObj.h:40:21: note: 'lima::Andor::DetInfoCtrlObj& lima::Andor::DetInfoCtrlObj::operator=(const lima::Andor::DetInfoCtrlObj&)' is implicitly deleted because the default definition would be ill-formed:
[ 118s] class ANDOR_EXPORT DetInfoCtrlObj : public HwDetInfoCtrlObj
[ 118s] ^~~~~~~~~~~~~~
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorDetInfoCtrlObj.h:40:21: error: non-static reference member 'lima::Andor::Camera& lima::Andor::DetInfoCtrlObj::m_cam', can't use default assignment operator
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:47:21: error: use of deleted function 'lima::Andor::SyncCtrlObj& lima::Andor::SyncCtrlObj::operator=(const lima::Andor::SyncCtrlObj&)'
[ 118s] class ANDOR_EXPORT Interface : public HwInterface
[ 118s] ^~~~~~~~~
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:30,
[ 118s] from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorSyncCtrlObj.h:41:21: note: 'lima::Andor::SyncCtrlObj& lima::Andor::SyncCtrlObj::operator=(const lima::Andor::SyncCtrlObj&)' is implicitly deleted because the default definition would be ill-formed:
[ 118s] class ANDOR_EXPORT SyncCtrlObj : public HwSyncCtrlObj
[ 118s] ^~~~~~~~~~~
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorSyncCtrlObj.h:41:21: error: non-static reference member 'lima::Andor::Camera& lima::Andor::SyncCtrlObj::m_cam', can't use default assignment operator
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:47:21: error: use of deleted function 'lima::Andor::BinCtrlObj& lima::Andor::BinCtrlObj::operator=(const lima::Andor::BinCtrlObj&)'
[ 118s] class ANDOR_EXPORT Interface : public HwInterface
[ 118s] ^~~~~~~~~
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:32,
[ 118s] from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorBinCtrlObj.h:39:21: note: 'lima::Andor::BinCtrlObj& lima::Andor::BinCtrlObj::operator=(const lima::Andor::BinCtrlObj&)' is implicitly deleted because the default definition would be ill-formed:
[ 118s] class ANDOR_EXPORT BinCtrlObj : public HwBinCtrlObj
[ 118s] ^~~~~~~~~~
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorBinCtrlObj.h:39:21: error: non-static reference member 'lima::Andor::Camera& lima::Andor::BinCtrlObj::m_cam', can't use default assignment operator
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:47:21: error: use of deleted function 'lima::Andor::RoiCtrlObj& lima::Andor::RoiCtrlObj::operator=(const lima::Andor::RoiCtrlObj&)'
[ 118s] class ANDOR_EXPORT Interface : public HwInterface
[ 118s] ^~~~~~~~~
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:33,
[ 118s] from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorRoiCtrlObj.h:41:21: note: 'lima::Andor::RoiCtrlObj& lima::Andor::RoiCtrlObj::operator=(const lima::Andor::RoiCtrlObj&)' is implicitly deleted because the default definition would be ill-formed:
[ 118s] class ANDOR_EXPORT RoiCtrlObj : public HwRoiCtrlObj
[ 118s] ^~~~~~~~~~
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorRoiCtrlObj.h:41:21: error: non-static reference member 'lima::Andor::Camera& lima::Andor::RoiCtrlObj::m_cam', can't use default assignment operator
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:47:21: error: use of deleted function 'lima::Andor::ShutterCtrlObj& lima::Andor::ShutterCtrlObj::operator=(const lima::Andor::ShutterCtrlObj&)'
[ 118s] class ANDOR_EXPORT Interface : public HwInterface
[ 118s] ^~~~~~~~~
[ 118s] In file included from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorInterface.h:31,
[ 118s] from /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/sip/AndorInterface.sip:6:
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorShutterCtrlObj.h:40:21: note: 'lima::Andor::ShutterCtrlObj& lima::Andor::ShutterCtrlObj::operator=(const lima::Andor::ShutterCtrlObj&)' is implicitly deleted because the default definition would be ill-formed:
[ 118s] class ANDOR_EXPORT ShutterCtrlObj : public HwShutterCtrlObj
[ 118s] ^~~~~~~~~~~~~~
[ 118s] /home/abuild/rpmbuild/BUILD/Lima-1.9.16/camera/andor/include/AndorShutterCtrlObj.h:40:21: error: non-static reference member 'lima::Andor::Camera& lima::Andor::ShutterCtrlObj::m_cam', can't use default assignment operator
[ 118s] gmake[2]: *** [camera/andor/CMakeFiles/python_module_limaandor.dir/build.make:144: camera/andor/CMakeFiles/python_module_limaandor.dir/sip/siplimaandorpart1.cpp.o] Error 1
[ 118s] gmake[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/Lima-1.9.16/build'
[ 118s] gmake[1]: *** [CMakeFiles/Makefile2:343: camera/andor/CMakeFiles/python_module_limaandor.dir/all] Error 2
[ 118s] gmake[1]: *** Waiting for unfinished jobs....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.