QP/C  7.4.0-rc.3
Real-Time Embedded Framework
Loading...
Searching...
No Matches
Composition Viewpoint

Context ViewpointResource Viewpoint

Viewpoint

SAS_QP_COMP

SAS_QP_COMP : Composition Viewpoint

Purpose

The Composition viewpoint describes the way the architecture subject is recursively structured into constituent parts (packages and classes in the object-oriented viewpoint) and establishes the roles of those parts.

Concerns

  • allocation of functionality and responsibilities
  • the major constituents of the architecture subject
  • mechanisms for extension and reuse

Model Kind

The UML class diagram shown in Figure SAS-COMP (static view) depicts core classes comprising QP Framework and their relation to classes in the QP Application shown at the bottom of Figure SAS-COMP.

Remarks
Because the class diagram in Figure SAS-COMP is drawn in a traditional way (with base classes on top and derived classes below), the layering in this class diagram is reversed compared to the package diagram in Figure SAS-CTXT.

Figure SAS-COMP: Core classes in QP Framework and their relation to QP Application.

Views

The following traceable architectural views explain the main QP Framework sub-packages and classes, their responsibilities, and relationships:

SAS_QP_COMP_SLR

SAS_QP_COMP_SLR : QP Framework Sub-layers

Description

The QP Framework internally is further decomposed into the following sub-layers:

  • SAS-COMP [10] QEP Event Processor layer is a sub-package of QP Framework, which implements Events and State Machines.
    Note
    QEP Event Processor is intentionally separated out to allow QP Applications to directly use just the passive state machines (without Active Objects). QP Applications that use just the QEP Event Processor can still benefit from the QM modeling tool↑, which can generate code that requires only passive state machines.
  • SAS-COMP [20] QF Active Object Framework layer is a sub-package of QP Framework, which implements Active Objects and Time Events.

Backward Traceability

Forward Traceability

SAS_QP_COMP_CLS

SAS_QP_COMP_CLS : QP Framework Classes

Description

  • SAS-COMP [11] The QEvt class represents events in QP Framework. It can be instantiated directly (concrete class), in which case it represents events without parameters. QP Applications can also inherit and extend QEvt to add custom event parameters. Examples of events with parameters are provided as QP Application classes EventA and EventB (SAS-COMP [01]).

  • SAS-COMP [23] The abstract QActive class is a base class for derivation of concrete Active Objects in the QP Application. QActive encapsulates the unique priority, event-queue, execution context, and state machine for the Active Object. QActive inherits QAsm, which means that an Active Object in QP can be treated as a state machine with the standard interface. QActive implements this interface by delegating to the QHsm state machine implementation.

  • SAS-COMP [24] The abstract QMActive class derives from QActive base class, so it inherits all its properties. The only difference is that, QMActive implements the state machine interface by delegating to the QMsm state machine implementation.

Backward Traceability

  • SRS_QP_EVT_00: QP Framework shall provide Event abstraction to QP Application
  • SRS_QP_SM_00: QP Framework shall provide support for hierarchical state machines both for Active Objects and for passive event-driven objects in the Application
  • SRS_QP_AO_00: QP Framework shall provide the Active Object abstraction to QP Application
  • SRS_QP_TM_00: QP Framework shall support Time Events.

Forward Traceability

Context ViewpointResource Viewpoint