The goal of this course is to provide a set of tools for firmware developers to deal with commonly recurring firmware design issues. The course focuses on practical solutions by taking real-world problems and solving them using various design pattern solutions, examples such as data access in an ECG system using the Client-Server Design Pattern, IO device development using the Strategy Design Pattern, hardware portability using Hardware Proxy Design Pattern, Sensor Data Subscription and Notification Observer Design Pattern etc.
Here’s an overview of what you’re getting in this intermediate level course...
Getting started with embedded design patterns using the First-Class Abstract Data Type (ADT)
The first-class ADT allows us to hide the internals of a data structure so that clients using the data structure will not have access to the internals. You can think of it as a library where you don’t have the source but have access to only the exposed functions. We shall see how the First-Class ADT improves encapsulation and eliminates tight coupling.
In this section we learn how to implement the First-Class ADT from scratch. We shall:
-
Collect relevant addresses from the datasheet and create registers from them
-
Implement the device interface file
-
Implement the client APIs
-
Test out the First-Class ADT implementation.
Introduction to Design Patterns
Over here we shall provide a theoretical understanding of design patterns and provide some practical prerequisite that we shall need for the rest of the course.
Specifically, we shall :
-
Understand the basic structure of a design pattern, the name, the solution, the consequence etc.
-
Understand UML notations for interclass relationships
-
Understand bit masking and bit fields.
Hands-On Development with the STATE Pattern
The State pattern allows an object to change its behaviour when its internal state changes.Over here we shall demonstrate how to solve the same problem using three methods:
-
The conditional state machine .
-
Table-based state machine
-
State pattern implementation
By using this comparative approach, we will be able to clearly see the advantages of the State pattern.
Hands-On Development with the STRATEGY Pattern
The Strategy pattern allows us to extend and customise existing software code. This design pattern allows us to create objects which represent various strategies and a special object known as a context object. The behaviour of the context object changes based on its strategy object.
We shall see how to implement this in code.
Hands-On Development with the Hardware Proxy Pattern
The hardware proxy pattern uses a class to encapsulate all access to a hardware device, regardless of its physical interface.
Applying this design pattern reduces compatibility issues between hardware and clients when any changes to the hardware are introduced.
We shall analyse the UML diagram of this pattern and then implement this pattern in code.
Hands-On Development with the Hardware Adapter Pattern
The hardware adapter pattern is useful when the application requires one interface, but the actual hardware provides another. This pattern allows us to create an element that converts between the two interfaces.
In this section we shall employ a case study of developing an adapter for a trans-impedance amplifier (TIA) circuit and a light-to-frequency converter (LTF) circuit both of which provide the same information but different interfaces. We shall implement the hardware proxy design pattern in code to solve this issue.
Hands-On Development with the Client-Server Pattern
The client-server patten allows us to design a system with a single producer of data and multiple consumers. Over here we are going to demonstrate the effectiveness of the client-server pattern by implementing an ECG system with multiple modules, all of whom require access to the same data.
Hands-On Development with the Observer Pattern
The observer pattern is an improvement over the client-server pattern, over here a client simply needs to subscribe to a data source, as soon as there is new data in the data source, the client will be notified automatically, without the client reading the data source.
We shall see how to do all of this in code.
As always, this is….
Specially Designed For People Who Hate Copy/Paste
Listen. If you don’t like “Copy/Paste” you’re not alone. I can’t stand it either. I’d literally rather have a piece of code that I wrote from scratch that doesn’t work than someone else’s working code I copied and pasted.
And that’s why I’ve spent months designing and recording this course in which I show you how to locate every single register used and the meaning of every hexadecimal value written into the register.
Also, it comes with a money back guarantee, so you have nothing to lose.