Unofficial iRacing SDK implementation for Java 🏁
The sdk provide API for fetching simulator data through reactor Flux
You can find active release here Just follow the instructions and you'll be ready
Add this to pom.xml:
<dependency>
<groupId>com.joffrey.iracing</groupId>
<artifactId>irsdkjava-spring-boot-starter</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
Run via command line:
$ mvn install
The java Sdk use spring autoconfiguration, you just need to import IRacingLibrary object in your project
@Autowired
private IRacingLibrary iRacingLibrary;
- Java 11
- Spring Boot
- Maven
Available data Flux can be find under IRacingLibrary.java
- Flux<CameraPacket> : Packet containing camera info and drivers info, this flux can be used for a TV editor
- Flux<List<LapTimingData>> : Packet containing a list of LapTimingData Objects, list is sort by drivers live position
- Flux<RaceInfo> : Packet containing info about the current race, player info (Fuel/Laps/time remaining, ...)
- Flux<TelemetryData> : Packet containing Telemetry Live data
- Flux<List<TrackmapTrackerDriver>> : Packet containing usefull info for display in a Race Tracker
- broadcastMsg used to send a message to the sim (Change camera, control some settings,...)
In your spring project you can modify the settings of the different Flux Api If you need to change these values you can do as the following:
irsdkjava.config.flux.interval.camera=1000
irsdkjava.config.flux.interval.lap-timing=1000
irsdkjava.config.flux.interval.race-info=1000
irsdkjava.config.flux.interval.telemetry=500
irsdkjava.config.flux.interval.trackmap-tracker=100
irsdkjava.config.flux.interval.yaml=100
It can be interresting to add more API with more/less content, facilitate the broadcastMsg API
Any help is welcome, it can be fix a bug, code improvement ...
How to contribute / report an issue