Skip to content

Feature Request for Deterministic App Abstraction Layer (DAAL) #864

@FScholPer

Description

@FScholPer

Deterministic App Abstraction Layer (DAAL)

Provides an application abstraction layer and APIs for testing.
Implements common code and several safety requirements.

Goal

  • Testing possibility of applications without any framework dependencies (e.g. Autosar, FEO..)

  • Independence on Runtime Environment e.g. Linux, QNX

Design

  • Triggers: abstraction of how an application is executed. I.e. cyclic, event-based, conditional fork-join, …

  • AppHandler: Abstraction to handle one or multiple applications, configuration of core

  • Supports Error Handling and Health Monitoring

  • Environment: Abstraction of the Runtime environment, Autosar, Linux.

  • Executor: Manages the lifecycle

  • IoHandler: Abstraction for handling the communication

Stages

OnInitialize()

The application first gets the call back for OnInitialize() function up on the successful initialization (of Environment and POSIX helper) and tests.

OnStop()

Application OnStop() will be called in two scenarios:

  1. This is default state for application after the OnInitialize()
  2. On pre-shutdown signal, i.e PowerOff signal.

OnStart()

Application OnStart() will be called in two scenarios:

  1. If application is using PowerMode, then this function will be called when the signal is received.
  2. Otherwise OnStart() will be called just after the OnStop() as a default.

Step()

Application Step() function is invoked in a loop with the checks for SIGTERM and Power mode signals if application is subscribed for it.

The application::Executor also checks for successful Step() execution of previous step before the next invocation.

Until the SIGTERM, Errors or PowerMode signals the application will be in execution, once any of the signal occurred, the loop/execution is broken and subsequent functions will be called.

OnTerminate()

This is a final call where there is no return after this point. In this state application shall finally flush/write the prepared data from OnStop() state and release the resources.

On successful return on the OnTerminate() call application::Executor::Run() will return back to main function.

State Diagram

Image

Lifecycle Diagram

Image

Metadata

Metadata

Assignees

Type

No type

Projects

Status

POC Needed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions