Skip to main content

Crate lmu_shared_memory

Crate lmu_shared_memory 

Source
Expand description

§lmu-shared-memory

Safe Rust interface for reading telemetry and standings from Le Mans Ultimate shared memory.

§Platform support

This crate currently supports Windows only.

§Telemetry

use lmu_shared_memory::{LmuTelemetry, TelemetryUpdate};

let mut telemetry = LmuTelemetry::connect()?;

if let TelemetryUpdate::Snapshot(snapshot) = telemetry.read()? {
    println!("Throttle: {}", snapshot.pedals.throttle);
}

§Standings

use lmu_shared_memory::{LmuStandings, StandingsUpdate};

let mut standings = LmuStandings::connect()?;

if let StandingsUpdate::Snapshot(snapshot) = standings.read()? {
    for entry in snapshot.entries {
        println!(
            "{}: {}",
            entry.position,
            entry.driver_name
        );
    }
}

Structs§

LmuStandings
LmuTelemetry
PedalData
SharedMemory
SharedMemoryGuard
SharedMemoryLock
StandingEntry
StandingsSnapshot
TelemetrySnapshot
TireCompound
VehicleKey

Enums§

Error
StandingsUpdate
TelemetryUpdate
VehicleClass
VehicleStatus

Constants§

MAPPING_NAME
MAPPING_SIZE
MAX_VEHICLES

Functions§

select_class_blocks
select_visible_entries

Type Aliases§

Result