QP/C++  7.1.3
Real-Time Embedded Framework
Loading...
Searching...
No Matches
Dining Philosophers Problem (DPP)

Simple Blinky Application"Fly 'n' Shoot" Game

The Dining Philosophers Problem (DPP) example is an intermediate-level application with multiple active objects. It illustrates the following QP™ features, such as:

  • multiple active objects, including an array of active objects;
  • designing the simple state machines in the QM tool and generating the code automatically (can be also done manually);
  • using multiple periodic time events;
  • using mutable events with parameters;
  • direct event posting to active objects;
  • publish-subscribe event delivery;
  • initializing the QP™ framework;
  • starting multiple active objects; and
  • transferring control to QP™ to run the application.
Note
The DPP example is provided for most supported boards as well as in the command-line version (on the host). Please look for examples named dpp_<board-name> in the qpcpp/examples/examples directory (e.g., qpcpp/examples/arm-cm/dpp_ek-tm4c123gxl for the EK-TM4C123GXL board (TivaC LaunchPad)).

The Dining Philosophers Problem (DPP) example is described in the Application Note: Dining Philosophers Problem (DPP) Example.

Note
There is also a DPP variant that implements the "Philosophers" as passive "Orthogonal Components" of the "Table" active object. That DPP version is located in qpcpp/examples/examples/workstation/dpp-comp/

Simple Blinky Application"Fly 'n' Shoot" Game