Function Specification Authoring#

The Function Designer edits a Function Specification (.afs) against a loaded Meta Model. Use the guidance below when creating or reviewing its collections. For the complete property definitions, see the Meta Model reference and Function Specification File reference.

Enums#

Function-specific enumerations are stored in the optional enums section of the specification. Click Edit enums (enabled once a specification is loaded) to open the Edit enums dialog.

  • The left list shows all enums. Add enum asks for a name, which must be unique within the specification. Delete enum removes the selected enum.

  • The right field lists the values of the selected enum, one per line. Leading and trailing whitespace is removed and empty lines are ignored.

  • OK writes the changes to the specification; Cancel discards them.

Enums can then be referenced from interfaces via enumRef.

edit enums dialog

To use these enums in an interface, set dataType to enum and reference them via the enumRef property of the relevant signal. The default value of the signal should be one of the enumerated values defined in the referenced enum.

use enums in the interface

Signal Collection#

Add one entry to dataInterfaces for each data interface the function consumes or produces. Set direction relative to the function: input means the function consumes the value, and output means it produces it. Use the canonical VSS name and preserve the signal’s established meaning and datatype; do not redefine catalogue semantics for a particular function.

Describe the interface contract, including its unit, range, default, resolution, precision, update period, accuracy, safety classification, and protection requirement. Use null where a numeric value is not defined or applicable. Keep runtime quality separate from static signal metadata, as described in the Function Specification reference.

signal collection in the collection window

Parameter Collection#

Add function configuration and calibration values to parameters rather than representing them as ordinary data interfaces. Reuse canonical catalogue identifiers where available, and describe each parameter’s type, default, unit, tunability, and applicable limits. Add dimensions when the parameter is an array or map; omit it for scalars.

parameter collection in the collection window

Scheduling Collection#

Add one entry to scheduling for each independently scheduled runnable. Use the <FunctionName>.Init, <FunctionName>.Step, and <FunctionName>.Terminate naming convention where those lifecycle stages apply. Select the appropriate runType; provide cycleTimeMs for cyclic runnables, and omit it for other run types. Explain the runnable’s purpose in description and set its implementedASIL.

Use previousRunnableRef only when an explicit ordering constraint exists; it does not mean that the referenced runnable must execute immediately before this one. Each entry also declares its generic execution result as executionResult: {type: FunctionResult}. The supervision object is required for every runnable; its configuration is covered in the Supervision section below.

scheduling collection in the collection window

Supervision#

The supervision functionality allows you to monitor the execution of the function and detect any anomalies or errors. In the collection view it is shown as true or false meaning required or not required.

supervision in the collection window

It can be enabled or disabled for each function, allowing you to control which functions are actively supervised during execution. To do this, open the Edit dialog, there is a Edit Supervision button to configure the supervision settings.

edit supervision window

If not required, the nodes are not available for editing.

supervision not required window

When supervision is required, select one or more supervision types. Each type has its own configuration fields:

1. Alive Supervision#

Question answered: “Is the runnable still running periodically?”

Checks whether a function is executed the expected number of times within a monitoring interval.

Typical use:

  • Cyclic tasks

  • Periodic sensor processing

  • Communication handlers

2. Deadline Supervision#

Question answered: “Was the function completed within the expected time?”

Checks whether the execution time between two checkpoints is within configured limits.

Typical use:

  • Detect deadlocks

  • Detect long loops

  • Detect performance issues

3. Logical Supervision#

Question answered: “Did the software follow the correct execution flow?”

Checks whether checkpoints are reached in the correct sequence.

Typical use:

  • State machines

  • Safety-critical control flows

  • Initialization sequences

supervision required window

Only the settings for selected types are available for editing and written to the specification. If no type is selected, the supervision configuration contains no type-specific settings.

alive: set the minimum and maximum number of indications and the reference cycle in milliseconds.

supervision edit windows

deadline: set the maximum execution time in milliseconds.

logical: list the predecessor and successor references used for logical supervision. Enter multiple references as a comma-separated list.

Table 15 Summary#

Supervision Type

Checks

Alive

Function runs the expected number of times

Deadline

Function finishes within the allowed time

Logical

Function follows the correct sequence of execution

Error Collection#

Use errorInterfaces for function-specific diagnostic conditions when they are needed. Keep these distinct from FunctionResult, which reports the generic outcome of execution, and from runtime transport or adapter failures. The Error interface is a candidate concept; see the Function Specification reference for its current status and modeling guidance.

error collection in the collection window

Syntax Check#

Some properties are mandatory.

Tip

Add null to mandatory properties so that they are accepted by the syntax check.