NOTE: This repository is a major rewrite of the original by truckermudgeon et al. This fork is not intended to be merged back, we are forking to maintain the attribution of those before us ❤️
ets2la_telemetry is a DLL plugin for Euro Truck Simulator 2 and American Truck Simulator that shares the official SDK telemetry with any number of clients through shared memory, so every client always reads the newest values.
Every value, its type and what it tells, see docs/TELEMETRY.md.
Requires CMake 3.15+ and MSVC (Visual Studio 2019+).
cmake -B build -A x64
cmake --build build --config ReleaseOutputs ets2la_telemetry.dll (put it in <game>/bin/win_x64/plugins/).
Python client: pip install ./python (see python/README.md).
from ets2la_telemetry import TelemetryReader
reader = TelemetryReader()
telemetry = reader.get_telemetry()
print(telemetry.truck.speed * 3.6)#include "ets2la_telemetry/telemetry_reader.h"
ets2la_telemetry::TelemetryReader reader;
ets2la_telemetry::Telemetry telemetry;
if (reader.get_telemetry(telemetry)) {}get_telemetryblocks for a snapshot newer than the last one this reader got. First call after connecting waits for a fresh snapshot.get_latest_telemetryis non-blocking.- Zero-copy views stay valid for ~3 newer snapshots (ring of 4). Finish (or copy) within about 2 frame times, then check
valid(). age_ms()is the time since the game started the frame,delivery_ms()the delay the shared memory added,stats()shows frame interval and publish cost.