Current status of the project:

time line of the project

Function Specification File#

A Function Specification File describes a single function and how that function uses the interface concepts defined by the metamodel. It contains function-specific configuration information, such as interface direction, protection requirements, parameters, scheduling, and supervision. It should not evolve into a second semantic catalogue.

Catalogue/interface metadata, function-specific configuration, and runtime information shall remain clearly separated:

  • Catalogue/interface semantics: canonical VSS signals and parameters, or approved extensions, that define the meaning of data and parameters.

  • Function-specific configuration: how a specific function uses those interfaces, including input/output direction, protection requirements, scheduling, and the selected supervision mechanisms.

  • Runtime information: actual runtime values and status information, such as data quality, FunctionResult, transport or runtime failures, and function-specific diagnostic status.

The Function Specification should primarily reference and reuse catalogue-defined semantics rather than redefining the same metadata independently. If metadata must be included directly in the Function Specification for code generation or tooling purposes, it shall remain clear which information originates from the catalogue and which information belongs to function-specific configuration.

A Function Specification File describes exactly one function. It does not define the system-level composition of multiple functions. Dependencies on runnables from other functions may be referenced; however, the complete composition is defined in the Runtime Specification File.

About the naming#

In our documentation, we deliberately use the term Function (for example, Function Specification File and Function Adapter) because alternative terms, such as Component, Application, or Module, often carry established meanings in different frameworks and toolchains.

In this context, a Function represents a self-contained unit of functionality that encapsulates application or algorithmic logic (for example, MATLAB-generated code) and exposes it through a middleware-independent interface. Where required, a wrapper or adapter may be used to connect this logic to the underlying middleware or runtime environment. The term is intentionally generic and can be used to describe a wide range of functional implementations, including:

  • Vehicle Function

  • Diagnostic Function

  • Control Function

  • Analysis Function

  • Calculation Function

  • Signal Processing

  • Data Processing

  • Estimation Function

  • Monitoring Function

  • Simulation Function

Therefore, the term Function should be understood as a generic abstraction for algorithmic functionality rather than as a specific software architectural concept.

Catalogue and VSS reuse#

Existing VSS nodes shall be reused whenever their semantics match the required interface. New Vehicle.* paths shall only be introduced when no suitable VSS node exists. Such additions shall be explicitly identified as approved extensions and shall not be presented as standard VSS catalogue entries.

The name property contains the fully qualified VSS node identifier, including its hierarchical path, for example Vehicle.Speed. The Function Specification therefore does not duplicate this identifier in a separate path or namePath property.

Parameter identifiers shall follow the same VSS-style hierarchical naming convention as all other catalogue interfaces. Existing catalogue entries shall be reused whenever available. If no suitable entry exists, the parameter shall be introduced as an explicitly approved extension within the relevant Vehicle.<Domain>... semantic branch rather than under a standalone function-specific namespace.

Direction and protection requirement#

direction is defined relative to the function/application being specified: input means the function consumes the data and output means the function provides the data. This is independent of the VSS sensor/actuator classification.

protectionRequired is a boolean configuration requirement. It states whether protection is required for transfer of the Data interface between the function and its platform environment. The concrete protection mechanism is platform-dependent and is configured/enabled/implemented during integration rather than selected in the Function Specification.

Content Of Function Specification File#

The metamodel defines mandatory properties within the interface types. However, it does not currently define collection-level cardinalities for every Function Specification File. Therefore, the presence of collections described below is provided as guidance rather than as a metamodel requirement.

Table 14 Function Specification content#

Property / Attribute

Presence

Description

Example / Notes

enums

Optional

Function-specific enumerations, keyed by enum name. Each enum is either a list of values or a map with an optional description and a values list. They can be referenced from interfaces via enumRef. Enums already defined by the metamodel (for example DataQuality) need not be redeclared.

Status: [on, off, disabled]

dataInterfaces

As needed

Data interfaces used by the function. Reuse canonical VSS/catalogue semantics where available. direction is relative to the function/application being specified; protectionRequired states only whether protection is required..

name: Vehicle.Speed; direction: input; dataType: float

parameters

As needed

Calibration/configuration values identified through VSS-style catalogue or approved extension paths.

name: Vehicle.Chassis.HazardRequestDurationMs; dataType: uint32

errorInterfaces

Optional / candidate

Candidate lightweight function-specific error/status interfaces, separate from generic FunctionResult and from DSM/DTC or event-memory handling.

name: <Function>.<ErrorName>.ErrorStatus; optional diagnostic metadata may support integration

scheduling

As needed

Runnable lifecycle, activation, timing and execution contract.

functionName: SpeedHazardDetection.Step; runType: cyclic; cycleTimeMs: 20; implementedASIL: B

scheduling[].supervision

Inside scheduling

Per-runnable execution supervision. required is always present; type-specific configuration is included only when supervision is required.

required: true; type: [alive, deadline]

Scheduling notes#

cycleTimeMs is only applicable to runType: cyclic and shall be omitted for init, event and terminate unless the metamodel is explicitly changed.

previousRunnableRef is optional. It references a runnable that must precede the current runnable when an explicit ordering constraint exists. It does not mean that the referenced runnable must execute immediately before the current runnable.

Runnable names follow the current metamodel convention <FunctionName>.Init, <FunctionName>.Step and <FunctionName>.Terminate. If preprocessing is independently scheduled, it shall be represented as a separate function/runnable, for example WheelSpeedPreProcessor.Step, and referenced through previousRunnableRef and/or logical supervision.

Runtime quality#

Runtime quality is associated with a Data interface and shall be indicated explicitly in the Function Specification as a runtime companion interface. For example, Vehicle.Speed.Qualifier is identified as an enum-based runtime signal using DataQuality. It is not modeled as a normal Data interface and therefore does not repeat static Data properties such as min, max, defaultValue, resolution or precision. The qualifier remains associated with its parent Data interface through runtimeCompanion.qualityCode.

FunctionResult and Error#

FunctionResult describes the generic runtime execution outcome contract. A static Function Specification shall therefore describe the result type rather than hard-code a value such as executionResult: success. The runtime instance carries success, failure or notAvailable.

errorInterfaces represents the candidate/provisional lightweight function-specific Error/status concept and is separate from the generic FunctionResult. It does not redefine DSM/DTC or event-memory handling. It conveys application-level error/status information that can be consumed by relevant middleware or platform components for diagnostic handling and logging. Optional diagnostic metadata may be provided where required to support downstream diagnostic configuration during integration. In the current v0.4.1 candidate, name, dataType, description and maturationTimeMs are mandatory, while severity, reset-time, dependency, fallback and safety-reaction metadata are optional. Example values shall be requirement-based or explicitly identified as illustrative.

Template Version 0.0.1

  1# *******************************************************************************
  2# Copyright (c) 2026 ZF Friedrichshafen AG
  3#
  4# See the NOTICE file(s) distributed with this work for additional
  5# information regarding copyright ownership.
  6#
  7# This program and the accompanying materials are made available under the
  8# terms of the Apache License Version 2.0 which is available at
  9# https://www.apache.org/licenses/LICENSE-2.0
 10#
 11# SPDX-License-Identifier: Apache-2.0
 12#
 13# Contributors:
 14#   Thomas Pfleiderer - Function specification added
 15#   Saran Gundlapalli - autoapiframework_function_specification_template_V01.afs.yaml updated according to metamodel v0.4.1
 16# *******************************************************************************
 17#
 18# TEMPLATE - Function Specification File (*.afs.yaml)
 19#
 20# Copy this file, rename it to <YourFunctionName>.afs.yaml and fill it in.
 21# Every "row" below is one signal/parameter/runnable and MUST provide exactly
 22# one value per entry listed under "columns", in the same order.
 23# Remove this header and all "# <-- ..." hints once the file is filled in.
 24# Unknown metadata shall remain null/omitted as allowed by the consuming schema;
 25# do not invent plausible values only to complete an example.
 26
 27functionSpecification:
 28  name: <YourFunctionName>     # e.g. SpeedHazardDetection, character '-' not allowed, use CamelCase instead'
 29  version: 1.0.0               # semantic version of this function specification
 30  metaModelRef:
 31    name: Eclipse-autoapiframework-Metamodel
 32    version: 0.4.1             # meta model version this file was written against
 33
 34  description: >-
 35    <One or two sentences describing what this function does.>
 36
 37  # -----------------------------------------------------------------------
 38  # ENUMS (optional)
 39  #    Function-specific enumerations, keyed by enum name. Each enum is a
 40  #    list of values (or a map with optional 'description' and 'values').
 41  #    Referenced from interfaces via enumRef. Enums already defined by the
 42  #    meta model (e.g. DataQuality, ASIL) do not need to be redeclared.
 43  # -----------------------------------------------------------------------
 44  enums:
 45    <EnumName>:
 46      - <value1>
 47      - <value2>
 48    # <EnumName2>:
 49    #   description: <Meaning of the enum.>
 50    #   values:
 51    #     - <value1>
 52    #     - <value2>
 53
 54  # -----------------------------------------------------------------------
 55  # 1) DATA INTERFACES
 56  #    Reuse canonical VSS paths whenever equivalent semantics already exist.
 57  #    New Vehicle.* paths shall only be introduced as explicitly approved
 58  #    extensions when no suitable standard VSS node exists.
 59  #
 60  #    Function-specific properties:
 61  #      direction: input | output
 62  #      protectionRequired: true | false
 63  #    direction is relative to the function/application being specified and
 64  #    is independent of the VSS sensor/actuator classification.
 65  #    protectionRequired states only whether protection is required; the
 66  #    technical protection mechanism is selected during integration.
 67  #
 68  #    FuSa: true | false
 69  #    ASIL is optional and should be provided when the data interface is
 70  #    safety-relevant. Do not populate ASIL mechanically for FuSa: false.
 71  #
 72  #    qualityCode is runtime companion information associated with the Data
 73  #    interface. The qualifier shall be indicated explicitly as a runtime
 74  #    enum interface, but shall not repeat normal Data metadata such as
 75  #    min/max/default/resolution/precision.
 76  # -----------------------------------------------------------------------
 77  dataInterfaces:
 78    - name: <CanonicalVSSOrApprovedExtensionPath>   # Vehicle.<Domain/Subdomains>.<Signal>
 79      direction: input
 80      dataType: float
 81      enumRef: <EnumName>   # optional, Reference to the enum defined above under 'enums' section
 82      description: <Functional meaning of the signal.>
 83      unit: <unit>
 84      min: <min>
 85      max: <max>
 86      defaultValue: <defaultValue>
 87      resolution: <resolution>
 88      precision: <precision>
 89      FuSa: true
 90      ASIL: <QM|A|B|C|D>
 91      minUpdatePeriodMs: <minUpdatePeriodMs>
 92      accuracy: <expected accuracy>
 93      protectionRequired: false
 94      runtimeCompanion:
 95        qualityCode:
 96          name: <CanonicalVSSOrApprovedExtensionPath>.Qualifier   # Vehicle.<Domain/Subdomains>.<Signal>.Qualifier
 97          datatype: enum
 98          enumRef: DataQuality
 99
100  # -----------------------------------------------------------------------
101  # 2) PARAMETERS
102  #    Parameter identifiers shall also follow the VSS-style hierarchical
103  #    Vehicle.<Domain>.<Subdomain>.<Parameter> naming approach. Reuse an
104  #    existing catalogue entry where available; otherwise use an explicitly
105  #    approved extension under the relevant semantic branch.
106  #    dimensions is optional and only needed for array/map parameters.
107  #    e.g. [10] for a vector or [7, 10] for a 7x10 map.
108  # -----------------------------------------------------------------------
109  parameters:
110    - name: <CanonicalVSSOrApprovedExtensionPath>   # Vehicle.<Domain>.<Subdomain>.<Parameter>
111      dataType: float
112      defaultValue: <defaultValue>
113      description: <Meaning and intended usage of the parameter.>
114      unit: <unit>
115      tunable: false
116      min: <min>
117      max: <max>
118      dimensions: [<size>]
119
120  # -----------------------------------------------------------------------
121  # 3) ERROR INTERFACES - CANDIDATE / PROVISIONAL
122  #    Lightweight function-specific error/status interfaces, separate from
123  #    FunctionResult. This candidate model does not redefine DSM/DTC or
124  #    event-memory handling. Application-level error/status information can
125  #    be consumed by middleware/platform diagnostic handling and logging.
126  #    Optional diagnostic metadata may be provided where required to support
127  #    downstream diagnostic configuration during integration. In v0.4.1,
128  #    maturationTimeMs is mandatory in the candidate Error type; severity,
129  #    reset/dependency/fallback/safety-reaction metadata are optional.
130  #    Naming convention: <FunctionName>.<ErrorName>.ErrorStatus
131  # -----------------------------------------------------------------------
132  errorInterfaces:
133    - name: <YourFunctionName>.<ErrorName>.ErrorStatus
134      dataType: boolean
135      description: <Meaning of the error and its trigger scenario.>
136      severity: degraded  # optional
137      maturationTimeMs: <maturationTimeMs>
138      resetTimeMs: <resetTimeMs>  # optional/recommended
139      resetCondition: <Condition that clears the error.>  # optional/recommended
140      dependencyRefs: []  # optional
141      fallbackBehavior: <Function-level fallback/degradation behavior.>  # optional
142      raisesSafetyReactionRefs: []  # optional
143
144  # -----------------------------------------------------------------------
145  # 4) SCHEDULING
146  #    Naming convention: <FunctionName>.Init / .Step / .Terminate
147  #    cycleTimeMs is present only for runType: cyclic.
148  #    previousRunnableRef is optional and is used only when an explicit
149  #    predecessor/order dependency exists. It does not mean "immediately
150  #    before" and no System.Startup convention is assumed here.
151  #
152  #    executionResult describes the runtime result contract. The static
153  #    specification shall not hard-code success/failure/notAvailable.
154  #
155  #    supervision is nested within each scheduling entry. When required is
156  #    true, list the selected supervision types and only their relevant
157  #    configuration objects.
158  # -----------------------------------------------------------------------
159  scheduling:
160    - functionName: <YourFunctionName>.Init
161      runType: init
162      description: <Initialize internal states.>
163      implementedASIL: QM
164      executionResult:
165        type: FunctionResult
166      supervision:
167        required: false
168
169    - functionName: <YourFunctionName>.Step
170      runType: cyclic
171      description: <Evaluate inputs and calculate outputs.>
172      cycleTimeMs: <cycleTimeMs>
173      implementedASIL: QM
174      previousRunnableRef: <OtherFunction>.Step #Optional
175      executionResult:
176        type: FunctionResult
177      supervision:
178        required: false
179      # supervision:
180      #   required: true
181      #   type:
182      #     - alive
183      #     - deadline
184      #     - logical
185      #   alive:
186      #     # Minimum expected alive indications in the reference cycle;
187      #     # this is not a lower tolerance margin.
188      #     minIndications: <minIndications>
189      #     maxIndications: <maxIndications>
190      #     referenceCycleMs: <referenceCycleMs>
191      #   deadline:
192      #     maxExecutionTimeMs: <maxExecutionTimeMs>
193      #   logical:
194      #     predecessorRefs: []
195      #     successorRefs: []
196      # schedulingPolicy: <e.g. preemptive/non-preemptive>
197      # stackSizeBytes: <stackSizeBytes>
198
199    - functionName: <YourFunctionName>.Terminate
200      runType: terminate
201      description: <Shutdown cleanup.>
202      implementedASIL: QM
203      previousRunnableRef: <YourFunctionName>.Step
204      executionResult:
205        type: FunctionResult
206      supervision:
207        required: false

What needs to be added for the SpeedHazardDetection example:

  1# *******************************************************************************
  2# Copyright (c) 2026 ZF Friedrichshafen AG
  3#
  4# See the NOTICE file(s) distributed with this work for additional
  5# information regarding copyright ownership.
  6#
  7# This program and the accompanying materials are made available under the
  8# terms of the Apache License Version 2.0 which is available at
  9# https://www.apache.org/licenses/LICENSE-2.0
 10#
 11# SPDX-License-Identifier: Apache-2.0
 12#
 13# Contributors:
 14#   Thomas Pfleiderer - Function specification added
 15#   Saran Gundlapalli - autoapiframework_function_specification_example.afs.yaml updated according to metamodel v0.4.1
 16# *******************************************************************************
 17
 18functionSpecification:
 19  name: SpeedHazardDetection
 20  version: 1.0.0
 21  metaModelRef:
 22    name: Eclipse-autoapiframework-Metamodel
 23    version: 0.4.1
 24
 25  description: >-
 26    Detects rapid acceleration and requests hazard warning lights if the
 27    configured threshold is exceeded.
 28
 29  dataInterfaces:
 30    - name: Vehicle.Speed
 31      direction: input
 32      dataType: float
 33      description: Current vehicle speed value.
 34      unit: km/h
 35      min: 0.0
 36      max: 300.0
 37      defaultValue: 0.0
 38      resolution: 0.1
 39      precision: 1
 40      FuSa: true
 41      ASIL: B
 42      minUpdatePeriodMs: 10
 43      accuracy: "+/-0.2 km/h"
 44      protectionRequired: true
 45      runtimeCompanion:
 46        qualityCode:
 47          name: Vehicle.Speed.Qualifier
 48          datatype: enum
 49          enumRef: DataQuality
 50
 51        # Each Data interface explicitly indicates its runtime quality companion.
 52        # The qualifier is an enum-based runtime interface and intentionally does not
 53        # duplicate normal Data properties such as min/max/default/resolution.
 54
 55    - name: Vehicle.Acceleration.Longitudinal
 56      direction: input
 57      dataType: float
 58      description: Longitudinal acceleration used to detect strong acceleration events.
 59      unit: m/s2
 60      min: -20.0
 61      max: 20.0
 62      defaultValue: 0.0
 63      resolution: 0.01
 64      precision: 2
 65      FuSa: true
 66      ASIL: B
 67      minUpdatePeriodMs: 10
 68      accuracy: "+/-0.05 m/s2"
 69      protectionRequired: true
 70      runtimeCompanion:
 71        qualityCode:
 72          name: Vehicle.Acceleration.Longitudinal.Qualifier
 73          datatype: enum
 74          enumRef: DataQuality
 75
 76    # Existing VSS semantics shall be reused where available. If the selected
 77    # VSS release does not provide an equivalent hazard-light request node,
 78    # this path must be treated/documented as an conceptual extension that follows
 79    # VSS canonical naming.
 80    - name: Vehicle.Body.Lights.Hazard.Request
 81      direction: output
 82      dataType: boolean
 83      description: True requests activation of hazard warning lights.
 84      unit: boolean
 85      min: 0
 86      max: 1
 87      defaultValue: false
 88      resolution: 1
 89      precision: 1
 90      FuSa: true
 91      ASIL: B
 92      minUpdatePeriodMs: 20
 93      accuracy: logical
 94      protectionRequired: true
 95      runtimeCompanion:
 96        qualityCode:
 97          name: Vehicle.Body.Lights.Hazard.Request.Qualifier
 98          datatype: enum
 99          enumRef: DataQuality
100
101
102  parameters:
103    - name: Vehicle.Chassis.SpeedHazardForward
104      dataType: float
105      defaultValue: 10.0
106      description: >-
107        Relative speed increase threshold in percent for triggering
108        hazard request while driving forward.
109      unit: percent
110      tunable: false
111      min: 0.0
112      max: 100.0
113
114    - name: Vehicle.Chassis.HazardRequestDurationMs
115      dataType: uint32
116      defaultValue: 3000
117      description: Hold time for hazard request after trigger.
118      unit: ms
119      tunable: false
120      min: 0
121      max: 600000
122
123
124
125  scheduling:
126    - functionName: SpeedHazardDetection.Init
127      runType: init
128      description: Initialize internal states and latched outputs.
129      implementedASIL: B
130      executionResult:
131        type: FunctionResult
132      supervision:
133        required: false
134
135    - functionName: SpeedHazardDetection.Step
136      runType: cyclic
137      description: Evaluate inputs and calculate hazard request output.
138      cycleTimeMs: 20
139      implementedASIL: B
140      previousRunnableRef: SpeedHazardDetection.Init
141      executionResult:
142        type: FunctionResult
143      supervision:
144        required: false
145
146    - functionName: SpeedHazardDetection.Terminate
147      runType: terminate
148      description: Shutdown cleanup for deterministic deactivation.
149      implementedASIL: QM
150      previousRunnableRef: SpeedHazardDetection.Step
151      executionResult:
152        type: FunctionResult
153      supervision:
154        required: false