This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Use Cases

Is Velocitas for me? How does Velocitas help?

Velocitas offers a scalable and modular development toolchain for creating containerized Vehicle Apps that offers an easy to use, fast and efficient development experience to increase the velocity of your development team.

Vehicle Apps are implemented on top of a Vehicle Model (which is generated from the underlying semantic models like VSS for a concrete programming language) and its underlying language-specific SDK to provide headless comfort functions or connected application functions like Seat Adjuster, Dog Mode, Trunk Delivery or Data Logging & triggering.

use_case

Examples

1 - Seat Adjuster

Provides option to request a new seat position and to publish the current seat position

In the scenario of a car sharing company, the goal is to provide the functionality of automatically adjusting the driver’s seat position based on their preferred settings stored in their profile. When the driver unlocks the car, a request is sent to the vehicle to retrieve the preferred seat position. This is where your implementation begins.

The Seat Adjuster Vehicle App receives a MQTT message containing the seat position, which then triggers a seat adjustment command through the Seat Service to change the seat position. Additionally, to ensure convenience for future trips, the car sharing company saves the driver’s preferred seat position and utilizes it accordingly. The Seat Adjuster Vehicle App subscribes to the seat position, receiving updates from the Databroker, which streams data from the Seat Service.

Requesting new seat position

seat_adjuster_dataflow_1

  1. The Customer requests the change of the seat position as MQTT message on the topic seatadjuster/setPosition/request with the payload:

    {"requestId": 42, "position": 300}
    
  2. The Seat Adjuster Vehicle App that has subscribed to this topic, receives the request to change the seat position as a MQTT message.

  3. The Seat Adjuster Vehicle App gets the current vehicle speed from the Databroker, which is fed by the CAN Provider (KUKSA CAN Provider).

  4. With the support of the Vehicle App SDK, the Seat Adjuster Vehicle App triggers a seat adjustment command of the Seat Service via gRPC in the event that the speed is equal to zero. Hint: This is a helpful convenience check but not a safety check.

  5. The Seat Service moves the seat to the new position via CAN messages.

  6. The Seat Service returns OK or an error code as gRPC status to the Seat Adjuster Vehicle App.

  7. If everything went well, the Seat Adjuster Vehicle App returns a success message for the topic seatadjuster/setPosition/response with the payload:

    {"requestId": 42, "status": 0 }
    

    Otherwise, an error message will be returned:

    {"requestId": 42, "status": 1, "message": "<error message>" }
    
  8. This success or error message will be returned to the Customer.

Publishing current seat position

seat_adjuster_dataflow_2

  1. If the seat position will be changed by the driver, the new seat position will be sent to the Seat Service via CAN.

  2. The Seat Service streams the seat position via gRPC to the KUKSA Databroker since it was registered beforehand.

  3. The Seat Adjuster Vehicle App that subscribed to the seat position receives the new seat position from the KUKSA Databroker as a result.

  4. The Seat Adjuster Vehicle App publishes this on topic seatadjuster/currentPosition with the payload:

    {"position": 350}
    
  5. The Customer who has subscribed to this topic retrieves the new seat position and can store this position to use it for the next trip.

Example Code

You can find an example implementation of a Seat Adjuster Vehicle App here: Seat Adjuster

2 - Dog Mode

Climate control app that allows drivers to leave their vehicles while keeping the air conditioning system of the vehicle active for their pets.

The Dog Mode Vehicle App consists of the following key features:

  • Request the vehicle’s Heating, Ventilation, and Air Conditioning (HVAC) service to turn the Air Conditioning (AC) ON/OFF
  • The driver can adjust the temperature for a specific degree
  • The Vehicle App observe the current temperature and the battery’s state of charge and react accordingly
  • The driver/owner will be notified whenever the state of the charge drops below a certain value

Example Code

You can find an example implementation of a dog mode Vehicle App here: Dog Mode