In this section, we will explore how an application is typically developed using the YAAA (Yaml As an Architecture) language and C++.
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
deploymentas 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.
Go through the directory structure and have a look at the different files in the above mentioned directories.
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 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.
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.
In the conanfile.py, project-wide settings for the actual build are defined.
- 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




