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

Slides:



Advertisements
Similar presentations
11 Copyright © 2005, Oracle. All rights reserved. Using Arrays and Collections.
Advertisements

COS 461 Fall 1997 Network Objects u first good implementation: DEC SRC Network Objects for Modula-3 u recent implementation: Java RMI (Remote Method Invocation)
Basic -2 Classes and Objects. Classes and Objects A class is a complex data TYPE An object is an instance of a class. Example: Class: Person Objects:
CERTIFICATION OBJECTIVES Use Class Members Develop Wrapper Code & Autoboxing Code Determine the Effects of Passing Variables into Methods Recognize when.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Lecture 27 Exam outline Boxing of primitive types in Java 1.5 Generic types in Java 1.5.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Trey Mack James Moore Osa Osar-Emokpae
Iterators in Java. Lecture Objectives To understand the concepts of Java iterators To understand the differences between the Iterator and ListIterator.
Object-Oriented Programming with Java Lecture 2 The Java Event Model.
Proxy Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
Python Introduction.
Chapter 4 Linked Structures – Stacks Modified. Chapter Scope Object references as links Linked vs. array-based structures Managing linked lists Linked.
OOP Languages: Java vs C++
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
Programming Languages and Paradigms Object-Oriented Programming.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
© iPerimeter Ltd Unix and IBM i  AIX and Linux run natively on Power Systems  IBM i can do Unix type things in two ways:  Posix/QShell  Ordinary.
Austin Java Users Group developerWorks article – µActor Library BARRY FEIGENBAUM, PH. D. 02/26/13.
P Object type and wrapper classes p Object methods p Generic classes p Interfaces and iterators Generic Programming Data Structures and Other Objects Using.
Java Introduction to JNI Prepared by Humaira Siddiqui.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
1 Comp 104: Operating Systems Concepts Java Development and Run-Time Store Organisation.
Introduction to Object Oriented Programming CMSC 331.
PVSSProxy The first piece of the MACS procedure framework (ProShell) Angela Brett.
CSC 395 – Software Engineering Lecture 10: Execution-based Testing –or– We can make it better than it was. Better...faster...agiler.
1 Recitation 8. 2 Outline Goals of this recitation: 1.Learn about loading files 2.Learn about command line arguments 3.Review of Exceptions.
Software Engineering Design Patterns. Singleton Single instance of class Constructor is private static final Class instance constructed when application.
Area Detector Drivers Towards A Pattern Jon Thompson.
RMI Continued IS Outline  Review of RMI  Programming example.
C# EMILEE KING. HISTORY OF C# In the late 1990’s Microsoft recognized the need to be able to develop applications that can run on multiple operating system.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
C++ Memory Overview 4 major memory segments Key differences from Java
Python/Tango Client Binding Swig ( Vs Boost (
Types in programming languages1 What are types, and why do we need them?
(1) A Proposal for the Java Public Middleware API Vito Baggiolini SL/CO.
Real Time Programming Language. Intro A programming language represents the nexus of design and structure. But misuse of the programming language can.
JDBC - Connection The programming involved to establish a JDBC connection is fairly simple. Here are these simple four steps − Import JDBC Packages: Add.
Jaas Introduction. Outline l General overview of Java security Java 2 security model How is security maintained by Java and JVM? How can a programmer.
Java Basics Opening Discussion zWhat did we talk about last class? zWhat are the basic constructs in the programming languages you are familiar.
Introduction to visual programming C#. Learning Outcomes In this chapter, you will learn about :  Event-Based Programming  The Event Based Model  Application.
Objects and Variables Local variables – Confined to single context: allocated on stack – Primitive types such as int or object references – Must be initialized.
Object Oriented Software Development 4. C# data types, objects and references.
Duke CPS From C++ to Java l Java history: Oak, toaster-ovens, internet language, panacea l What it is ä O-O language, not a hybrid (cf. C++)
Introduction to C# By: Abir Ghattas Michel Barakat.
.NET Mobile Application Development XML Web Services.
Copyright © Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Java From Control Structures through Data Structures by Tony.
Kernel Structure and Infrastructure David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Variables in Java A variable holds either
C# for C++ Programmers 1.
Python’s Modules Noah Black.
Android Studio, Android System Basics and Git
CS102 – Exceptions David Davenport Latest: May 2015
Generics, Lambdas, Reflections
Creating and Modifying Text part 2
Chapter 5: Switch Configuration
EE422C Software Implementation II
Topics Introduction to File Input and Output
Embracing Java 9 and beyond with Eclipse JDT
Chapter 5: Enhancing Classes
Kernel Structure and Infrastructure
Functional interface.
Distribution Infrastructures
Objects Managing a Resource
The Java switch Statement
Mobile Programming Dr. Mohsin Ali Memon.
Topics Introduction to File Input and Output
Presentation transcript:

Microscope Middleware Stand 29. Mai 2012

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

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

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

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

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

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

Wrapping MM::Devices

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)

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

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

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

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»

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

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

Time Planning?