Giter VIP home page Giter VIP logo

lima-camera-andor's People

Contributors

claustre avatar flanglois avatar highwaystar avatar laurent-claustre avatar sdebionne avatar sebastien-petitdemange avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lima-camera-andor's Issues

Error with Andor.Camera function

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

Is andor camera code thread-safe?

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 thread
  • m_cam.m_nb_frames read in AcqThread (without lock) but it can be changed in setNbFrames (without lock) in the main thread
  • m_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

Compile errors building on RockyLinux 8 (gcc 8.5 / sip 4.19.24)

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....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.