Practical Statecharts in C/C++: Quantum Programming for Embedded Systems

Chapter 7: Introducing the Quantum Framework

Overview

Today I am more convinced than ever. Conceptual integrity is central to product quality.

Frederick P. Brooks, Jr.

State machines cannot operate in a vacuum. Apart from the event processor (supplied by the behavioral inheritance meta-pattern), the execution environment for a state machine must provide, at a minimum, the execution context (thread) and the event queuing, event dispatching, and timing services. These elements strongly depend on application domain and operating system support. However, within a given domain, they change little from system to system, and their sufficiently robust representations can be reused in many applications, rather than being developed from scratch each time. For example, you could reuse an event queue or a timeout event generator across many projects. However, you can do even better than merely reuse specific elements as building blocks you can reuse the whole infrastructure surrounding state machines.

In this chapter, I introduce such a reusable infrastructure for the specific domain of embedded real-time systems. This infrastructure is an example of an application framework that I call the Quantum Framework (QF). The QF, like any application framework, is a set of cooperating classes that makes up a reusable design for a specific problem domain (embedded real-time systems in this case). The QF captures the overall architecture for executing concurrent state machines in the embedded real-time environment.

Reuse on this level leads to inversion of control between your application and the infrastructure on which it is based. When you use a class...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Operating System Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.