1 / 16

Microscope Middleware

Microscope Middleware. Stand 29. Mai 2012. Microscope Manager Design. 1 class , 244 methods 6306 loc , 199kByte. Redesign. Responsibilities. Holds Device Loader / Device Manager. Loads libraries , enumerates drivers. Loads / holds / unloads devices.

limei
Download Presentation

Microscope Middleware

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microscope Middleware Stand 29. Mai 2012

  2. Microscope Manager Design 1 class, 244 methods 6306 loc, 199kByte

  3. Redesign

  4. Responsibilities Holds Device Loader / Device Manager Loadslibraries, enumeratesdrivers Loads / holds / unloadsdevices Interactwithactualdevices Enableloadingofdevicesbydevicemanager Change / readdeviceproperties

  5. Interface / Implementation • Implementation • Interface: Implementedbyproxiestotheactualimplementation

  6. Proxy design • Proxies hold weakpointers (tr1::weak_ptr) tothesharedpointersusedwithintheimplementation (tr1::shared_ptr) • Devices maybeunloadedwhile in use • weak_ptristhen NULL • ProxiesthrowException • Exception: Proxy tocoreholdsshared_ptr. • Whencoreimplementationisnolongerusedbyanyproxy (all proxiesgarbagecollected), entirecoreimplementationisunloadedautomatically

  7. Wrapping MM::Devices • MM::Devices areinstantiatedusing a «factorymethod» in Manager devicelibraries • Microscope Middleware instantiates a wrapperthatcallsthefactorymethod in itsconstructor, andthedestructormethod in itsdestructor • Wrapper isinstantiatedbydevicefactory • Createstheillusionofunderlying OO-style deviceobjects

  8. Wrapping MM::Devices • MM::Devices have a «Core» callback • Used e.g. forcontinuousimaging • Also usedbydevices in ordertoget • The defaultcamera, shutter, … • Access toserialports • Microscope Middleware implements a minimal per-deviceversionofthis • Default devicesare user-configurable(and not setbydefault)

  9. Device Interfaces • Eachdevicegetsitsowninterface • Devices ofunknown type have a genericinterface (e.g. Arduinoboards)

  10. Device Interfaces • Implementation Priorities: • Camera • SerialPort, Hub • State, Stage, Axis • Everythingelse

  11. Unsupporteddevices • MM::ImageProcessor • MM::ImageStreamer • Both not supportedastheyare not actualdevices • MM::CommandDispatch • This is a logger, not a device!

  12. Unsupporteddevicefeatures • Sequenceability • Automatizationshould happen on top ofMicroscope Middleware, not withinthedevicedrivers! • Programmabledelays • Java/Python/… cansleep, too • «Auto Shutter Mode»

  13. To Do List • Add supportfor all ofthepreviouslymentioneddevicetypes • SWIG Wrapper • Makeprojectcross-compilable (CMake) • Testing on POSIX systems • Write & Compiledoxygendocumentation

  14. To Do List (cont’d) • Swallow/redirectexceptionsfromdevicedrivers • Somedevicedriversthrowstringsorints, howto handle this? • catch(…) • Bad, because all informationabouttheexception(exceptthatitoccurred) is lost… • Allowfor Java/… listeners • Ifwe pass a derivedobjectto Java, itmaybelieveitis an objectofthebaseclass • SWIG hasnowayofknowingwhatwe pass in a Base* pointer

  15. Time Planning?

More Related