Course Description:
This course shows under which conditions ‘classical’ design patterns can profitably be used even in resource-limited embedded systems. A selection of the most suitable
patterns is presented based on examples which are appropriate for embedded systems.
The patterns are documented showing the classes involved and the relations required for implementation. The patterns are documented using UML. Then, the patterns are developed using step-by-step, complete, code examples. This approach facilitates a well-grounded assessment of the memory and/or runtime cost of the pattern in comparison to the benefits of its usage.
Additionally, this course highlights new debugging possibilities introduced by the application of design patterns. This can lead to a considerable reduction of the development time and can also contribute to an improvement in code quality, which is crucial, especially for embedded systems.
Overview:
This 4-day course will give practical, hands-on experience with the core design patterns, but uniquely addressing their suitability to a non-PC programming environment.
Course Objectives:
• Give an introduction to a selection of design patterns by deducing them from typical embedded/real-time application examples.
• Induce a motivation to use design patterns even in embedded/ real-time systems.
• Show what the cost of a design pattern is, thus allowing to the student to decide when it is acceptable to apply a pattern in systems of limited resources.
• Consider design pattern aspects from an embedded/real-time point of view.
Pre-requisites:
• A good working knowledge of C++.
• A solid understanding of Object-Oriented principles.
• Knowledge of basic UML is useful but not essential.
Who Should Attend?
The course is predominately designed for software engineers developing for real-time and embedded system. It is also applicable to software architects and technical leads. It is especially suitable to software engineers faced with the challenges of performance and resource constraints.
Duration:
Four days.
Course Materials:
Delegate Handbook.
Related Courses:
• OO-301 Applying Real-Time UML
• AC++-401 Advanced C++
Course Workshop:
Unlike standard patterns courses, all exercise code runs on an ARM simulator using the IAR Embedded Workbench C++ cross-development environment. This enables detailed examination of the impact on the execution times and memory footprint of the specific patterns.
|
Course Outline
Introduction
- History
- What is a design pattern?
- GoF design patterns
- Typical problems in embedded systems
- Design patterns in embedded systems
- Intention of this course
Creational Patterns
- Motor example
- Interfaces
- Tracking system example
- Trolley tracking system
- Reusing the tracking system for aircraft
- Factory Method (Virtual Constructor)
- Prototype
- Abstract Factory (Kit)
- Singleton
Structural Patterns
- Review of the motor example
- Adapter (Wrapper)
- Class Adapter
- Object Adapter
- Counter classes example
- Design Pattern Decorator
- Multithreading example
- Proxy (Surrogate)
- Synchronisation Proxy
- Virtual Proxy
- Smart Pointer
- Remote Proxy
Behavioural Patterns
- Timer example
- Observer (Publisher/Subscriber)
- Command
- Finite State Machine (FSM) example
- Implementation in C
- Porting the FSM to C++
- State
- Custom memory management example
- Class Partition
- Class PartitionManager
- Flexible memory management using different manager classes
- Dynamically alterable memory allocation strategies
- Strategy (Policy)
- Algorithms with a fixed base structure
- Template Method
|