Reference Manual For QP/C++ 8.1.5
Loading...
Searching...
No Matches
Layers & Interfaces Viewpoint

Technology ViewpointResource Viewpoint

Architectural Viewpoint


[SAS_QP_LAY]

Architectural viewpoint: Software layering and interfaces surrounding the QP/C++ Framework.

Purpose

The Layers & Interfaces Viewpoint provides a "black box" perspective on the architecture subject (QP/C++ Framework component in this case) in the surrounding context (the system integrating QP/C++). The views within this viewpoint identify the stratification of services (layers) and the interfaces between the layers.

Architectural Views

This architectural viewpoint frames the following views:

  • sas-qp_layers
  • sas-qp_ifc

Model Kind

The model kind used to illustrate the Layers & Interfaces Viewpoint is the UML package diagram Figure SAS-LAYERS (static view). It shows the QP/C++ Framework component in the context of other software elements. The architecture is layered with clearly defined interfaces. As required in a truly layered architecture, the dependencies between layers point in one direction only (from higher-level to lower-level layers).

Figure SAS-LAYERS: Software layering and interfaces surrounding the QP/C++ Framework.


Remarks
In compliance with the UML conventions, the diagrams shown in this section intentionally omit many elements. The presented views contain only selected elements necessary to explain the high-level structure, but without cluttering the diagrams with irrelevant details.
Note
QP/C++ Framework component classes, their responsibilities, and relationships are described in the Structural View in Software Design Specification.


Architectural Views: Layers

The Layers View explains the QP/C++ Framework component context in terms of distinct layers and their relationships. The objectives of the Layer View are:

  • simplification of the interactions inside the system because a software layer can only interact with the layer immediately below.
  • promote modularity by encapsulating functionalities within layers. This makes it easier to manage, test, and update individual parts of the system without affecting others.
  • enhance scalability by allowing layers to be scaled independently.
  • encourage reusability of components within and across projects. For example, a well-defined QP/C++ Application layer can be reused in different contexts (e.g., with other operating systems or different target hardware), saving development time and effort.
  • improve maintainability by isolating changes to specific layers. This reduces the risk of unintended side effects when modifying the system.
  • facilitate interoperability by allowing layers to interact only through the well-defined interfaces (see Interface View).
  • provide flexibility to allow layers to be modified or replaced without impacting the entire system.
  • enhance security by isolating sensitive operations within specific layers. This limits the exposure of critical functionalities and data.

[SAS_QP_LAY_00]

Architectural view: QP/C++ Application layer.

Description

QP Application layer (Figure SAS-LAYERS [0]) consists of specific Active Object classes and Event classes. The QP/C++ Application classes inherit and specialize the base classes from QP/C++ Framework component. QP/C++ Application also uses services provided by the QP/C++ Framework component API.

Note
The specific classes inside the QP/C++ Application layer, such as ActiveObjA or EventA in Figure SAS-LAYERS [0], are derived from the QP/C++ Framework base classes, which are described in the Structural View in Software Design Specification.

Forward Traceability (truncated to 1 level(s))


[SAS_QP_LAY_01]

Architectural view: QP/C++ Framework component layer.

Description

QP/C++ Framework component layer (Figure SAS-LAYERS [1]) provides the base classes to be specialized by the QP/C++ Application by inheritance. The QP/C++ Framework component layer can further consist of sub-layers, such as the passive QEP Event Processor and QF Active Object framework.

Note
The QP/C++ Framework base classes, such as QP::QActive and QP::QEvt, are described in the Structural View in Software Design Specification.

Forward Traceability (truncated to 1 level(s))


[SAS_QP_LAY_02]

Architectural view: OS abstraction layer (OSAL).

Description

Operating System Abstraction layer (Figure SAS-LAYERS [2]) insulates the QP/C++ Framework component from the specifics of the underlying Operating System (OS). The OS Abstraction Layer provides an abstracted OSAL API that QP/C++ Framework component uses internally. The OS Abstraction Layer also implements the OSAL API for the underlying OS layer, which is called a specific QP port.

Backward Traceability

  • [SRS_QP_REQ_941] QP/C++ Framework component shall be portable to a wide range of real-time kernels.

Forward Traceability (truncated to 1 level(s))


[SAS_QP_LAY_03]

Architectural view: OS layer.

Description

Operating System layer (Figure SAS-LAYERS [3]) provides the execution context for Active Objects as well as other services used by the OS abstraction layer (OSAL). The OS Layer might consist of one of the real-time kernels provided in the QP/C++ Framework component (e.g., QV, QK, or QXK) or might be a 3rd-party RTOS/OS.

Backward Traceability

  • [SRS_QP_REQ_941] QP/C++ Framework component shall be portable to a wide range of real-time kernels.
  • [SRS_QP_REQ_940] QP/C++ Framework component shall be portable to 16-/32-/64-bit CPUs.

Forward Traceability (truncated to 1 level(s))

Architectural Views: Interfaces

The Interface View defines how different layers of a system interact with each other. The objectives are:

  • Define clear layer boundaries, ensuring each layer's responsibilities and interactions are well-defined.
  • Ensure compatibility to allow seamless communication and data exchange between layers.
  • promote modularity to allow components to be developed, tested, and maintained independently, which enhances flexibility and scalability.
  • facilitate integration to provide a blueprint for integrating different components, making it easier to assemble the system and ensure that all parts work together harmoniously.
  • enhance reusability by designing interfaces that can be reused across different projects or components, reducing development time and effort.
  • support interoperability to ensure that the system can interact with other systems or external components, which is especially important in real-time embedded systems where integration with hardware and other software is standard.
  • maintain consistency in how components interact, which helps in maintaining the integrity and reliability of the system.

[SAS_QP_IFC_01A]

Architectural view: QP/C++ Framework component base classes.

Description

Base classes in QP/C++ Framework component (Figure SAS-LAYERS [1A]) provide an interface for QP/C++ Application to inherit and specialize. The main QP/C++ Framework component base classes are:

  • Event class (concrete class, but also customizable by inheritance)
  • Active Object class (abstract base class customizable by inheritance)

Backward Traceability

  • [SRS_QP_REQ_100] QP/C++ Framework component shall provide Event abstraction to QP/C++ Application
  • [SRS_QP_REQ_000] QP/C++ Framework component shall provide the Active Object abstraction to QP/C++ Application

Forward Traceability (truncated to 1 level(s))


[SAS_QP_IFC_01B]

Architectural view: QP/C++ Framework component API.

Description

Besides providing base classes to inherit, QP/C++ Framework component also provides the runtime infrastructure (based on inversion of control) to execute Active Objects comprising the QP/C++ Application. QP/C++ Framework component provides the QP/C++ Framework component API (Figure SAS-LAYERS [1B]), which are services that the Active Objects can call directly without subclassing and specializing the base classes. Examples of such services include: allocating dynamic events, direct event posting, subscribing and publishing events, or arming and disarming time events.

Backward Traceability

  • [SRS_QP_REQ_300] QP/C++ Framework component shall provide direct event posting to Active Object instances based on the FIFO policy.
  • [SRS_QP_REQ_301] QP/C++ Framework component shall provide direct event self-posting to Active Object instances based on the LIFO policy
  • [SRS_QP_REQ_320] QP/C++ Framework component shall provide publish-subscribe event delivery mechanism
  • [SRS_QP_REQ_322] QP/C++ Framework component shall allow Active Object instances to subscribe to a given event signal at run-time.
  • [SRS_QP_REQ_323] QP/C++ Framework component shall allow Active Object instances to unsubscribe from a subscribed event signal at run-time.
  • [SRS_QP_REQ_324] QP/C++ Framework component shall allow Active Object instances to unsubscribe from all subscribed event signals at run-time.
  • [SRS_QP_REQ_385] QP/C++ Framework component shall provide a method of explicitly recycling mutable events.
  • [SRS_QP_REQ_400] QP/C++ Framework component shall support Time Events.
  • [SRS_QP_REQ_411] QP/C++ Framework component shall provide clock-tick processing operations for all supported clock rates that QP/C++ Application must call periodically to service the armed Time Events.
  • [SRS_QP_REQ_420] QP/C++ Framework component shall provide Time Event initialization.
  • [SRS_QP_REQ_421] QP/C++ Framework component shall allow a Time Event to be armed both for one-shot and periodic expiry.
  • [SRS_QP_REQ_422] QP/C++ Framework component shall allow a Time Event to be explicitly disarmed.
  • [SRS_QP_REQ_423] QP/C++ Framework component shall allow a Time Event to be rearmed.
  • [SRS_QP_REQ_430] QP/C++ Framework component shall provide an operation to check whether any Time Events are armed for a given tick rate.

Forward Traceability (truncated to 1 level(s))


[SAS_QP_IFC_02A]

Architectural view: OSAL API.

Description

OSAL API (Figure SAS-LAYERS [2A]) is an abstract interface between the QP/C++ Framework component and the underlying OS to insulate the framework from the OS.

Backward Traceability

  • [SRS_QP_REQ_940] QP/C++ Framework component shall be portable to 16-/32-/64-bit CPUs.
  • [SRS_QP_REQ_941] QP/C++ Framework component shall be portable to a wide range of real-time kernels.

Forward Traceability (truncated to 1 level(s))

  • [SSRS_QP_SREQ_202] QP/C++ software component shall apply data flow self-monitoring to the interface between QP/C++ software component and the underlying operating system (QP OSAL-API).

[SAS_QP_IFC_02B]

Architectural view: OS API.

Description

OS API (Figure SAS-LAYERS [2B]) is the specific Operating System API. This interface is not part of the QP/C++ Framework component, but is used in every specific OS Abstraction layer (OSAL).

Backward Traceability

  • [SRS_QP_REQ_940] QP/C++ Framework component shall be portable to 16-/32-/64-bit CPUs.
  • [SRS_QP_REQ_941] QP/C++ Framework component shall be portable to a wide range of real-time kernels.

Forward Traceability (truncated to 1 level(s))

Technology ViewpointResource Viewpoint