Skip to content
Vehicle properties
Diagnostics & OBD2

VHAL_HEARTBEAT

What it is

Defines an event that VHAL signals to car watchdog as a heartbeat.

If VHAL supports this property, VHAL should write system uptime to this property at every 3 second. Car watchdog subscribes to this property and checks if the property is updated at every 3 second. With the buffer time of 3 second, car watchdog waits for a heart beat to be signaled up to 6 seconds from the last heart beat. If it isn’t, car watchdog considers VHAL unhealthy and terminates it. If this property is not supported by VHAL, car watchdog doesn't check VHAL health status.

How the ID is built

A property ID is a 32-bit value packing four fields. Reading 0x11500f33 apart:

FieldMaskValueMeans
Group0xf00000000x10000000SYSTEM
Area0x0f0000000x01000000GLOBAL
Type0x00ff00000x00500000INT64
Ordinal0x0000ffff0x00000f330xf33

Reading it from an app

CarPropertyManager mgr = (CarPropertyManager)
        car.getCarManager(Car.PROPERTY_SERVICE);

CarPropertyValue<Long> value =
        mgr.getProperty(VehiclePropertyIds.VHAL_HEARTBEAT, 0);

This property is read-only — writes are rejected. It fires a callback whenever the value changes.