E177, Rules of Interruptibility of Callbacks March 4, 2008 Copyright 2005-2008, Andy Packard. This work is licensed.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

1 Computer Graphics Chapter 2 Input Devices. RM[2]-2 Input Devices Logical Input Devices  Categorized based on functional characteristics.  Each device.
Trees UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Foundations of (Theoretical) Computer Science Chapter 1 Lecture Notes (more on Section 1.4) David Martin This work is licensed under.
Architecture Session: Introduction Scott Wilson
Copyright © 2014 Dr. James D. Palmer; This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Functions UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Programming a GUI Hanan sedaghat pisheh. For calling GUI, we need a function with no inputs or outputs First We create a m.file m file has the same name.
© Steve Powell 1998: verbs in colour 1 Teachers' version This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License.
© 2009 Michigan State University licensed under CC-BY-SA, original at Specifications.
Numerical Integration UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
Solving Linear Equations UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
A short intermission about function handles and cell arrays A MATLAB function may be referenced by a handle. >> sphere(100)
Introduction to the Graphical User Interface (GUI) in MATLAB
Matlab GUIs GUIDE.
Written by: Itzik Ben Shabat Technion - Israel Institute of Technology Faculty of Mechanical Engineering Laboratory for CAD & Lifecycle Engineering Lab.
Introduction to Matlab & Data Analysis
Debugging UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Time Complexity UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Regression UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
Simulink SubSystems and Masking April 22, Copyright , Andy Packard. This work is licensed under the.
Cell Arrays UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Recursion and Induction UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
MATLAB and SimulinkLecture 51 To days Outline Linear Equations ODE Integration Handle Graphics. Exercises on this days topics.
Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach 1 Black Box Software Testing Spring 2005 PART 7 -- FUNCTION TESTING by Cem Kaner, J.D.,
Introduction to Matlab’s Graphical User Interface (GUI) Type “guide” “Guide” creates interface on a Figure window and code in an M-file. Some hidden code.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
1 Extend is a simulation tool to create models quickly, with all the blocks you need and without even having to type an equation. You can use a series.
Interactive Poetry Instructions by Mary Booth. Placing Poems First select all of your poem from the Internet, right click and choose “Copy” Open a new.
The Stack This is a special data structure: –The first item to be placed into the stack will be the last item taken out. Two basic operations: –Push: Places.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
HandleGraphics Intro UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 9”
Sorting UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Concurrent Programming and Threads Threads Blocking a User Interface.
Script Files UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Numerical Differentiation UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under.
IEEE Arithmetic UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Searching UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Struct Arrays UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Polynomials UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Basics of Matlab UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Intro to Simulink April 15, Copyright , Andy Packard. This work is licensed under the Creative Commons.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
Inheritance in Matlab Classes E177 February 14, Copyright , Andy Packard. This work is licensed.
Simulink Model Commands April 11, Copyright 2005, Andy Packard. This work is licensed under the Creative.
© 2011 Michigan State University and United Nations Industrial Development Organization, original at CC-BY-SA Waste Management.
Root Finding UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Get/Set Methods UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Intro to Simulink Modified by Gary Balas 20 Feb 2011 Copyright , Andy Packard. This work is licensed under.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
Introduction to CMex E177 April 25, Copyright 2005, Andy Packard. This work is licensed under the Creative.
Copyright Crash Course Laura Rivera EDTC
Graphics Intro UC Berkeley Fall 2007, E7 Copyright , Andy Packard and Roberto Horowitz. This work is licensed under the Creative Commons Attribution-ShareAlike.
© Steve Powell 1998: verbs in colour 1 Teachers' version This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License.
Patterns An Easier Way to Think About Common Software Designs This presentation is licensed under a Creative Commons License.
Black Box Software Testing Spring 2005
For/Switch/While/Try UC Berkeley Fall 2004, E77 me
Reusable Graphics Objects UC Berkeley Fall 2004, E77 me
Class Info E177 January 22, me. berkeley
Regular Expressions: Searching strings for patterns April 24, 2008 Copyright , Andy Packard and Trent Russi. This work is licensed under the Creative.
E177, Graphics Objects in Matlab February 26, me
Class Intro/TDD Intro 8/23/2005
E177, Reference/Assignment for Classes: Intro February 12, Copyright , Andy Packard. This work.
Function Handles UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Arrays in Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Basics of Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Presentation transcript:

E177, Rules of Interruptibility of Callbacks March 4, Copyright , Andy Packard. This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Types of Callbacks (generic name for user-triggered event) All graphics objects have definable callbacks for ButtonDownFcn, CreateFcn, DeleteFcn figures additionally have WindowButtonDownFcn WindowButtonMotionFcn WindowButtonUpFcn KeyPressFcn ResizeFcn CloseRequestFcn uicontrol and uimenu Callback (press pushbutton, click radiobutton, select menu item) KeyPressFcn uibuttongroup, uipanel ResizeFcn SelectionChangeFcn ( uibuttongroup only)

Interruptibility of Callbacks Suppose callback “A” of object “O” is initiated by a user-action. Callback function fcnA begins executing, “current callback object” is O While fcnA is executing suppose another user-action occurs which generates callback “B” of object “N”. What happens? –Callback B, of object N get placed at the end of the “ fcnA/objO Event Queue”, a list of unprocessed events that ultimately will need attention. This list can have several callback/object pairs. Suppose 3 user-actions have occurred, so the fcnA/objO event queue is fcnA/objO Event Queue: fcnB/objN fcnC/objP fcnD/objQ When does the Event Queue get attention?

Event Queue Handling fcnA/objO Event Queue: fcnB/objN fcnC/objP fcnD/objQ –fcnA completes execution fcnA/objO EventQueue gets processed, one event at a time. In this example, fcnB starts executing, with objN as the current callback object –fcnA encounters one of 5 commands drawnow, figure, pause, waitfor, getframe Two situations, depending on Interruptible property of object O ‘off’, then no events get processed. If object N’s BusyAction property is ‘cancel’, then fcnB/objN get removed from fcnA/objO event queue… ‘on’, fcnA gets suspended, and fcnA/objO event queue is processed –Each callback in the queue is executed in the order listed, although… –As (e.g.) fcnB starts executing, a “ fcnB/objN Event Queue” is created, and fcnB ’s execution can be interrupted by any new user-triggered events in the same manner. –When the event Queue is empty, fcnA resumes execution, and new events may be added to its event queue When does this Event Queue get attention? Two cases … Can other Event Queues get created?

More on Event Queue during Callbacks Some commands cause the figure to be redrawn. During the execution of a callback, the actual “redraw” event of such a command is also placed in the event queue. Consider fcnA/objO Event Queue with some redraw events fcnA/objO Event Queue Redraw Patch1 fcnB/objN Redraw Pushbutton2 fcnC/objP The details (when the event queue, and each entry, is processed) are as before, except that the Redraw’s always take place, regardless of the Interruptible property of object O