This section describes how to adapt your Hello World Application by changing an implemented log message ("Hello AUTOSAR Adaptive World") in your application logic.

notice

Adapting the underlying logic of your application is optional.

notice

The logic of the application is stored in the application.cpp inside the <APP_DIR>/app/hello_world/src directory in your delivery.

Step 1: Change the Application Logic

  1. Open application.cpp.
  2. Find the Run() method.
  3. notice

    The Run method is the logic of the application.

    1. If the application is reaching this point and the initialization went well it is reporting the application state kRunning to the Executionmanager.
    2. Afterwards the example is printing a log message.
    3. As a last step the application state kTerminating is reported to the Executionmanager.
  4. Change the text of the LogInfo inside the Run() method.
  5. log_.LogInfo() << "ADD YOUR NEW LOG MESSAGE HERE";

notice

Please ensure that the app terminates if the exit_requested_ member is set to true. For more details, please read the comment in the Run() method.

Step 2: Rebuild the Application

Follow the steps described in Build Application Files to rebuild your application executable with the changes.

notice

As the build process supports incremental builds (where only changed parts are rebuilt), the rebuild of the application is much faster compared to the initial build (described in Build Application Files).

 

Next step in the tutorial: Install and Run the Application