Skip to content

About

ETS2/ATS plugin that shares official SDK telemetry via shared memory

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Latest commit

 

History

165 Commits

Folders and files

Repository files navigation

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

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.

Build

Requires CMake 3.15+ and MSVC (Visual Studio 2019+).

cmake -B build -A x64
cmake --build build --config Release

Outputs ets2la_telemetry.dll (put it in <game>/bin/win_x64/plugins/).

Python client: pip install ./python (see python/README.md).

Reading telemetry

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_telemetry blocks for a snapshot newer than the last one this reader got. First call after connecting waits for a fresh snapshot.
  • get_latest_telemetry is 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.

About

ETS2/ATS plugin that shares official SDK telemetry via shared memory

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages