QP is an event-driven, RTOS-like, active object framework for microcontrollers, such as mbed. The QP framework provides thread-safe execution of active objects (concurrent state machines) and support both manual and automatic coding of UML statecharts in readable, production-quality C or C++. Automatic code generation of QP code is supported by the free QM modeling tool.

Dependents:   qp_hangman qp_dpp qp_blinky

QP/C++ (Quantum Platform in C++) is a lightweight, open source active object (actor) framework for building responsive and modular real-time embedded applications as systems of asynchronous event-driven active objects (actors). The QP/C++ framework is a member of a larger family consisting of QP/C++, QP/C, and QP-nano frameworks, which are all strictly quality controlled, thoroughly documented, and available under GPLv3 with a special Exception for mbed (see http://www.state-machine.com/licensing/QP-mbed_GPL_Exception.txt).

The behavior of active objects is specified in QP/C++ by means of hierarchical state machines (UML statecharts). The framework supports manual coding of UML state machines in C++ as well as automatic code generation by means of the free QM modeling tool (http://www.state-machine.com/qm).

Please see the "QP/C++ Reference Manual" (http://www.state-machine.com/qpcpp) for more information.

Committer:
QL
Date:
Wed Feb 09 14:46:03 2011 +0000
Revision:
0:064c79e7311a
4.1.06a

Who changed what in which revision?

UserRevisionLine numberNew contents of line
QL 0:064c79e7311a 1 //////////////////////////////////////////////////////////////////////////////
QL 0:064c79e7311a 2 // Product: QP/C++ port to Arduino, cooperative "vanilla" kernel, no Q-SPY
QL 0:064c79e7311a 3 // Last Updated for QP ver: 4.1.06 (modified to fit in one file)
QL 0:064c79e7311a 4 // Date of the Last Update: Jan 04, 2011
QL 0:064c79e7311a 5 //
QL 0:064c79e7311a 6 // Q u a n t u m L e a P s
QL 0:064c79e7311a 7 // ---------------------------
QL 0:064c79e7311a 8 // innovating embedded systems
QL 0:064c79e7311a 9 //
QL 0:064c79e7311a 10 // Copyright (C) 2002-2011 Quantum Leaps, LLC. All rights reserved.
QL 0:064c79e7311a 11 //
QL 0:064c79e7311a 12 // This software may be distributed and modified under the terms of the GNU
QL 0:064c79e7311a 13 // General Public License version 2 (GPL) as published by the Free Software
QL 0:064c79e7311a 14 // Foundation and appearing in the file GPL.TXT included in the packaging of
QL 0:064c79e7311a 15 // this file. Please note that GPL Section 2[b] requires that all works based
QL 0:064c79e7311a 16 // on this software must also be made publicly available under the terms of
QL 0:064c79e7311a 17 // the GPL ("Copyleft").
QL 0:064c79e7311a 18 //
QL 0:064c79e7311a 19 // Alternatively, this software may be distributed and modified under the
QL 0:064c79e7311a 20 // terms of Quantum Leaps commercial licenses, which expressly supersede
QL 0:064c79e7311a 21 // the GPL and are specifically designed for licensees interested in
QL 0:064c79e7311a 22 // retaining the proprietary status of their code.
QL 0:064c79e7311a 23 //
QL 0:064c79e7311a 24 // Contact information:
QL 0:064c79e7311a 25 // Quantum Leaps Web site: http://www.quantum-leaps.com
QL 0:064c79e7311a 26 // e-mail: info@quantum-leaps.com
QL 0:064c79e7311a 27 //////////////////////////////////////////////////////////////////////////////
QL 0:064c79e7311a 28 #include "qp_port.h" // QP port
QL 0:064c79e7311a 29
QL 0:064c79e7311a 30 Q_DEFINE_THIS_MODULE(qp_port)
QL 0:064c79e7311a 31
QL 0:064c79e7311a 32 //............................................................................
QL 0:064c79e7311a 33 extern "C" void loop() {
QL 0:064c79e7311a 34 QF::run(); // run the application, NOTE: QF::run() does not return
QL 0:064c79e7311a 35 }
QL 0:064c79e7311a 36
QL 0:064c79e7311a 37 //............................................................................
QL 0:064c79e7311a 38 // This QP framework does NOT use new or delete, but the WinAVR/avr-g++
QL 0:064c79e7311a 39 // compiler generates somehow a reference to the operator delete for every
QL 0:064c79e7311a 40 // class with a virtual destructor. QP declares virtual destructors, so to
QL 0:064c79e7311a 41 // satisfy the linker the following dummy definition of the operator
QL 0:064c79e7311a 42 // delete is provided. This operator should never be actually called.
QL 0:064c79e7311a 43 //
QL 0:064c79e7311a 44 void operator delete(void *) {
QL 0:064c79e7311a 45 Q_ERROR(); // this operator should never be actually called
QL 0:064c79e7311a 46 }
QL 0:064c79e7311a 47