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.
Diff: qp_port.cpp
- Revision:
- 9:ca2e6010d9e2
- Parent:
- 8:934bb9eea80b
--- a/qp_port.cpp Mon Sep 26 03:27:09 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// Product: QP/C++ port to Arduino, cooperative "vanilla" kernel, no Q-SPY -// Last Updated for QP ver: 4.1.06 (modified to fit in one file) -// Date of the Last Update: Jan 04, 2011 -// -// Q u a n t u m L e a P s -// --------------------------- -// innovating embedded systems -// -// Copyright (C) 2002-2011 Quantum Leaps, LLC. All rights reserved. -// -// This software may be distributed and modified under the terms of the GNU -// General Public License version 2 (GPL) as published by the Free Software -// Foundation and appearing in the file GPL.TXT included in the packaging of -// this file. Please note that GPL Section 2[b] requires that all works based -// on this software must also be made publicly available under the terms of -// the GPL ("Copyleft"). -// -// Alternatively, this software may be distributed and modified under the -// terms of Quantum Leaps commercial licenses, which expressly supersede -// the GPL and are specifically designed for licensees interested in -// retaining the proprietary status of their code. -// -// Contact information: -// Quantum Leaps Web site: http://www.quantum-leaps.com -// e-mail: info@quantum-leaps.com -////////////////////////////////////////////////////////////////////////////// -#include "qp_port.h" // QP port - -Q_DEFINE_THIS_MODULE(qp_port) - -//............................................................................ -extern "C" void loop() { - QF::run(); // run the application, NOTE: QF::run() does not return -} - -//............................................................................ -// This QP framework does NOT use new or delete, but the WinAVR/avr-g++ -// compiler generates somehow a reference to the operator delete for every -// class with a virtual destructor. QP declares virtual destructors, so to -// satisfy the linker the following dummy definition of the operator -// delete is provided. This operator should never be actually called. -// -void operator delete(void *) { - Q_ERROR(); // this operator should never be actually called -} -