graphical user interfaces for embedded systems niall murphy panelsoft 1-day tutorial
TRANSCRIPT
Graphical User Interfaces for Embedded Systems
Niall Murphy
Panelsoft1-day tutorial
Purpose of tutorial
“...intended to introduce the programmer to the concepts required to design graphics software on embedded systems. Many of these systems use non-VGA graphics hardware, and since third party support may not be available the engineer may have to write the low level drawing routines as well as the application specific code.”
Hardware for Embedded Graphics
CPU + Screen + ControllerController
can constantly refresh the screen Video RAM can be on Controller built-in to screen / standalone / integrated
with processors (from 2 bit/pixel to full VGA)Bits and Pixels, Layers for effectsPerformance: commercial toolkits on 32
bit platform
Starting to Draw
Typical Primitives Dots (Pixels) Lines
Horizontal / VerticalSloped => Bresenham (fast and no floating point)
Boxes (outline or filled) Bitmaps Strings set Color
More Flexible Drawing
Drawing Modes (XOR-invert, OR transp.)Context (foreground, background, mode,
penwidth) + functionsColor map (lookup table) + flash/animateClipping (post- usually in Controller HW)Antialiasing
in ES not at runtime in bitmaps prepared by desktop application
Dithering on high-res screens
Software Levels
Primitive LevelObjects (object draws itself, grouping)
shapes, interactive buttons etc.Polymorphism (manipulate lists of objects)
C: struct with common fields (area, color...) C++: inheritance
Containers in ES not as advanced as windows e.g. area for graph, buttons => list of objects
Refreshing the Display
why? modify object = modify datastruct, refresh screen later to combine updates
Moving an object (erase + redraw, tag “dirty”)
Refresh by object vs. by area (slow but overlapping objects allowed)
Touchscreens
Technology (short)Ergonomics
e.g. audio/visual feedback when button selected
Touch sensitive objects sensitive area bigger than object activate on release
Other topics
Memory management allocate static objects or during init.
Compound objects using a container or separate object type
Multiple Dialogs Moving Objects e.g. line graphFonts and bitmapsThird Party Toolkits
Designing UI Software for Embedded Systems
Niall Murphy
Panelsoft
class
Topics
Framework for input: event queueDevice driver (e.g. VCR) posts eventsApplication receives and processes eventsFocus (e.g. pointer to data)Callbacks (C: pointer-to-function)entry and exit functions for modesManaging the output (select visible info)Model-View-Controller Pattern
“in ES is code more integrated”
Graphics in ES: Assessing the Choice
Alex Wilson
Wind River Systems
class
Topics
Introduction HW more powerful and cheap => Graphical
UI affordable SW requirements of GUIs in ES: portability,
scalability, real-time operation etc.Core graphic requirementsChoice
Native GUI Java HTML (+ JavaScript / Java Applets)
Topics (continued)
Native GUI on top of 2D graphics library, in C/C++ windowing and widgets e.g. Windows CE, Zinc Native Graphical User Interface Decision
MatricsLack of portability (at least recompile/link)
Topics (continued)
JAVA Platform JVM solution to lack of portability characteristics of Java (API, packages...) different Java Platforms: PersonalJava,
EmbeddedJava (fig.) Java for Embedded Systems
features that make it well suited for ES (list)but issues: speed,...,not real-time!!!
Java Platform Decision Matrix
Topics (continued)
HTML basic HTML for GUI + technologies for
dynamic pages Connectivity! JavaScript vs. Java Applets Web Thin Client Decision Matrix