F1Game.UDP
25.0.0
dotnet add package F1Game.UDP --version 25.0.0
NuGet\Install-Package F1Game.UDP -Version 25.0.0
<PackageReference Include="F1Game.UDP" Version="25.0.0" />
<PackageVersion Include="F1Game.UDP" Version="25.0.0" />
<PackageReference Include="F1Game.UDP" />
paket add F1Game.UDP --version 25.0.0
#r "nuget: F1Game.UDP, 25.0.0"
#:package F1Game.UDP@25.0.0
#addin nuget:?package=F1Game.UDP&version=25.0.0
#tool nuget:?package=F1Game.UDP&version=25.0.0
F1Game.UDP
Library to parse UDP telemetry packets from F1 25 game.
UDP Specification
UDP specification is here.
Versioning
Each major version of the F1Game.UDP
library is designed to support a specific version of the F1 game. The major version number of the library corresponds to the version of the game it supports. For example, F1Game.UDP
version 23.x supports F1 23 game, and version 24.x supports F1 24 game and so on.
Usages
You can parse an array of bytes to packets using the ToPacket
extension method.
The ToPacket
method returns a UnionPacket
struct, which has properties for different types of packets, such as:
CarDamageDataPacket
CarSetupDataPacket
CarStatusDataPacket
CarTelemetryDataPacket
EventDataPacket
FinalClassificationDataPacket
LapDataPacket
LapPositionsDataPacket
LobbyInfoDataPacket
MotionDataPacket
MotionExDataPacket
ParticipantsDataPacket
SessionDataPacket
SessionHistoryDataPacket
TimeTrialDataPacket
TyreSetsDataPacket
First, check the packet type using the PacketType
property. Then, access the specific packet data by calling the corresponding TryGet<PacketName>
method of the UnionPacket
struct.
using F1Game.UDP;
UnionPacket packet = arrayOfBytes.ToPacket();
if (packet.TryGetCarTelemetryDataPacket(out var carTelemetryData))
{
// Access car telemetry data
}
switch (packet.PacketType)
{
case PacketType.CarTelemetry when packet.TryGetCarTelemetryDataPacket(out var carTelemetryData):
// Access car telemetry data
break;
case PacketType.CarStatus when packet.TryGetCarStatusDataPacket(out var carStatusData):
// Access car status data
break;
// Add other cases for different packet types
}
var someResult = packet.PacketType switch
{
PacketType.CarTelemetry when packet.TryGetCarTelemetryDataPacket(out var carTelemetryData) => // Access car telemetry data,
PacketType.CarStatus when packet.TryGetCarStatusDataPacket(out var carStatusData) => // Access car status data,
_ => "default"
};
Benchmarks
You can check performance of the library by running benchmarks in F1Game.UDP.Benchmarks
project.
Results on my machine are here.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
25.0.0 | 153 | 6/1/2025 |
24.1.0 | 140 | 6/1/2025 |
24.0.0 | 175 | 6/13/2024 |
23.2.0 | 125 | 6/12/2024 |
23.1.0 | 134 | 6/10/2024 |
23.0.1 | 130 | 6/9/2024 |
23.0.0-alpha | 111 | 6/8/2024 |
0.0.1-alpha | 181 | 12/25/2023 |