This step is optional.
As default the log message is set to "Hello AUTOSAR Adaptive World". This instruction explains how to adapt the application logic, using the log message as a simple example.
The application logic is stored in the application.cpp
of your application.

File location: <Hello World App Dir>/src/application.cpp
The Run Method
The Run
method is the logic of the application.
- If the application is reaching this point and the initialization went well it is reporting the application state
kRunning
to theExecutionmanager
. - Afterwards the example is printing a log message.
- As a last step the application state
kTerminating
is reported to theExecutionmanager
.
Change the output
- Open
application.cpp
- Find the
Run()
method - Change the text of the
LogInfo
std::int8_t Application::Run() {
std::int8_t ret{EXIT_SUCCESS};
if (!has_initialization_failed_) {
this->ReportApplicationState(ara::exec::ApplicationState::kRunning);
log_.LogInfo() << "ADD YOUR LOG MESSAGE HERE";
…
}
…
}

Please ensure that the app terminates if the exit_requested_
member is set to true
. For more details, see comment in the Run()
method.
Rebuild the application
cmake --build . --target hwsrc_app --parallel $(nproc)
This time the build is much faster as only the changed parts are rebuilt (incremental build).
Next step in the tutorial: Install and Run the application