QP/C  7.0.1
Real-Time Embedded Framework

OverviewState Machines

"The big idea is messaging..."
— Alan Kay

An Event is the specification of some occurrence that may potentially have significance to the system under consideration. Upon such an occurrence, a corresponding Event (class) is instantiated, and the generated Event Instance (object) outlives the instantaneous occurrence that generated it.

Event Instances (a.k.a. Messages) are objects specifically designed for communication and synchronization within an event-driven system, such as a QP Application. Once generated, an Event Instance (a.k.a. Message) is propagated to the system, where it can trigger various Actions. These Actions might involve generating secondary Event Instances.

Note
This section describes events from the perspective of using them in State Machines. The additional requirements are discussed in section Active Objects, which covers the management of mutable, dynamic events in the QP Framework.

Event Signal

An Event always has information about the type of occurrence that generated the Event Instance ("what happened"), which will be called Signal in this document. Event Signals are typically enumerated constants that indicate which specific occurrence out of a set of all possible (enumerated) occurrences has generated the Event Instance.

Event Parameters

An Event can have (optionally) associated Parameters, allowing the Event Instance to convey the quantitative information regarding that occurrence. For example, a Keystroke event generated by pressing a key on a computer keyboard has associated parameters that carry the character scan code and the status of the Shift, Ctrl, and Alt keys.

Requirements

NOTE: This is just a preview of the QP Certification Pack. The list of requirements is provided in the complete document, which can be requested from Quantum Leaps.


OverviewState Machines