Skip to content

Latest commit

 

History

History
161 lines (111 loc) · 5.51 KB

File metadata and controls

161 lines (111 loc) · 5.51 KB

Develop

In this section, we will explore how an application is typically developed using the YAAA (Yaml As an Architecture) language and C++.

YAAA modeling elements and project structure

YAAA provides a set of YAML-based templates for modeling the software architecture of ADAS / AD systems.

The modeling elements are:

  • Interfaces define data used for communication (defined in sub-directory interfaces)
  • Runnables contain business logic in the form of C++ code (defined in sub-directory runnables)
  • Activities define and represent executables that are assigned to POSIX processes (defined in sub-directory activities)
  • Activity graphs define complete applications through instantiation of activities (defined in sub-directory deployment as YAML file with _graph)
  • Deployment maps the software applications to concrete hardware entities (defined in sub-directory deployment)

The modeling elements are each specified in separate YAML files. These are typically organized in a corresponding directory structure within a project.

Project structure

Go through the directory structure and have a look at the different files in the above mentioned directories.

Business logic implementation in C++

The business logic is implemented in the in C++ in the Runnables which can be found '\runnables\src'

C++ code for the Producer

C++ code for the Producer

C++ code for the Consumer

C++ code for the Consumer

Each Runnable has two functions which are called by the middleware.

  • The onInit() function is called once upon initializatiuon.
  • The onUpdate() function is called whenever the runnable gets executed. It takes the values from the InStruct and the internal state and produces the values in the OutStruct.

Note that the onInit() function is not implemented as no initialization is necessary in the simple example.

Build configuration with Conan and CMake

The build configuration for the project is done using Conan and CMake.

In the CMakeLists.txt files of the sub-directories of the project, the YAAA modeling files and C++ files are added to the build system. Note that the SDK provides a set of macros - provided through YAAA CMake - to handle the contents more easily.

CMakeLists.txt

In the conanfile.py, project-wide settings for the actual build are defined.

conanfile.py

Tips

  • When changing files, regularly save your work and commit changes to version control.
  • Use the YAAA-CO and YAAAVis extensions for better development experience.

Let's proceed to the next section where we will build our project.

Previous section: Introduction | Next section: Build