Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microscope Middleware Stand 29. Mai 2012. Microscope Manager Design Java SWIG MMCoreJ_wrap C++ MMCore C++ Device Drivers 1 class, 244 methods 6306 loc,

Similar presentations


Presentation on theme: "Microscope Middleware Stand 29. Mai 2012. Microscope Manager Design Java SWIG MMCoreJ_wrap C++ MMCore C++ Device Drivers 1 class, 244 methods 6306 loc,"— Presentation transcript:

1 Microscope Middleware Stand 29. Mai 2012

2 Microscope Manager Design Java SWIG MMCoreJ_wrap C++ MMCore C++ Device Drivers 1 class, 244 methods 6306 loc, 199kByte

3 Redesign Java, … SWIG Wrapper C++ Microscope Middleware C++ Minimal MM::Core C++ Device Drivers

4 Core Device Loader Library Search Paths Device Drivers Device Driver Properties Device Manager Devices Device Properties

5 Change / read device properties Holds Device Loader / Device Manager Loads / holds / unloads devices Interact with actual devices Loads libraries, enumerates drivers Core Device Loader Library Search Paths Device Drivers Device Driver Properties Device Manager Devices Device Properties Responsibilities Enable loading of devices by device manager

6 CoreDevice Loader Library Search Paths Device Drivers Device Driver Properties Device Manager Devices Device Properties Interface / Implementation Implementation Interface: Implemented by proxies to the actual implementation CoreDevice Loader Library Search Paths Device Drivers Device Driver Properties Device Manager Devices Device Properties

7 Proxy design Proxies hold weak pointers (tr1::weak_ptr) to the shared pointers used within the implementation (tr1::shared_ptr) – Devices may be unloaded while in use weak_ptr is then NULL Proxies throw Exception Exception: Proxy to core holds shared_ptr. – When core implementation is no longer used by any proxy (all proxies garbage collected), entire core implementation is unloaded automatically

8 Wrapping MM::Devices

9 MM::Devices have a «Core» callback – Used e.g. for continuous imaging – Also used by devices in order to get The default camera, shutter, … Access to serial ports Microscope Middleware implements a minimal per-device version of this – Default devices are user-configurable (and not set by default)

10 Device Interfaces Each device gets its own interface Devices of unknown type have a generic interface (e.g. Arduino boards) Device Camera Shutter State Axis Stage SerialPort AutoFocus SignalIO Magnifier ProgrammableIO SLM Hub Galvo Generic

11 Device Interfaces Implementation Priorities: 1.Camera 2.SerialPort, Hub 3.State, Stage, Axis 4.Everything else Device Camera Shutter State Axis Stage SerialPort AutoFocus SignalIO Magnifier ProgrammableIO SLM Hub Galvo Generic

12 Unsupported devices MM::ImageProcessor MM::ImageStreamer – Both not supported as they are not actual devices MM::CommandDispatch – This is a logger, not a device!

13 Unsupported device features Sequenceability – Automatization should happen on top of Microscope Middleware, not within the device drivers! Programmable delays – Java/Python/… can sleep, too «Auto Shutter Mode»

14 To Do List Add support for all of the previously mentioned device types SWIG Wrapper Make project cross-compilable (CMake) – Testing on POSIX systems Write & Compile doxygen documentation

15 To Do List (cont’d) Swallow/redirect exceptions from device drivers – Some device drivers throw strings or ints, how to handle this? – catch(…) Bad, because all information about the exception (except that it occurred) is lost… Allow for Java/… listeners – If we pass a derived object to Java, it may believe it is an object of the base class SWIG has no way of knowing what we pass in a Base* pointer

16 Time Planning?


Download ppt "Microscope Middleware Stand 29. Mai 2012. Microscope Manager Design Java SWIG MMCoreJ_wrap C++ MMCore C++ Device Drivers 1 class, 244 methods 6306 loc,"

Similar presentations


Ads by Google